GeezerVison is showing github.com — fixed mp3 loading problem for osx and added failsafe if file is not e… · zyangpointer/processing@8e3789e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard Collapse file
Copy file name to clipboard Collapse file
Copy file name to clipboardExpand all lines: java/libraries/sound/src/cpp/processing_sound_MethClaInterface.cpp +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -81,6 +81,7 @@ JNIEXPORT jint JNICALL Java_processing_sound_MethClaInterface_engineNew (JNIEnv |
81 | 81 | .addLibrary(methcla_plugins_tri) |
82 | 82 | .addLibrary(methcla_plugins_pulse) |
83 | 83 | .addLibrary(methcla_soundfile_api_libsndfile) |
| 84 | + .addLibrary(methcla_soundfile_api_mpg123) |
84 | 85 | .addLibrary(methcla_plugins_patch_cable) |
85 | 86 | .addLibrary(methcla_plugins_sampler) |
86 | 87 | .addLibrary(methcla_plugins_white_noise) |
|
Collapse file
Copy file name to clipboardExpand all lines: java/libraries/sound/src/processing/sound/SoundFile.java +9-3Lines changed: 9 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | package processing.sound; |
2 | 2 | import processing.core.*; |
| 3 | +import java.io.File; |
3 | 4 |
|
4 | 5 | public class SoundFile implements SoundObject { |
5 | 6 |
|
@@ -14,8 +15,7 @@ public class SoundFile implements SoundObject { |
14 | 15 | float m_add=0; |
15 | 16 | int m_cue=0; |
16 | 17 | float m_pos=0; |
17 | | - boolean m_loop; |
18 | | - |
| 18 | + boolean m_loop; |
19 | 19 |
|
20 | 20 | public SoundFile(PApplet theParent, String path) { |
21 | 21 | this.parent = theParent; |
@@ -24,7 +24,13 @@ public SoundFile(PApplet theParent, String path) { |
24 | 24 | m_engine.start(); |
25 | 25 | methCla = new MethClaInterface(); |
26 | 26 | m_filePath=theParent.dataPath(path); |
27 | | - m_info = m_engine.soundFileInfo(m_filePath); |
| 27 | + File sample = new File(m_filePath); |
| 28 | + if(sample.isFile() == true){ |
| 29 | + m_info = m_engine.soundFileInfo(m_filePath); |
| 30 | + } |
| 31 | + else { |
| 32 | + System.out.println("Error: Soundfile doesn't exist. Pleae check path"); |
| 33 | + } |
28 | 34 | } |
29 | 35 |
|
30 | 36 | public int frames(){ |
|
Collapse file
Copy file name to clipboardExpand all lines: java/libraries/sound/todo.txt +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
13 | 13 | + Fix problem of passing effects to Analyzers |
14 | 14 | + Make audio input work |
15 | 15 | - Use Patch Cables for signal splitting for effects |
| 16 | + + Fix MP3 thing |
16 | 17 |
|
17 | 18 | Features: |
18 | 19 | + Compile Windows Version |
|