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

@@ -29,16 +29,16 @@ public class LTRCallEvent extends CallEvent
private long mFrequency;
private int mValidCallMessages = 1;
public LTRCallEvent( CallEventType callEventType,
AliasList aliasList,
String fromID,
String toID,
String channel,
long frequency,
String details )
public LTRCallEvent( DecoderType type,
CallEventType callEventType,
AliasList aliasList,
String fromID,
String toID,
String channel,
long frequency,
String details )
{
super( DecoderType.LTR_STANDARD, callEventType,
aliasList, fromID, toID, details );
super( type, callEventType, aliasList, fromID, toID, details );
mChannel = channel;
mFrequency = frequency;
@@ -163,6 +163,7 @@ public class LTRCallEvent extends CallEvent
public static class Builder
{
/* Required parameters */
private DecoderType mDecoderType;
private CallEventType mCallEventType;
/* Optional parameters */
@@ -173,8 +174,9 @@ public class LTRCallEvent extends CallEvent
private String mChannel;
private long mFrequency;
public Builder( CallEventType callEventType )
public Builder( DecoderType decoderType, CallEventType callEventType )
{
mDecoderType = decoderType;
mCallEventType = callEventType;
}
@@ -226,7 +228,8 @@ public class LTRCallEvent extends CallEvent
*/
private LTRCallEvent( Builder builder )
{
this( builder.mCallEventType,
this( builder.mDecoderType,
builder.mCallEventType,
builder.mAliasList,
builder.mFromID,
builder.mToID,