class MAGES::Recorder::Tests::TestResampler

Overview

Tests the stateful resampler. More…

class TestResampler
{
public:
    // methods

    void WhenRatesAreEqualThenOutputIsAPassthrough();
    void WhenResamplingInBlocksThenPhaseIsContinuous(int sourceRate, int targetRate);
    void WhenSourceIsShortThenOnlyWholeFramesAreConsumed();
};

Detailed Documentation

Tests the stateful resampler.

Methods

void WhenRatesAreEqualThenOutputIsAPassthrough()

Case: Equal rates must be a bit exact passthrough.

void WhenResamplingInBlocksThenPhaseIsContinuous(int sourceRate, int targetRate)

Case: Resampling block by block must equal resampling the whole stream at once.

Parameters:

sourceRate

The source sample rate.

targetRate

The target sample rate.

void WhenSourceIsShortThenOnlyWholeFramesAreConsumed()

Case: An underrun produces what it can instead of clamping against the end of the block.