fixed mp3 loading problem for osx and added failsafe if file is not existing.

This commit is contained in:
wirsing
2014-10-16 18:00:18 -07:00
parent c7a8b523ec
commit bb96d9388b
3 changed files with 11 additions and 3 deletions

View File

@@ -81,6 +81,7 @@ JNIEXPORT jint JNICALL Java_processing_sound_MethClaInterface_engineNew (JNIEnv
.addLibrary(methcla_plugins_tri)
.addLibrary(methcla_plugins_pulse)
.addLibrary(methcla_soundfile_api_libsndfile)
.addLibrary(methcla_soundfile_api_mpg123)
.addLibrary(methcla_plugins_patch_cable)
.addLibrary(methcla_plugins_sampler)
.addLibrary(methcla_plugins_white_noise)

View File

@@ -1,5 +1,6 @@
package processing.sound;
import processing.core.*;
import java.io.File;
public class SoundFile implements SoundObject {
@@ -14,8 +15,7 @@ public class SoundFile implements SoundObject {
float m_add=0;
int m_cue=0;
float m_pos=0;
boolean m_loop;
boolean m_loop;
public SoundFile(PApplet theParent, String path) {
this.parent = theParent;
@@ -24,7 +24,13 @@ public class SoundFile implements SoundObject {
m_engine.start();
methCla = new MethClaInterface();
m_filePath=theParent.dataPath(path);
m_info = m_engine.soundFileInfo(m_filePath);
File sample = new File(m_filePath);
if(sample.isFile() == true){
m_info = m_engine.soundFileInfo(m_filePath);
}
else {
System.out.println("Error: Soundfile doesn't exist. Pleae check path");
}
}
public int frames(){

View File

@@ -13,6 +13,7 @@
+ Fix problem of passing effects to Analyzers
+ Make audio input work
- Use Patch Cables for signal splitting for effects
+ Fix MP3 thing
Features:
+ Compile Windows Version