P25 audio decoder integration.

Auto-discovers the jmbe ( https://github.com/DSheirer/jmbe ) library at startup and provides decode P25 Phase 1 audio
This commit is contained in:
dennis.sheirer
2015-03-29 13:25:36 +00:00
parent 52f2e3bdca
commit 023553c3bf
41 changed files with 1391 additions and 470 deletions

View File

@@ -30,12 +30,11 @@ import org.slf4j.LoggerFactory;
import sample.real.RealSampleListener;
import buffer.FloatSampleBufferAssembler;
public class AudioOutput implements RealSampleListener,
SquelchListener,
AudioTypeListener
public class AudioOutputImpl implements RealSampleListener,
SquelchListener, IAudioTypeListener, IAudioOutput
{
private final static Logger mLog =
LoggerFactory.getLogger( AudioOutput.class );
LoggerFactory.getLogger( AudioOutputImpl.class );
private static final int sAUDIO_BLOCK_SIZE = 24000;
private static final AudioFormat sAUDIO_FORMAT =
@@ -54,7 +53,7 @@ public class AudioOutput implements RealSampleListener,
private boolean mEnabled = false;
private SquelchState mSquelchState = SquelchState.SQUELCH;
public AudioOutput( String channelName )
public AudioOutputImpl( String channelName )
{
try
{
@@ -75,11 +74,13 @@ public class AudioOutput implements RealSampleListener,
mSquelchState = state;
}
@Override
public void setAudioPlaybackEnabled( boolean enabled )
{
mEnabled = enabled;
}
@Override
public void dispose()
{
mOutput.stop();

View File

@@ -0,0 +1,28 @@
package audio;
import audio.SquelchListener.SquelchState;
public interface IAudioOutput
{
/**
* Squelch / Unsquelch state for this channel
*/
public abstract void setSquelch( SquelchState state );
/**
* Audio playback defines if this channel is currently playing on the
* system speakers.
*/
public abstract void setAudioPlaybackEnabled( boolean enabled );
/**
* Dispose of any system resources for this audio output
*/
public abstract void dispose();
/**
* Sets the audio to normal or inverted output
*/
public abstract void setAudioType( AudioType type );
}

View File

@@ -17,7 +17,7 @@
******************************************************************************/
package audio;
public interface AudioTypeListener
public interface IAudioTypeListener
{
public void setAudioType( AudioType type );
}