You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importsounddeviceassdprint(sd.query_device)
# some device info listed# then plug some new devicesd._terminate()
sd._initialize()
print(sd.query_device)
# device info list unchangedsd._terminate()
sd._ffi.dlclose(sd._lib)
sd._lib=sd._ffi.dlopen(sd._libname)
sd._initialize()
print(sd.query_device)
# device info list updated, it works fine# is it possible to close the dll when sd._terminate()# and reopen the dll when sd._initialize()# so that the device_list can be updated by re initialize sounddevice
The text was updated successfully, but these errors were encountered:
# is it possible to close the dll when sd._terminate()# and reopen the dll when sd._initialize()
Yes, I guess it would be possible, but the idea is that those two functions wrap the PortAudio functions Pa_Terminate() and Pa_Initialize(), respectively.
If additional functionality is desired, additional functions should be created.
But if the sequence of statements you mentioned is working for you, feel free to just use them in your code.
The text was updated successfully, but these errors were encountered: