mirror of
https://github.com/processing/processing4.git
synced 2026-01-28 02:41:08 +01:00
fixed mp3 loading problem for osx and added failsafe if file is not existing.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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(){
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user