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
MMNotificationClient from pycaw.callbacks (which you should inherit in your own class unless you only want the basic prints for dev purpose, if it even have any), it has on_default_device_changed(), on_device_added(), on_device_removed(), on_device_state_changed(), and on_property_value_changed().
You probably want on_default_device_changed().
It would trigger for both eRender and eCapture, and on different roles as well, meaning it could show a change in default speakers as well as a change in default microphone, both for multimedia use or for communication use.
def on_default_device_changed(flow, flow_id, role, role_id, default_device_id):
Is fired, when the default endpoint device for a role changed.
flow : str
String explaining the data-flow direction.
flow_id: int
Id of the data-flow direction.
role : str
String explaining the role of the device.
role_id: int
Id of the role.
default-device_id: str
String containing the default device id.
I want to listen event of Switching default audio device in win32, how can i do? thank you so much?
The text was updated successfully, but these errors were encountered: