mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
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:
@@ -1,5 +1,7 @@
|
||||
package audio;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import module.Module;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
@@ -115,7 +117,9 @@ public class AudioModule extends Module implements IAudioPacketProvider,
|
||||
{
|
||||
if( mAudioPacketListener != null && mSquelchState == SquelchState.UNSQUELCH )
|
||||
{
|
||||
float[] audio = buffer.getSamples();
|
||||
/* We make a copy of the samples, so that we don't affect any other
|
||||
* processes that might be concurrently processing the same buffer */
|
||||
float[] audio = Arrays.copyOf( buffer.getSamples(), buffer.getSamples().length );
|
||||
|
||||
mAudioFilter.filter( audio );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user