Resolves #161 - E4000 tuner error. Tweaks settings in the USB transfer processor to improve latency in IQ buffer handling.

This commit is contained in:
Denny
2017-01-29 09:07:48 -05:00
parent f53519ad59
commit 8215b78a43
3 changed files with 8 additions and 8 deletions

View File

@@ -78,14 +78,9 @@ public abstract class RTL2832TunerController extends TunerController
private SampleRate mSampleRate = DEFAULT_SAMPLE_RATE;
private ByteSampleAdapter mSampleAdapter = new ByteSampleAdapter();
private Broadcaster<ComplexBuffer> mComplexBufferBroadcaster = new Broadcaster<>();
protected ByteSampleAdapter mSampleAdapter = new ByteSampleAdapter();
protected int mOscillatorFrequency = 28800000; //28.8 MHz
private USBTransferProcessor mUSBTransferProcessor;
protected USBTransferProcessor mUSBTransferProcessor;
protected Descriptor mDescriptor;
/**

View File

@@ -249,6 +249,11 @@ public class E4KTunerController extends RTL2832TunerController
throw new SourceException("E4K Tuner Controller - error during "
+ "init()", e);
}
String deviceName = getTunerType().getLabel() + " " + getUniqueID();
mUSBTransferProcessor = new RTL2832USBTransferProcessor(deviceName, mDeviceHandle, mSampleAdapter,
USB_TRANSFER_BUFFER_SIZE);
}
/**

View File

@@ -173,7 +173,7 @@ public class USBTransferProcessor implements TransferCallback
//Start transferred buffer dispatcher
mBufferDispatcherFuture = ThreadPool.SCHEDULED.scheduleAtFixedRate(mBufferDispatcher,
20, 20, TimeUnit.MILLISECONDS);
0, 11, TimeUnit.MILLISECONDS);
//Register with LibUSB processor so that it auto-starts LibUSB processing
TunerManager.LIBUSB_TRANSFER_PROCESSOR.registerTransferProcessor(this);