libsidplayfp  0.3.5
Public Member Functions | List of all members
reSIDfp::SincResampler Class Reference
Inheritance diagram for reSIDfp::SincResampler:
reSIDfp::Resampler

Public Member Functions

 SincResampler (const double clockFrequency, const double samplingFrequency, const double highestAccurateFrequency)
bool input (const int input)
int output () const
void reset ()
- Public Member Functions inherited from reSIDfp::Resampler
short getOutput () const

Constructor & Destructor Documentation

reSIDfp::SincResampler::SincResampler ( const double  clockFrequency,
const double  samplingFrequency,
const double  highestAccurateFrequency 
)

Use a clock freqency of 985248Hz for PAL C64, 1022730Hz for NTSC C64. The default end of passband frequency is pass_freq = 0.9*sample_freq/2 for sample frequencies up to ~ 44.1kHz, and 20kHz for higher sample frequencies.

For resampling, the ratio between the clock frequency and the sample frequency is limited as follows: 125*clock_freq/sample_freq < 16384 E.g. provided a clock frequency of ~ 1MHz, the sample frequency can not be set lower than ~ 8kHz. A lower sample frequency would make the resampling code overfill its 16k sample ring buffer.

The end of passband frequency is also limited: pass_freq <= 0.9*sample_freq/2

E.g. for a 44.1kHz sampling rate the end of passband frequency is limited to slightly below 20kHz. This constraint ensures that the FIR table is not overfilled.

Parameters
clockFrequencySystem clock frequency at Hz
methodsampling method to use
samplingFrequencyDesired output sampling rate
Returns
success

Member Function Documentation

bool reSIDfp::SincResampler::input ( const int  sample)
virtual

Input a sample into resampler. Output "true" when resampler is ready with new sample.

Parameters
sample
Returns
true when a sample is ready

Implements reSIDfp::Resampler.


The documentation for this class was generated from the following files: