Open nyanpasu64 opened 4 years ago
What is the actual audio interface you are using ? You may have to change the sampling rate directly on it (that is using a configuration tool that is part of the audio interface).
My default audio input is a VB-Audio cable running at either 32000 Hz or 96000 Hz. My default audio output is a Realtek interface set to either 48000 Hz or 96000 Hz. No matter what combination I pick, FaustLive's preferences panel claims it's running at 44100 Hz.
Then I guess it is a limitation of the PortAudio layer we are using to to access audio card. Nothing easy we can do since AFAICS PortAudio does not have any resampling feature.
I enabled the sampling rate printout in my patch, and found that the patch is indeed running at 44100 Hz both before and configuring FaustLive to use 96000 instead.
I think it's more a result of how you're using PortAudio, than a limitation of PortAudio itself. 44100 comes up several times in the source code in src/Audio/PA
used to configure PortAudio. I theorize that when FaustLive runs at 44100 Hz, Windows resamples all input-device audio to 44100 Hz before sending it to Faust, then resamples Faust's 44100 Hz output to the currently configured output-device rate.
I'll look more into this once I get FaustLive to build.
OK, the PortAudio code in FL is there : https://github.com/grame-cncm/faustlive/tree/master/src/Audio/PA and it also uses a PortAudio file which is part of the Faust repository here: https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/audio/portaudio-dsp.h
I'm running Windows 10 1909, and FaustLive 2.14.4.
If I change the sampling rate, either with a patch open or not, reopening the Preferences dialog reveals the sampling rate is still at 44100 Hz. And setting the sampling rate to 1000-8000 Hz does not muffle synthesizer files as expected, meaning the sampling rate does not take effect.