My output sample rate is 48kHz (on my iMac/Windows), but may well probably be 44.1kHz on another platform.
My input files are 44.1kHz, although I could recreate them at 48kHz.
I want to avoid duplicating resources @44.1 and 48.
My WAVs are short; < 10s, and I read them into a buffer upon load.
So I think what I'm after is some third party resampler algo.
I'm not sure if I trust linear interpolation...
Can anyone recommend something?
EDIT: found https://ccrma.stanford.edu/~jos/resample/
PS I was surprised I can't set the output sample rate:
pOutputDeviceManager = new AudioDeviceManager(); auto deviceSetup = AudioDeviceManager::AudioDeviceSetup(); deviceSetup.sampleRate = 44100; pOutputDeviceManager->initialise( 0, // numInputChannelsNeeded 2, // numOutputChannelsNeeded nullptr, // XML true, // selectDefaultDeviceOnFailure String(), // preferredDefaultDeviceName &deviceSetup // preferredSetupOptions ); DBG(pOutputDeviceManager->getCurrentAudioDevice()->getCurrentSampleRate()); // 48000 for (auto s : pOutputDeviceManager->getCurrentAudioDevice()->getAvailableSampleRates()) DBG(s); // one item: 48000