mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-11 16:17:24 -05:00
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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user