Decouples DecoderState from the Decoder and makes DecoderState inherit

from Module so that Decoder can function independent of DecoderSTate and
DecoderState can more cleanly interface with other modules. 

Resolves issue with LTR-type decoders where the AudioModule was
filtering demodulated audio buffers before the decoder received the
audio - demodulated audio buffers are now copied before creating
AudioPackets.
This commit is contained in:
denny
2015-09-26 05:45:34 -04:00
parent eb1c2fc7a1
commit 9c69733034
57 changed files with 885 additions and 480 deletions

View File

@@ -31,6 +31,7 @@ import module.decode.Decoder;
import module.decode.event.CallEvent;
import module.decode.event.ICallEventListener;
import module.decode.event.ICallEventProvider;
import module.decode.state.DecoderState;
import module.decode.state.DecoderStateEvent;
import module.decode.state.DecoderStateEvent.Event;
import module.decode.state.IDecoderStateEventListener;
@@ -251,21 +252,21 @@ public class ProcessingChain implements IChannelEventListener
}
/**
* List of decoders for this processing chain
* List of decoder states for this processing chain
*/
public List<Decoder> getDecoders()
public List<DecoderState> getDecoderStates()
{
List<Decoder> decoders = new ArrayList<>();
List<DecoderState> decoderStates = new ArrayList<>();
for( Module module: mModules )
{
if( module instanceof Decoder )
if( module instanceof DecoderState )
{
decoders.add( (Decoder)module );
decoderStates.add( (DecoderState)module );
}
}
return decoders;
return decoderStates;
}
/**
@@ -349,7 +350,7 @@ public class ProcessingChain implements IChannelEventListener
if( module instanceof ICallEventProvider )
{
((ICallEventProvider)module).setCallEventListener( mCallEventBroadcaster );
((ICallEventProvider)module).addCallEventListener( mCallEventBroadcaster );
}
if( module instanceof IChannelEventProvider )