Hello guys, If I understand correctly, when playing a sound file (like in the AudioSampleBuffer tutorial) I should be sure to resample the file to match the output sample rate for correct playback.
What is the standard way of doing this sample rate conversion? I thought about resampling the data(linear interp maybe) off-line but if the output sample rate changes while the plugin is running, the buffer should be resampled again.
How do audio players handle this kind of stuff? Real-time resampling with linear interpolation?
Really interested to know what is the common aproach when, for example, playing 44100Hz audio with a device output of 48000hz, or what resampling methods are used, etc.
Thanks in advance! And sorry if this is pretty much common knowledge, just don’t want to get into bad practices.
Edit: In case it’s confusing, Im asking about playing audio from a sound file inside the plugin, not taking the input from the host for processing like an audio effect. I guess it’s more like what a sampler plugin would do.