spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
982 stars 145 forks source link

Error opening output stream on big sur 11.4 #354

Closed theJohnnyBrown closed 2 years ago

theJohnnyBrown commented 2 years ago

Sounddevice version is 0.4.1

✗ ipython
Python 3.9.5 (default, May  4 2021, 03:36:27) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import sounddevice as sd

In [2]: IN =  'BlackHole 16ch'
   ...: OUT = 'External Headphones'
   ...: 
   ...: 

In [3]: output = sd.OutputStream(channels=2, blocksize=0, latency="low", device=OUT)
||PaMacCore (AUHAL)|| Error on line 1316: err='-66748', msg=Unknown Error
---------------------------------------------------------------------------
PortAudioError                            Traceback (most recent call last)
<ipython-input-3-69d2b4031cc5> in <module>
----> 1 output = sd.OutputStream(channels=2, blocksize=0, latency="low", device=OUT)

/usr/local/lib/python3.9/site-packages/sounddevice.py in __init__(self, samplerate, blocksize, device, channels, dtype, latency, extra_settings, callback, finished_callback, clip_off, dither_off, never_drop_input, prime_output_buffers_using_stream_callback)
   1486 
   1487         """
-> 1488         _StreamBase.__init__(self, kind='output', wrap_callback='array',
   1489                              **_remove_self(locals()))
   1490 

/usr/local/lib/python3.9/site-packages/sounddevice.py in __init__(self, kind, samplerate, blocksize, device, channels, dtype, latency, extra_settings, callback, finished_callback, clip_off, dither_off, never_drop_input, prime_output_buffers_using_stream_callback, userdata, wrap_callback)
    890             userdata = _ffi.NULL
    891         self._ptr = _ffi.new('PaStream**')
--> 892         _check(_lib.Pa_OpenStream(self._ptr, iparameters, oparameters,
    893                                   samplerate, blocksize, stream_flags,
    894                                   callback_ptr, userdata),

/usr/local/lib/python3.9/site-packages/sounddevice.py in _check(err, msg)
   2736         raise PortAudioError(errormsg, err, hosterror_info)
   2737 
-> 2738     raise PortAudioError(errormsg, err)
   2739 
   2740 

PortAudioError: Error opening OutputStream: Internal PortAudio error [PaErrorCode -9986]

In [4]: 
mgeier commented 2 years ago

Same error code as #299 and #318, does that help?

mgeier commented 2 years ago

I'm closing this as a duplicate. If it's not, please leave a comment.

theJohnnyBrown commented 2 years ago

That did help, thanks!

On Sat, Oct 16, 2021, 5:07 AM Matthias Geier @.***> wrote:

Closed #354 https://github.com/spatialaudio/python-sounddevice/issues/354.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spatialaudio/python-sounddevice/issues/354#event-5472853455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABIQETMIAGNLF4E3254SCLUHE6GBANCNFSM5ANUW2QA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.