/** * Monitors the source data line playback state and broadcasts audio events to the registered * listener as the state changes */ @Override public void update(LineEvent event) { LineEvent.Type type = event.getType(); if (type == LineEvent.Type.START) { mAudioEventBroadcaster.broadcast(mAudioStartEvent); } else if (type == LineEvent.Type.STOP) { mAudioEventBroadcaster.broadcast(mAudioStopEvent); } }
/** Broadcasts an audio event to the registered listener */ private void broadcast(AudioEvent audioEvent) { mAudioEventBroadcaster.broadcast(audioEvent); }
/** Broadcasts a call event to any registered listeners */ protected void broadcast(CallEvent event) { mCallEventBroadcaster.broadcast(event); }