aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
index 8859d537e..b8dbcdb24 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
@@ -583,7 +583,15 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
*/
protected boolean setAudioVolumeImpl(final float v) {
if( null != audioSink ) {
- return audioSink.setVolume(v);
+ final boolean res = audioSink.setVolume(v);
+ if( State.Playing == state ) {
+ if( FloatUtil.isZero(v) ) {
+ audioSink.flush(); // implies stop!
+ } else {
+ audioSink.play(); // cont. w/ new data
+ }
+ }
+ return res;
}
// still true, even if audioSink rejects command ..
return true;