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

@@ -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()
{
}
}

View File

@@ -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();
}