| Summary: | XAudio2 driver hangs thread after audio device is disabled/disconnected | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Damir Veapi <damir.veapi> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.5 | ||
| Hardware: | x86 | ||
| OS: | Windows 8 | ||
| Attachments: | sample for reproduction | ||
This should be fixed in revision control. --ryan. Going to resolve this bug for now, since this is believed to be fixed, and XAudio2 is going away anyhow. --ryan. |
Created attachment 2704 [details] sample for reproduction XAudio2 doesn't handle device disconnect well. It looks like it hangs the thread and prevents the application from exiting. Steps to reproduce: 1. Play audio with SDL. 2. Disconnect your speakers/headphones, or disable them in the "Playback devices" panel. 4. Re-enable or reconnect the speakers. 3. Quit the SDL app. Expected result: The sound should resume playing when the audio device is reconnected. App should close neatly without leaving a lingering process. What happens: There is no sound after reconnecting the audio device (step 4), nor does it switch to another device when available. When the app quits, it seemingly closes, but a lingering process remains. Workaround: Use 'directmedia' audio driver on Windows. I am attaching an example SDL app, which you can use to reproduce and test the issue.