[Windows] AudioEngine testers - Windows platform only
Hello everyone

I recently stumbled on an issue that I didn't have before. My setup uses EventGhost to auto start xbmc when resuming from sleep and my audio is connected through HDMI (AMD HDMI). I'm using Catalyst 12.3.
The issue is that when resuming from sleep it takes up to 10 seconds for the Audio device to go from enabled + "not plugged in" to enabled and "active". I noticed in the XBMC source code that enumeration uses DEVICE_STATE_ACTIVE only as a valid status for the device. As a result of that if XBMC is starting up during that timeframe, it doesn't detect the HDMI Audio device, resulting in no sound whatsoever.

This not being very practical, you can do two things. a) build in a wait for 10 seconds in EventGhost (but how long? maybe there's variance in how quickly the HDMI Audio gets reconnected after wake up?) or b) wait for the device to become active before starting XBMC.

So I wrote a little C++ program that follows the same logic of device enumeration and properties listing (actually textbook example from MS documentation), but as the valid status I took DEVICE_STATE_ACTIVE | DEVICE_STATE_UNPLUGGED, which also gives me the unplugged devices. The program is a command-line console app that takes a few arguments, 1. the GUID of the device you want to wait for, 2. the number of milliseconds between probing the device's status, and 3. the max number of probes. When the app runs, it will probe the device until it becomes "active" and will then immediately exit. I've tried it with my EventGhost setup - so it runs right after wake up and will fire up XBMC as soon as it ends. If anyone interested, let me know I'll post the app on the forum.

This leaves me to think that other people might have the same issue and that allowing "unplugged" devices is something that could potentially be brought into the XBMC code base (as a third option to solve this). This way we wouldn't need this kind of utility anymore. Apparently there's also an event that's being fired as soon as the device becomes "active", so waiting/probing might not even be needed...

Regards - Voyager
Reply


Messages In This Thread
[No subject] - by GreenEyez - 2012-03-04, 12:35
[No subject] - by liquidskin76 - 2012-03-04, 14:01
[No subject] - by Dixon Butz - 2012-03-04, 14:55
[No subject] - by P-I H - 2012-03-04, 17:16
[No subject] - by DDDamian - 2012-03-04, 20:12
[No subject] - by P-I H - 2012-03-04, 20:43
[No subject] - by DDDamian - 2012-03-04, 20:47
[No subject] - by P-I H - 2012-03-04, 22:27
[No subject] - by DDDamian - 2012-03-04, 22:37
[No subject] - by liquidskin76 - 2012-03-05, 02:42
[No subject] - by DDDamian - 2012-03-05, 05:07
[No subject] - by liquidskin76 - 2012-03-05, 10:55
[No subject] - by P-I H - 2012-03-05, 12:48
[No subject] - by DDDamian - 2012-03-06, 04:31
New build posted - by DDDamian - 2012-03-06, 11:08
[No subject] - by liquidskin76 - 2012-03-06, 13:51
[No subject] - by P-I H - 2012-03-06, 21:43
[No subject] - by DDDamian - 2012-03-07, 00:31
[No subject] - by DDDamian - 2012-03-07, 01:22
[No subject] - by liquidskin76 - 2012-03-07, 01:48
[No subject] - by DDDamian - 2012-03-07, 01:52
[No subject] - by -JK- - 2012-03-07, 02:08
[No subject] - by DDDamian - 2012-03-07, 09:30
[No subject] - by liquidskin76 - 2012-03-07, 11:04
[No subject] - by DDDamian - 2012-03-07, 15:53
[No subject] - by DDDamian - 2012-03-07, 16:52
[No subject] - by P-I H - 2012-03-07, 18:17
[No subject] - by DDDamian - 2012-03-07, 18:26
[No subject] - by P-I H - 2012-03-07, 18:31
[No subject] - by -JK- - 2012-03-07, 18:33
[No subject] - by DDDamian - 2012-03-08, 01:47
[No subject] - by -JK- - 2012-03-09, 01:44
[No subject] - by DDDamian - 2012-03-09, 02:25
[No subject] - by HeresJohnny - 2012-03-09, 08:41
[No subject] - by DDDamian - 2012-03-09, 08:58
[No subject] - by -JK- - 2012-03-11, 02:10
Audio clamping - by PanDaMan - 2012-04-30, 00:56
RE: [Windows] AudioEngine testers - Windows platform only - by Voyager - 2012-05-15, 12:23
Logout Mark Read Team Forum Stats Members Help
[Windows] AudioEngine testers - Windows platform only3