Skip to content

Commit

Permalink
Add Engine.printMessage(), Engine.getSelectedInputDeviceName()
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstadler committed Jun 23, 2019
1 parent bd55c04 commit 919be00
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/processing/sound/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ protected void selectOutputDevice(int deviceId) {
}
}

protected static String getSelectedInputDeviceName() {
return Engine.getAudioManager().getDeviceName(Engine.singleton.inputDevice);
}

protected static String getSelectedOutputDeviceName() {
return Engine.getAudioManager().getDeviceName(Engine.singleton.outputDevice);
}

protected void setVolume(double volume) {
if (Engine.checkRange(volume, "volume")) {
this.leftOut.inputB.set(volume);
Expand Down Expand Up @@ -214,6 +222,10 @@ protected static boolean checkRange(double value, String name) {
return true;
}

protected static void printMessage(String message) {
PApplet.println("Sound library: " + message);
}

protected static void printWarning(String message) {
PApplet.println("Sound library warning: " + message);
}
Expand Down

0 comments on commit 919be00

Please sign in to comment.