PDA

View Full Version : Good Sound API for Windows Mobile?


VanKurt
13th October 2009, 09:41 PM
Hi guys! Me again :)

Just a quick question:
Is there a way to play sounds on Windows Mobile with adjustable volume?
I've already found the following API calls while Googling:

SndOpen(LPCTSTR pszSoundFile, HSOUND* phSound)
SndPlayAsync(HSOUND hSound, DWORD dwFlags)
SndClose(HSOUND hSound)
SndStop(SND_SCOPE SoundScope, HSOUND hSound)

But right now I can't see a way to affect the sound's volumes. Can anyone help?

Thanks! :o

MarcLandis
14th October 2009, 02:27 PM
try using FMOD (http://www.fmod.org/index.php/download#FMOD3ProgrammersAPI)

VanKurt
14th October 2009, 02:29 PM
Hell, there is FMOD for WinMob!?!? Great :D

Thank's for the tip!

VanKurt
14th October 2009, 02:46 PM
Aw, I forgot that FMOD isn't completely free :o

Maybe anyone has used OpenSL ES? That seems to be a free sound library specially for mobile phones. But strangely there is NO material on Google about it...

shirreer
18th October 2009, 04:32 AM
Aw, I forgot that FMOD isn't completely free :o

Maybe anyone has used OpenSL ES? That seems to be a free sound library specially for mobile phones. But strangely there is NO material on Google about it...

Google WaveOutSetVolume; its the api you need to interact with WM's sound controls:
here is the declaration:
DllImport("coredll.dll")> _ Public Shared Function waveOutSetVolume(ByVal hwo As IntPtr, ByVal dwVolume As UInteger) As Integer

oh, and use winmm.dll if you want to use the same for windows instead of WM