Modify the system volume in a PocketC program

Discuss PocketC for CE (including Desktop Edition)

Postby Guillaume on Sun Sep 08, 2002 3:46 pm

Do you know if it is possible to create a code that can modify the system volume in PocketC ?
Thanks for your support!
Guillaume
 
Posts: 6
Joined: Tue Jun 04, 2002 11:57 am
Location: France

Postby guy on Mon Sep 09, 2002 11:51 am

By the "System Volume", do you mean the object store, or do you mean the volume of the sound output?

If you mean the sound output volume, then you can do this with the waveOutSetVolume() function:

waveOutSetVolume(WAVE_MAPPER, 0xffffffff) ; // Full volume
waveOutSetVolume(WAVE_MAPPER, 0x00000000) ; // Silent
waveOutSetVolume(WAVE_MAPPER, 0xffff0000) ; // Full on right, silent on left

You need to install the developer CEAPI library for PocketC, then #include /pocketc/mmsystem.h in your PocketC source file.

The documentation for waveOutSetVolume() is at:

http://msdn.microsoft.com/library/en-us/wcesdkr/htm/_wcesdk_Win32_waveOutSetVolume.asp?frame=true

If you distribute a program that uses the CEAPI library you have to either include the library for each platform in your distribution, or tell the users where to get the runtime.

You can download CEAPI for PocketC by following the link in my sig below.

If you have a PocketPC2002 the installation will tell you that it wasn't designed for your hardware. It was, install it regardless.





Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 4 guests

cron