mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
#1318 Resolves issue where bitstream recorder no longer works. Solution submitted by @apankowski. (#1345)
Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -21,11 +21,10 @@ package io.github.dsheirer.dsp.symbol;
|
||||
import io.github.dsheirer.bits.IBinarySymbolProcessor;
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
import io.github.dsheirer.sample.buffer.IByteBufferProvider;
|
||||
import java.nio.ByteBuffer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* Assembles reusable byte buffers from an incoming stream of boolean values.
|
||||
*/
|
||||
@@ -58,6 +57,7 @@ public class BinaryToByteBufferAssembler implements IBinarySymbolProcessor, IByt
|
||||
{
|
||||
if(mCurrentBuffer != null && mBufferListener != null)
|
||||
{
|
||||
mCurrentBuffer.flip();
|
||||
mBufferListener.receive(mCurrentBuffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,10 @@ package io.github.dsheirer.dsp.symbol;
|
||||
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
import io.github.dsheirer.sample.buffer.IByteBufferProvider;
|
||||
import java.nio.ByteBuffer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* Assembles reusable byte buffers from an incoming stream of Dibits.
|
||||
*/
|
||||
@@ -57,6 +56,7 @@ public class DibitToByteBufferAssembler implements Listener<Dibit>, IByteBufferP
|
||||
{
|
||||
if(mCurrentBuffer != null && mBufferListener != null)
|
||||
{
|
||||
mCurrentBuffer.flip();
|
||||
mBufferListener.receive(mCurrentBuffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,12 +19,11 @@
|
||||
package io.github.dsheirer.util;
|
||||
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Threaded processor for receiving elements from a separate producer thread and forwarding those buffers to a
|
||||
@@ -167,7 +166,7 @@ public class Dispatcher<E> implements Listener<E>
|
||||
{
|
||||
element = mQueue.take();
|
||||
|
||||
if(mPoisonPill.equals(element))
|
||||
if(mPoisonPill == element)
|
||||
{
|
||||
mRunning.set(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user