No Matches
Public Member Functions | List of all members
switchboard::IOResampler Class Reference

Provides a callback function that is called with resampled audio data. More...

#include <IOResampler.hpp>

Public Member Functions

 IOResampler (const uint sourceSampleRate, const uint callbackSampleRate, const IOResamplerCallbackFunction callback)
 Creates an IOResampler instance.
bool process (float **buffers, const bool inputIsMono, const uint numberOfFrames, void *userPointer)
 Audio process function of IOResampler.

Detailed Description

Provides a callback function that is called with resampled audio data.

IOResampler class.

Supports mono and stereo input and stereo output.

The IOResampler contains two resamplers and it works like this:

[Input audio @ source sample rate] - [Resampler] - [Callback function @ callback sample rate] - [Resampler] - [Output audio @ source sample rate]

Number of frames is never changed during the process call. Returned audio data might contain zero values initially.

Constructor & Destructor Documentation

◆ IOResampler()

switchboard::IOResampler::IOResampler ( const uint  sourceSampleRate,
const uint  callbackSampleRate,
const IOResamplerCallbackFunction  callback 

Creates an IOResampler instance.

sourceSampleRateThe source sample rate.
callbackSampleRateThe sample rate of the audio data that will be passed to the callback function.
callbackThe callback function that processed the resampled audio data.

Member Function Documentation

◆ process()

bool switchboard::IOResampler::process ( float **  buffers,
const bool  inputIsMono,
const uint  numberOfFrames,
void *  userPointer 

Audio process function of IOResampler.

buffers[inout] The buffers containing the audio data.
inputIsMonoMust be true if the buffers parameter contains mono data, false otherwise.
numberOfFramesNumber of frames in the buffers parameter.
userPointerCustom pointer value that will be passed to the callback function.
True if audio data has been written to buffers, false otherwise.

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