seandynan
2010-04-21 14:35:01 UTC
Hi
My 32-bit, native C++ app uses XAudio2, and all is well.
Except:
On Windows 7, when I unplug my headphones or speakers during live playback
the OnCriticalError(HRESULT err) event handler is called. The HRESULT is
LEAP_E_INVALID_CALL (0x88880001). I would have expected
XAUDIO2_E_DEVICE_INVALIDATED (0x8896004). In any case this causes the
tear-down of my XAudio2 instance.
(1) Is this the expected behaviour for XAudio2? Is the removal of
headphones or speakers considered a critical error?
(2) There doesn't appear to be an XAudio2 callback to notify on the
insertion of external devices. So how would you recommend I detect when
headphones/speakers are plugged back in again?
Thanks!
My set-up:
Dell Precision T3400 & Dell Optiplex 755
Windows 7 Enterprise (64-bit & 32-bit)
Visual Studio 2008 SP1
DirectX SDK & runtime (February 2010)
My 32-bit, native C++ app uses XAudio2, and all is well.
Except:
On Windows 7, when I unplug my headphones or speakers during live playback
the OnCriticalError(HRESULT err) event handler is called. The HRESULT is
LEAP_E_INVALID_CALL (0x88880001). I would have expected
XAUDIO2_E_DEVICE_INVALIDATED (0x8896004). In any case this causes the
tear-down of my XAudio2 instance.
(1) Is this the expected behaviour for XAudio2? Is the removal of
headphones or speakers considered a critical error?
(2) There doesn't appear to be an XAudio2 callback to notify on the
insertion of external devices. So how would you recommend I detect when
headphones/speakers are plugged back in again?
Thanks!
My set-up:
Dell Precision T3400 & Dell Optiplex 755
Windows 7 Enterprise (64-bit & 32-bit)
Visual Studio 2008 SP1
DirectX SDK & runtime (February 2010)
--
Sean
Sean