#39 WIP - initial efforts to restructure the way tuners and tuner

controllers manager sample buffer processing and channel management.
General cleanup across all modules to remove the executor from each
of the start() methods.  Removed the B100 tuner class since it's not
yet implemented.
This commit is contained in:
Denny
2017-12-03 11:10:50 -05:00
parent bf65e10286
commit 57fab2b7ca
88 changed files with 2112 additions and 2547 deletions

View File

@@ -17,19 +17,11 @@
******************************************************************************/
package source.tuner.airspy;
import java.util.concurrent.RejectedExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sample.Listener;
import sample.complex.ComplexBuffer;
import source.SourceException;
import source.tuner.Tuner;
import source.tuner.TunerChannel;
import source.tuner.TunerChannelSource;
import source.tuner.TunerClass;
import source.tuner.TunerEvent;
import source.tuner.TunerType;
import source.tuner.airspy.AirspyTunerController.BoardID;
@@ -79,50 +71,4 @@ public class AirspyTuner extends Tuner
{
return 13.0;
}
@Override
public TunerChannelSource getChannel( TunerChannel channel )
throws RejectedExecutionException, SourceException
{
//TODO: this channel has a decimated sample rate of:
// 10.0 MSps = 10,000,000 / 208 = 48076.923
// 5.0 MSps = 5,000,000 / 104 = 48076.923
// 2.5 MSps = 2,500,000 / 52 = 48076.923
//Consider implementing a fractional resampler to get a correct 48 kHz
//output sample rate
TunerChannelSource source = getController().getChannel( this, channel );
if( source != null )
{
broadcast( new TunerEvent( this, TunerEvent.Event.CHANNEL_COUNT ) );
}
return source;
}
@Override
public void releaseChannel( TunerChannelSource source )
{
/* Unregister for receiving samples */
removeListener( (Listener<ComplexBuffer>)source );
/* Tell the controller to release the channel and cleanup */
if( source != null )
{
getController().releaseChannel( source );
}
}
@Override
public void addListener( Listener<ComplexBuffer> listener )
{
getController().addListener( listener );
}
@Override
public void removeListener( Listener<ComplexBuffer> listener )
{
getController().removeListener( listener );
}
}