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

Invalid sample rate when using ASIO driver #252

Open
MiniMinnoww opened this issue Nov 4, 2022 · 1 comment
Open

Invalid sample rate when using ASIO driver #252

MiniMinnoww opened this issue Nov 4, 2022 · 1 comment

Comments

@MiniMinnoww
Copy link

I am trying to use the ASIO driver, as I need very low latency with audio being recorded straight in, and sent straight out again. However, when doing this, this error comes up:

Portaudio error in Pa_OpenStream: Invalid sample rate

Here is my code:

from pyo import *
pa_list_devices()
s = Server(winhost="asio", sr=44100)
s.boot()
s.start()
mic = Input().play().out()
h = Harmonizer(mic).out()


while True:
    pass

I have tried with 44100, 48000, and many other sample rates. My settings show my microphone is 44100, 2 channel 16bit.

@belangeo
Copy link
Owner

belangeo commented Dec 2, 2022

Maybe the default input and output devices are the one you expect... You can control the specific devices to use with Server.setInputDevice() and Server.setOutputDevice():

https://belangeo.github.io/pyo/api/classes/server.html#pyo.Server.setInputDevice
https://belangeo.github.io/pyo/api/classes/server.html#pyo.Server.setOutputDevice

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