Description
The ConvertSampleRate method performs a high quality resampling operation on the supplied raw sample data buffer, from the specified input sample rate to the desired output sample rate.
Usage
static void ConvertSampleRate(const std::vector<short>& sourceData, unsigned int sourceSampleCount, unsigned int achannelCount, std::vector<short>& targetData, unsigned int targetSampleCount);
Argument list
- sourceData [const std::vector<short>&]
- The input sample data to convert
- sourceSampleCount [unsigned int]
- The sample rate of the input sample data
- achannelCount [unsigned int]
- The number of channels in the sample data
- targetData [std::vector<short>&]
- The output buffer to receive the converted sample data. If this buffer contains any existing data, it will be erased.
- sourceData [unsigned int]
- The desired sample rate of the output sample data