-
Notifications
You must be signed in to change notification settings - Fork 149
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
check_input_settings does not raise exception for some unsupported sample rates on macOS #505
Comments
Is there another way to determine whether or not a given sample rate is supported on macOS? I tried using a stream to record, like this:
hoping that the initializer might raise an exception for an unsupported sample rate, but it does not. The |
|
python-sounddevice/sounddevice.py Lines 680 to 683 in 65d3bc0
Can you please ask your question at https://github.com/PortAudio/portaudio/issues or at the PortAudio mailing list? |
Thanks for the suggestion. I'll look into this as a PortAudio issue. |
Any news on this? |
Thanks for the reminder. This slipped through the cracks, and I did not create a PortAudio issue. I'm reviewing the problem now and will follow up. |
When I opened this issue I was working with sounddevice 0.4.6 and PortAudio 19.6.0, and when I run the script I provided in my initial comment with those now it crashes with the same error message |
On my 2019 MacBook Pro running macOS 13.6.1, the following script:
(you might need to modify the device index for a different computer) first checks if the specified input settings are supported and then, if they are (i.e. if the call to
check_input_settings
does not raise an exception), attempts to record for one second with those settings. For my Mac's built-in microphone this works as expected for a sample rate of 44100 Hz. For various other sample rates, however, including 48000, 24000, and 22050 Hz, it does not. For those sample rates the call tocheck_input_settings
does not raise an exception, but the script terminates inside the call torec
with the console message:It seems that this may be a bug in
check_input_settings
, which should raise an exception for unsupported sample rates.The text was updated successfully, but these errors were encountered: