Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change FaustLive sampling rate on Windows #35

Open
nyanpasu64 opened this issue Oct 1, 2020 · 5 comments
Open

Cannot change FaustLive sampling rate on Windows #35

nyanpasu64 opened this issue Oct 1, 2020 · 5 comments

Comments

@nyanpasu64
Copy link

I'm running Windows 10 1909, and FaustLive 2.14.4.

image

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.

@sletz
Copy link
Member

sletz commented Oct 1, 2020

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).

@nyanpasu64
Copy link
Author

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.

@sletz
Copy link
Member

sletz commented Oct 1, 2020

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.

@nyanpasu64
Copy link
Author

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.

@sletz
Copy link
Member

sletz commented Oct 1, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants