spatialaudio / python-sounddevice

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

No output when specifying a device #475

Open RenaKunisaki opened 1 year ago

RenaKunisaki commented 1 year ago

Not sure if this is just something weird with my system. The device list is:

>>> import sounddevice as sd
>>> sd.query_devices()
  0 HDA ATI HDMI: 0 (hw:0,3), ALSA (0 in, 8 out)
  1 hdmi, ALSA (0 in, 8 out)
  2 jack, ALSA (2 in, 2 out)
  3 pipewire, ALSA (64 in, 64 out)
  4 pulse, ALSA (32 in, 32 out)
* 5 default, ALSA (64 in, 64 out)
  6 Family 17h/19h HD Audio Controller Analog Stereo, JACK Audio Connection Kit (4 in, 2 out)
  7 IceCat, JACK Audio Connection Kit (2 in, 0 out)
  8 Renoir Radeon High Definition Audio Controller Digital Stereo (HDMI), JACK Audio Connection Kit (2 in, 2 out)
  9 PulseAudio Volume Control, JACK Audio Connection Kit (8 in, 8 out)

When I create an OutputStream and specify anything other than default for the device parameter, there's no output. The callback is called and no error shows up in the console, but no audio comes out any device, and pavucontrol doesn't show any output stream.

mgeier commented 1 year ago

Sorry, I don't know. It looks like you are using PipeWire. I haven't tried that yet.

Do other PortAudio applications work as expected?

RenaKunisaki commented 1 year ago

Honestly I don't know much about the audio subsystems. Other applications handle sound just fine, but I don't know what they're using.

Ultimately what I want is for my app to create multiple output streams, each automatically routed to a specific device (instead of having to manually route them in pavucontrol).

mgeier commented 1 year ago

Other applications handle sound just fine, but I don't know what they're using.

Well, I don't know either. Maybe do a quick web search to check?