Skip to content

Commit 9dd1165

Browse files
authored
added sourceId & filterId to debugUI
1 parent a74be4a commit 9dd1165

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

jme3-examples/src/main/java/jme3test/audio/TestOgg.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
import com.jme3.scene.shape.Sphere;
5353

5454
/**
55-
*
55+
*
5656
* @author capdevon
5757
*/
5858
public class TestOgg extends SimpleApplication implements ActionListener {
@@ -84,8 +84,8 @@ public void simpleInitApp() {
8484
bmp = createLabelText(10, 20, "<placeholder>");
8585

8686
// just a blue sphere to mark the spot
87-
Geometry geo = makeShape("Beeper", new Sphere(16, 16, 1f), ColorRGBA.Blue);
88-
rootNode.attachChild(geo);
87+
Geometry marker = makeShape("Marker", new Sphere(16, 16, 1f), ColorRGBA.Blue);
88+
rootNode.attachChild(marker);
8989

9090
Geometry grid = makeShape("DebugGrid", new Grid(21, 21, 2), ColorRGBA.Gray);
9191
grid.center().move(0, 0, 0);
@@ -126,8 +126,10 @@ public void simpleUpdate(float tpf) {
126126
sb.append("Positional: ").append(audioSource.isPositional()).append("\n");
127127
sb.append("MaxDistance: ").append(audioSource.getMaxDistance()).append("\n");
128128
sb.append("RefDistance: ").append(audioSource.getRefDistance()).append("\n");
129-
sb.append("DryFilter: ").append(audioSource.getDryFilter() != null).append("\n");
130129
sb.append("Status: ").append(audioSource.getStatus()).append("\n");
130+
sb.append("SourceId: ").append(audioSource.getChannel()).append("\n");
131+
sb.append("DryFilter: ").append(audioSource.getDryFilter() != null).append("\n");
132+
sb.append("FilterId: ").append(dryFilter.getId()).append("\n");
131133

132134
bmp.setText(sb.toString());
133135
sb.setLength(0);
@@ -142,7 +144,7 @@ public void onAction(String name, boolean isPressed, float tpf) {
142144
if (audioSource.getStatus() != AudioSource.Status.Playing) {
143145
audioSource.play();
144146
} else {
145-
audioSource.pause();
147+
audioSource.stop();
146148
}
147149
} else if (name.equals("togglePositional")) {
148150
boolean positional = audioSource.isPositional();

0 commit comments

Comments
 (0)