P25 Decoder - improved LSM decoding and IMBE audio decoding. Includes redesigned audio output class to handle automatic start/stop of audio playback based on availability of audio data.

This commit is contained in:
dennis.sheirer
2015-06-08 01:05:19 +00:00
parent 5dd4454c4c
commit 31482a1014
32 changed files with 366 additions and 432 deletions

View File

@@ -1,24 +1,49 @@
package audio;
import java.nio.ByteBuffer;
public class AudioPacket
{
private ByteBuffer mAudioBuffer;
private String mSource;
private Type mType;
private byte[] mAudioData;
private int mPriority;
public AudioPacket()
public AudioPacket( String source, Type type )
{
mSource = source;
mType = type;
}
public void setAudioBuffer( ByteBuffer audioBuffer )
public AudioPacket( String source, byte[] audio, int priority )
{
mAudioBuffer = audioBuffer;
this( source, Type.AUDIO );
mAudioData = audio;
mPriority = priority;
}
public ByteBuffer getAudioBuffer()
public String getSource()
{
return mAudioBuffer;
return mSource;
}
public Type getType()
{
return mType;
}
public byte[] getAudioData()
{
return mAudioData;
}
public int getPriority()
{
return mPriority;
}
public enum Type
{
AUDIO,
END;
}
}