Skip to content

Commit

Permalink
Expose SynthesisEngine instead of Synthesizer
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstadler committed Sep 21, 2023
1 parent 868e056 commit 38b6e37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/IO/LowLevelEngine/LowLevelEngine.pde
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import processing.sound.*;

import com.jsyn.Synthesizer;
import com.jsyn.engine.SynthesisEngine;

void setup() {

Expand All @@ -27,7 +27,7 @@ void setup() {

// to get programmatic access to the same information (and more), you can get
// and inspect the JSyn Synthesizer class yourself:
Synthesizer s = Sound.getSynthesizer();
SynthesisEngine s = Sound.getSynthesisEngine();
println("Current CPU usage: " + s.getUsage());

}
Expand Down
8 changes: 5 additions & 3 deletions src/processing/sound/Sound.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,11 @@ public static void printConnections() {
}

/**
* Direct access to the underlying JSyn Synthesizer object. Use at your own risk.
* Direct access to the underlying JSyn SynthesisEngine object. Use at your
* own risk.
* @see com.jsyn.engine.SynthesisEngine
*/
public static Synthesizer getSynthesizer() {
return Engine.getEngine().synth;
public static SynthesisEngine getSynthesisEngine() {
return (SynthesisEngine) Engine.getEngine().synth;
}
}

0 comments on commit 38b6e37

Please sign in to comment.