Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ao/wasapi: add ao hotplug #1738

Merged
merged 1 commit into from
Mar 31, 2015
Merged

Conversation

kevmitch
Copy link
Member

Create a second copy of the change_notify structure for the hotplug
ao. The hotplug change_notify is distinguished by not having its
"monitored" member set since it does not watch a single device.

@ghost
Copy link

ghost commented Mar 30, 2015

Does this consider the fact that calling ao_request_reload() on the hotplug ao does nothing? (I'm not sure if you rely on this somehow, but it seems it can be called.)

@kevmitch
Copy link
Member Author

I have ensured that calling ao_request_reload() on hotplug and ao_hotplug_event on the real ao doesn't happen. In the hotplug "monitored" is null. I've made it a little clearer by putting the request_reload into else if clauses where appropriate.

Should I just add an is_hotplug member to make this clearer?

@ghost
Copy link

ghost commented Mar 30, 2015

Should I just add an is_hotplug member to make this clearer?

Yep, sounds like a good idea.

Btw., the usual prefix here is ao_wasapi (with a _, not /).

Other than that I have no further comments.

Create a second copy of the change_notify structure for the hotplug
ao. change_notify->is_hotplug distinguishes the hotplug version from
the regular one monitoring the currently playing ao. Also make the
change notification less verbose now that there might be two of them around.
@kevmitch kevmitch merged commit a6bf38b into mpv-player:master Mar 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant