Added reset capability to audio outputs that dispatches an audiostop

event so that the audio panel gui component can reset when an audio
source has been removed due to activity timeout.
This commit is contained in:
denny
2015-12-31 09:31:31 -05:00
parent 2e56b4a27f
commit 712ef0666e
2 changed files with 7 additions and 0 deletions

View File

@@ -294,6 +294,7 @@ public class AudioManager implements Listener<AudioPacket>, IAudioController
public void dispose()
{
mAudioOutput.removeAudioEventListener( this );
mAudioOutput.reset();
mAudioOutput = null;
}

View File

@@ -29,6 +29,12 @@ public abstract class AudioOutput implements Listener<AudioPacket>
protected boolean mCanProcessAudio;
protected long mLastActivity;
public void reset()
{
broadcast( new AudioEvent( AudioEvent.Type.AUDIO_STOPPED,
getChannelName() ) );
}
public void dispose()
{
mCanProcessAudio = false;