spatialaudio / python-sounddevice

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

Add PaWasapi_UpdateDeviceList to cdef #486

Closed mgeier closed 9 months ago

mgeier commented 10 months ago

Closes #484.

Swiftgti commented 10 months ago

Hi, I modified sounddevice and build a new FFI with function PaWasapi_UpdateDeviceList , BUT PortAudio can't open new streams for new devices detected, for that must be used the UpdateAvailableDeviceList that is in the fork of jitsi. It's a PortAudio fork powered with necessary features like the hotplug capabilities. There is any way to use PortAudio of jitsi ? or support it like an option? or move the project to use that fork? Have a nice day.

mgeier commented 9 months ago

See my answer at https://github.com/spatialaudio/python-sounddevice/issues/484#issuecomment-1703176427

tihoangyeudau commented 9 months ago

how to use this Merge? for example, if I change output sound device, can this make it's loopback list update forward it realtime?

mgeier commented 9 months ago

I have never used this myself, so I don't really know, but you can try something like this:

import sounddevice as sd

sd._lib.PaWasapi_UpdateDeviceList()
tihoangyeudau commented 9 months ago

I have never used this myself, so I don't really know, but you can try something like this:

import sounddevice as sd

sd._lib.PaWasapi_UpdateDeviceList()

thank you so much, I will try it and confirm if it would work

tihoangyeudau commented 9 months ago

I have never used this myself, so I don't really know, but you can try something like this:

import sounddevice as sd

sd._lib.PaWasapi_UpdateDeviceList()

It did not work bro