How to play multiple sounds on WEC6-7? PlaySound? DirectSound? or other?

Hi,
This is likely one of those questions that will make you eyes roll up, please bear with me.
We need to be able to reproduce both a long wav file in loop together with a list of short wav files of 1-5 seconds.
We all know this is not possible by using the usual PlaySound / sndPlaySound API provided by the system.

The first alternative suggested on google is to pick DirectSound instead.
I have a few questions:

  1. Is it possible to have it on CE7? What does it take, do we need to import a dll on the device?
  2. Is it going to be as non-straigthforward and complex to use to develop as it has been (at least for me) with DirectShow?
  3. But mostly, how can we be user that it does support audio mixing compared to PlaySound? because here is it said it doesn’t support it for Vista, so I doubt it does for the WEC;
  4. Any help also in retrieving this API is highly appreciated.

PS: We have two line products, one running on T20 WEC7 and the other on VF61 WEC6, I’ll need to know for both of them

Thank you.

Colibri T20 256MB IT V1.2A , Custom board, WEC7 BSP 2.1; and
Colibri VF61 V1.2B, Custom board, WEC6 (I’ll add more details if needed)

DirectSound does support audio mixing, which allows multiple sounds or streams to be played simultaneously.

Please check these articles:

Thanks, I’ll give it a try.
If it does not work, I still have found a viable (even if not best) alternative in mixing the wav files beforehand, which might still be a viable solution, depending the project it gets used for, but we’ll see.

Hi @EnricoPompeiani ,

I just wanted to add something:
Actually the Wave Device on Windows CE has an integrated mixer.
The sndPlaySound() function limits the playback of only one Wave per process, but this is just an API limitation.
sndPlaySound() internally uses the WaveAudio APIs. Using those APIs you will have much more control on everything and will also be able to play multiple Wave in parallel.

Check documentation here:

Here you can also find some sample code:

Yes, I thought at some point it should have been possible to use the wave audio feature.
I’m still unsure if this is the kind of rabbit hole that I want to go in, but I guess at some point I’ll dive in it.

Thank you for your suggestion!