All Forums
 Microsoft Windows CE
 eVC Application Development
 Volume settings with waveOutSetVolume
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

ctacke

877 Posts

Posted - 04 Mar 2002 :  15:46:35  Show Profile  Email Poster
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  Show Profile  Email Poster
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.
Go to Top of Page

ms08233

17 Posts

Posted - 13 Feb 2004 :  11:19:37  Show Profile  Email Poster
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
Go to Top of Page

whuh

23 Posts

Posted - 13 Feb 2004 :  13:16:46  Show Profile  Email Poster
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);
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000