avid
March 21st, 2010, 09:18 PM
When my 6-year-old HTPC finally died, I have had to replace my very stable G4 GML on XP with new G5 GML on Windows 7. The first thing I tried to get working was the dynamic switching of audio betwen the TV and the HiFi speakers - this has always been achieved with mixer.SetDefaultWaveOutDeviceName().
Now, on Windows 7 with G5, I have some simple logging LUA:
for devId = 0, mixer.GetNumberWaveOutDevices()-1, 1 do
gir.LogMessage("Audio", "Dev ("..devId..") : "..mixer.GetWaveOutDeviceName(devId), a)
endwhich logs (e.g.) :
Time Date Source Details Payloads
04:52:26:215 3/23/2010 Audio Dev (3) : S/PDIF (M-Audio Delta Audiophil
04:52:26:215 3/23/2010 Audio Dev (2) : Realtek Digital Output (Realtek
04:52:26:215 3/23/2010 Audio Dev (1) : Speakers (Realtek High Definiti
04:52:26:215 3/23/2010 Audio Dev (0) : Line 1/2 (M-Audio Delta Audioph
If I manually change the default playback device (via the control panel or volume control taskbar icon), the log output correctly re-orders to (e.g.) :
Time Date Source Details Payloads
04:52:49:874 3/23/2010 Audio Dev (3) : S/PDIF (M-Audio Delta Audiophil
04:52:49:865 3/23/2010 Audio Dev (2) : Realtek Digital Output (Realtek
04:52:49:865 3/23/2010 Audio Dev (1) : Line 1/2 (M-Audio Delta Audioph
04:52:49:865 3/23/2010 Audio Dev (0) : Speakers (Realtek High Definiti
But I can't get mixer.SetDefaultWaveOutDeviceName() to work. And mixer.SetDefaultWaveOutDevice(1) doesn't work either. In all cases, the default output device remains unchanged, both in the Windows 7 UI and with my logging. And of course the sound continues to play from the old device. I have tried calling SetDefaultWaveOutDeviceName() with the truncated name that GetWaveOutDeviceName() returns and with the full name that the Windows UI displays - neither work.
Any ideas anyone?
Brian
Now, on Windows 7 with G5, I have some simple logging LUA:
for devId = 0, mixer.GetNumberWaveOutDevices()-1, 1 do
gir.LogMessage("Audio", "Dev ("..devId..") : "..mixer.GetWaveOutDeviceName(devId), a)
endwhich logs (e.g.) :
Time Date Source Details Payloads
04:52:26:215 3/23/2010 Audio Dev (3) : S/PDIF (M-Audio Delta Audiophil
04:52:26:215 3/23/2010 Audio Dev (2) : Realtek Digital Output (Realtek
04:52:26:215 3/23/2010 Audio Dev (1) : Speakers (Realtek High Definiti
04:52:26:215 3/23/2010 Audio Dev (0) : Line 1/2 (M-Audio Delta Audioph
If I manually change the default playback device (via the control panel or volume control taskbar icon), the log output correctly re-orders to (e.g.) :
Time Date Source Details Payloads
04:52:49:874 3/23/2010 Audio Dev (3) : S/PDIF (M-Audio Delta Audiophil
04:52:49:865 3/23/2010 Audio Dev (2) : Realtek Digital Output (Realtek
04:52:49:865 3/23/2010 Audio Dev (1) : Line 1/2 (M-Audio Delta Audioph
04:52:49:865 3/23/2010 Audio Dev (0) : Speakers (Realtek High Definiti
But I can't get mixer.SetDefaultWaveOutDeviceName() to work. And mixer.SetDefaultWaveOutDevice(1) doesn't work either. In all cases, the default output device remains unchanged, both in the Windows 7 UI and with my logging. And of course the sound continues to play from the old device. I have tried calling SetDefaultWaveOutDeviceName() with the truncated name that GetWaveOutDeviceName() returns and with the full name that the Windows UI displays - neither work.
Any ideas anyone?
Brian