#30 WIP extracted the IcecastMetadataUpdater and merged some of the icecast configuration method into a new superclass.

This commit is contained in:
Denny
2016-12-26 09:08:34 -05:00
parent c216f56c4f
commit 524a76e583
29 changed files with 655 additions and 712 deletions

View File

@@ -190,8 +190,11 @@ public abstract class AudioBroadcaster implements IAudioPacketListener
*/
public void receive(StreamableAudioRecording recording)
{
mAudioRecordingQueue.add(recording);
broadcast(new BroadcastEvent(this, BroadcastEvent.Event.BROADCASTER_QUEUE_CHANGE));
if(connected())
{
mAudioRecordingQueue.add(recording);
broadcast(new BroadcastEvent(this, BroadcastEvent.Event.BROADCASTER_QUEUE_CHANGE));
}
}
/**
@@ -262,7 +265,7 @@ public abstract class AudioBroadcaster implements IAudioPacketListener
{
if(mBroadcastState != state)
{
mLog.debug("[" + getStreamName() + "] changing state to: " + state);
mLog.info("[" + getStreamName() + "] changing state to: " + state);
mBroadcastState = state;
broadcast(new BroadcastEvent(this, BroadcastEvent.Event.BROADCASTER_STATE_CHANGE));
@@ -271,6 +274,11 @@ public abstract class AudioBroadcaster implements IAudioPacketListener
{
stop();
}
if(!connected())
{
mAudioRecordingQueue.clear();
}
}
}