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,6 +21,7 @@ import java.awt.EventQueue;
import javax.swing.JLabel;
import module.decode.p25.P25Decoder.Modulation;
import module.decode.state.ChangedAttribute;
import module.decode.state.DecoderPanel;
import net.miginfocom.swing.MigLayout;
@@ -46,11 +47,12 @@ public class P25DecoderPanel extends DecoderPanel
private JLabel mSiteAlias = new JLabel( "" );
public P25DecoderPanel( SettingsManager settingsManager, P25Decoder decoder )
public P25DecoderPanel( SettingsManager settingsManager,
P25DecoderState decoderState )
{
super( settingsManager, decoder );
super( settingsManager, decoderState );
mProtocol = new JLabel( "P25-1 " + decoder.getModulation().getShortLabel() );
mProtocol = new JLabel( "P25-1 " + decoderState.getModulation().getShortLabel() );
init();
}
@@ -101,9 +103,9 @@ public class P25DecoderPanel extends DecoderPanel
add( mSiteAlias, "wrap" );
}
private P25DecoderState getDecoderState()
public P25DecoderState getDecoderState()
{
return (P25DecoderState)getDecoder().getDecoderState();
return (P25DecoderState)super.getDecoderState();
}
@Override