Author |
Topic |
|
ctacke
877 Posts |
Posted - 04 Mar 2002 : 15:46:35
|
Q: I'm trying to set and get the volume for playing sound through my system, but calls to waveOutGetVolume and waveOutSetVolume consistently fail. What am I doing wrong?
The eMbedded Visual Tools Help file incorrectly states the input parameters for these functions. The Help file states that the first parameter is a "Handle to an open waveform-audio output device." Passing in a handle will fail. Instead you must pass in the DeviceID passed as Parameter 2 of waveOutOpen.
For further reading about Windows CE audio, please see the CE Audio topic index.
----------------- Chris Tacke, eMVP Applied Data Support |
|
tom.hill
16 Posts |
Posted - 14 Oct 2002 : 09:44:07
|
I call waveOutGetVolume with WAVE_MAPPER as the device id, cast as HWAVEOUT. The return value is MMSYSERR_BADDEVICEID. This is on a Bitsy CE 3.0, build 3.17. |
|
|
ms08233
17 Posts |
Posted - 13 Feb 2004 : 11:19:37
|
I too get MMSYSERR_BADDEVICEID when I try mr = waveOutSetVolume((HWAVEOUT)WAVE_MAPPER, dwVolume); mr = waveOutGetVolume((HWAVEOUT)WAVE_MAPPER, &dwVolume);
The waveOutGetVolume returns the same value passed in to waveOutSetVolume, but these calls have no apparent affect on the sound volume. I need more help on what I'm doing wrong!
BTW, these calls work fine on XP! They return NOERROR, and they do affect the sound volume. |
Edited by - ms08233 on 13 Feb 2004 11:22:44 |
|
|
whuh
23 Posts |
Posted - 13 Feb 2004 : 13:16:46
|
It seems that waveOutSetVolume() on CE doesn't do same as desktop Windows. First parameter should be device ID (0, 1, and etc) or Handle to an open waveform-audio output device.
Try as follows; mr = waveOutSetVolume(0, dwVolume); mr = waveOutGetVolume(0, &dwVolume);
|
|
|
|
Topic |
|
|
|