Polyphase Game Engine
Loading...
Searching...
No Matches
AudioResample.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4#include <vector>
5
6// Linear-interpolating PCM sample-rate conversion. Input is interleaved
7// 8-bit unsigned or 16-bit signed PCM with 1 or 2 channels; output keeps the
8// same bit depth and channel count at dstRate. outNumSamples counts
9// interleaved samples (frames * channels), matching SoundWave::mNumSamples.
10bool AUD_ResamplePcm(const uint8_t* src,
11 uint32_t srcSize,
12 uint32_t bitsPerSample,
13 uint32_t numChannels,
14 uint32_t srcRate,
15 uint32_t dstRate,
16 std::vector<uint8_t>& outPcm,
17 uint32_t& outNumSamples);
bool AUD_ResamplePcm(const uint8_t *src, uint32_t srcSize, uint32_t bitsPerSample, uint32_t numChannels, uint32_t srcRate, uint32_t dstRate, std::vector< uint8_t > &outPcm, uint32_t &outNumSamples)
Definition AudioResample.cpp:6