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

Will not direct sound to headphones when they are plugged in #9805

Closed
nagisa opened this issue Jun 20, 2017 · 3 comments
Closed

Will not direct sound to headphones when they are plugged in #9805

nagisa opened this issue Jun 20, 2017 · 3 comments

Comments

@nagisa
Copy link
Contributor

nagisa commented Jun 20, 2017

If you plug the headphones in after you start the game, no sound will be audible until the emulator is restarted.

Happens with both the audio backends on Windows 10.

Reproduction steps:

  • Unplug the headphones;
  • Start the emulator;
  • Start a game;
  • Plug the headphones;
  • No sound will be audible;
  • Restart the emulator;
  • Start the game;
  • Audio will be audible.
@unknownbrackets
Copy link
Collaborator

I guess we should use MMDeviceAPI to detect this (OnDefaultDeviceChanged):
https://msdn.microsoft.com/en-us/library/windows/desktop/dd756609(v=vs.85).aspx

Maybe we could basically restart WASAPIAudioBackend::RunThread() in that situation (in case of different formats, etc...)

For DirectSound on pre-Vista, I guess we could either decide not to support this, or else periodically re-enumerate devices to see if the default changed... maybe there's a better way.

-[Unknown]

@hrydgard
Copy link
Owner

I set up the callback interface in https://github.com/hrydgard/ppsspp/tree/wasapi-audio-routing . However, when plugging/unplugging on my laptop, it works and I only get a bunch of property changes, not OnDefaultDeviceChagned which is what I'd expect to see if there's a problem...

@unknownbrackets
Copy link
Collaborator

Strange, I am getting OnDefaultDeviceChanged (when changing it in the audio settings.)

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants