wip #34 - removed some wrapper methods from tuner since the tuner

controller is now exposed (frequency, sample rate, channel count, etc)
This commit is contained in:
denny
2016-03-13 07:38:29 -04:00
parent 415f95ec89
commit 0605760fcd
16 changed files with 32 additions and 198 deletions

View File

@@ -73,30 +73,12 @@ public class FCDTuner extends MixerTuner
return getController().getUSBAddress();
}
@Override
public void apply( TunerConfiguration config )throws SourceException
{
getController().apply( config );
}
@Override
public int getSampleRate()
{
return (int)mMixerTunerType.getAudioFormat().getSampleRate();
}
@Override
public double getSampleSize()
{
return 16.0;
}
@Override
public long getFrequency() throws SourceException
{
return getController().getFrequency();
}
@Override
public TunerChannelSource getChannel( TunerChannel tunerChannel )
throws RejectedExecutionException, SourceException
@@ -111,12 +93,6 @@ public class FCDTuner extends MixerTuner
return source;
}
@Override
public int getChannelCount()
{
return getController().getChannelCount();
}
/**
* Releases the tuned channel so that the tuner controller can tune to
* other frequencies as needed.

View File

@@ -70,6 +70,7 @@ public abstract class FCDTunerController extends TunerController
*/
public FCDTunerController( Device device,
DeviceDescriptor descriptor,
int sampleRate,
int minTunableFrequency,
int maxTunableFrequency )
{
@@ -77,7 +78,7 @@ public abstract class FCDTunerController extends TunerController
maxTunableFrequency,
DC_SPIKE_AVOID_BUFFER,
USABLE_BANDWIDTH_PERCENT );
mFrequencyController.setSampleRate( sampleRate );
mDevice = device;
mDeviceDescriptor = descriptor;
}

View File

@@ -31,6 +31,7 @@ import org.usb4java.DeviceDescriptor;
import settings.SettingsManager;
import source.SourceException;
import source.tuner.MixerTunerType;
import source.tuner.TunerClass;
import source.tuner.TunerType;
import source.tuner.configuration.TunerConfiguration;
@@ -60,7 +61,8 @@ public class FCD1TunerController extends FCDTunerController
public FCD1TunerController( Device device, DeviceDescriptor descriptor )
{
super( device,
descriptor,
descriptor,
(int)MixerTunerType.FUNCUBE_DONGLE_PRO.getAudioFormat().getSampleRate(),
sMINIMUM_TUNABLE_FREQUENCY,
sMAXIMUM_TUNABLE_FREQUENCY );
}

View File

@@ -29,6 +29,7 @@ import org.usb4java.DeviceDescriptor;
import settings.SettingsManager;
import source.SourceException;
import source.tuner.MixerTunerType;
import source.tuner.TunerClass;
import source.tuner.TunerType;
import source.tuner.configuration.TunerConfiguration;
@@ -52,6 +53,7 @@ public class FCD2TunerController extends FCDTunerController
{
super( device,
descriptor,
(int)MixerTunerType.FUNCUBE_DONGLE_PRO_PLUS.getAudioFormat().getSampleRate(),
sMINIMUM_TUNABLE_FREQUENCY,
sMAXIMUM_TUNABLE_FREQUENCY );
}