mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user