mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 09:07:27 -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:
@@ -21,18 +21,34 @@ package module.decode.am;
|
||||
import module.decode.DecoderType;
|
||||
import module.decode.PrimaryDecoder;
|
||||
import module.decode.config.DecodeConfiguration;
|
||||
import module.decode.state.AlwaysUnsquelchedDecoderState;
|
||||
|
||||
public class AMDecoder extends PrimaryDecoder
|
||||
{
|
||||
public AMDecoder( DecodeConfiguration config )
|
||||
{
|
||||
super( config, new AlwaysUnsquelchedDecoderState( "AM" ) );
|
||||
super( config );
|
||||
|
||||
//TODO: wire in the am decoder pieces
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecoderType getDecoderType()
|
||||
{
|
||||
return DecoderType.NBFM;
|
||||
return DecoderType.AM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import javax.swing.JLabel;
|
||||
|
||||
import module.decode.state.ChangedAttribute;
|
||||
import module.decode.state.DecoderPanel;
|
||||
import module.decode.state.DecoderState;
|
||||
import settings.ColorSetting;
|
||||
import settings.Setting;
|
||||
import settings.SettingsManager;
|
||||
@@ -31,9 +32,9 @@ public class AMDecoderPanel extends DecoderPanel
|
||||
|
||||
private JLabel mProtocol = new JLabel( "AM" );
|
||||
|
||||
public AMDecoderPanel( SettingsManager settingsManager, AMDecoder decoder )
|
||||
public AMDecoderPanel( SettingsManager settingsManager, DecoderState decoderState )
|
||||
{
|
||||
super( settingsManager, decoder );
|
||||
super( settingsManager, decoderState );
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user