mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
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:
@@ -294,6 +294,7 @@ public class AudioManager implements Listener<AudioPacket>, IAudioController
|
||||
public void dispose()
|
||||
{
|
||||
mAudioOutput.removeAudioEventListener( this );
|
||||
mAudioOutput.reset();
|
||||
mAudioOutput = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user