mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Implements a complex sample delay buffer integrated into the tuner
channel manager so that channel source requests can have a start timestamp specified and the channel can be preloaded with samples from the delay buffer. If no timestamp is specified, current time is assumed. This feature requires corresponding updates to any decoder that wishes to implement the timestamped sample preloading functionality.
This commit is contained in:
@@ -67,6 +67,21 @@ public abstract class TunerController implements Tunable, ISourceEventProcessor,
|
||||
*/
|
||||
public abstract void dispose();
|
||||
|
||||
/**
|
||||
* Number of samples contained in each complex buffer provided by this tuner.
|
||||
*
|
||||
* @return number of complex sample in each buffer.
|
||||
*/
|
||||
public abstract int getBufferSampleCount();
|
||||
|
||||
/**
|
||||
* Duration in milliseconds for each sample buffer provided by this tuner
|
||||
*/
|
||||
public long getBufferDuration()
|
||||
{
|
||||
return (long)(1000.0 / (getSampleRate() / (double)getBufferSampleCount()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements the ISourceEventListener interface to receive requests from sample consumers
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user