mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 09:07:27 -05:00
Resolves #57 - default tuner configuration per tuner type was being
shared across multiple tuners of the same type, unless the user created a new tuner configuration for each tuner. Updated code to create a default tuner configuration based on the tuner type, but name the configuration as 'Default-UNIQUETUNERID', so that any changes to that uniquely identified tuner will persist across sessions. Note: this does not avoid the situation where multiple tuners of the same type are all using the same default serial number (e.g. 0000001). In this case, they will all still share the same configuraiton. User must change the serial number of the dongle in order for it to be uniquely identifiable, so that we can correctly lookup the configuration for the specific tuner.
This commit is contained in:
@@ -55,8 +55,6 @@ import sample.complex.ComplexBuffer;
|
||||
import source.SourceException;
|
||||
import source.tuner.TunerController;
|
||||
import source.tuner.TunerType;
|
||||
import source.tuner.frequency.FrequencyChangeEvent;
|
||||
import source.tuner.frequency.FrequencyChangeEvent.Event;
|
||||
import buffer.FloatAveragingBuffer;
|
||||
import controller.ResourceManager;
|
||||
import controller.ThreadPoolManager;
|
||||
@@ -1486,8 +1484,11 @@ public abstract class RTL2832TunerController extends TunerController
|
||||
buffer.get( data );
|
||||
|
||||
buffer.rewind();
|
||||
|
||||
mFilledBuffers.add( data );
|
||||
|
||||
if( mRunning.get() )
|
||||
{
|
||||
mFilledBuffers.add( data );
|
||||
}
|
||||
|
||||
mSampleCounter.addAndGet( transfer.actualLength() );
|
||||
|
||||
@@ -1501,11 +1502,19 @@ public abstract class RTL2832TunerController extends TunerController
|
||||
{
|
||||
case LibUsb.TRANSFER_COMPLETED:
|
||||
/* resubmit the transfer */
|
||||
int result = LibUsb.submitTransfer( transfer );
|
||||
|
||||
if( result != LibUsb.SUCCESS )
|
||||
if( isRunning() )
|
||||
{
|
||||
int result = LibUsb.submitTransfer( transfer );
|
||||
|
||||
if( result != LibUsb.SUCCESS )
|
||||
{
|
||||
mLog.error( "couldn't resubmit buffer transfer to tuner" );
|
||||
LibUsb.freeTransfer( transfer );
|
||||
mTransfers.remove( transfer );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mLog.error( "couldn't resubmit buffer transfer to tuner" );
|
||||
LibUsb.freeTransfer( transfer );
|
||||
mTransfers.remove( transfer );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user