mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-10 15:47:25 -05:00
saturation. Each tunerchannelsource was sharing a thread pool and as the processing load increased, the thread pool was not expanding and the processing tasks were backing up, causing the buffers to grow with unprocessed data. Changed so that each tuner channel source is handed a thread pool to use for processing incoming sample data. Processing chain maintains the thread pool and starts the channel source. This allows traffic channels to reuse the thread pool across multiple iterations.
29 lines
680 B
Java
29 lines
680 B
Java
package source.tuner;
|
|
|
|
import java.util.concurrent.RejectedExecutionException;
|
|
|
|
import source.SourceException;
|
|
import controller.ThreadPoolManager;
|
|
|
|
public interface TunerChannelProvider
|
|
{
|
|
/**
|
|
* Returns a tuner frequency channel source, tuned to the correct frequency
|
|
*
|
|
* @param frequency - desired frequency
|
|
*
|
|
* @return - source for 48k sample rate
|
|
*/
|
|
public abstract TunerChannelSource getChannel( TunerChannel channel )
|
|
throws RejectedExecutionException, SourceException;
|
|
|
|
/**
|
|
* Releases the tuned channel resources
|
|
*
|
|
* @param channel - previously obtained tuner channel
|
|
*/
|
|
public abstract void releaseChannel( TunerChannelSource source );
|
|
|
|
|
|
}
|