commit | 9ab809fec4417a2e107aef9aabb51b469f3b6e9e | [log] [tgz] |
---|---|---|
author | Ryan C. Gordon <icculus@icculus.org> | Fri Oct 07 15:13:46 2016 -0400 |
committer | Ryan C. Gordon <icculus@icculus.org> | Fri Oct 07 15:13:46 2016 -0400 |
tree | cedae4c3fe36250596652d0bed2547bd49a47f91 | |
parent | 46e54b15e823df2fa9ae02004991ce040a6e4832 [diff] |
audio: Don't trust audio drivers to drain pending audio. This tends to be a frequent spot where drivers hang, and the waits were often unreliable in any case. Instead, our audio thread now alerts the driver that we're done streaming audio (which currently XAudio2 uses to alert the system not to warn about the impending underflow) and then SDL_Delay()'s for a duration that's reasonable to drain the DMA buffers before closing the device.