Hi

Does anyone know how to playing a set of short WAV files without delay?

I was using the following, but there is a delay in-between.

PlaySound("a.wav",NULL,NULL);//PLAY WAV SOUND ONCE
PlaySound("b.wav",NULL,NULL);//PLAY WAV SOUND ONCE


or I need to concatnate a few sets of short WAV files into one descriptor so that I can play them smoothly without delay.
If so, how to?


Thanks in advance.

Recommended Answers

All 3 Replies

Does your PlaySound() function also load the sound file into memory?

If it does then you should load them before then use that to just play them.

do you mean that I need to load the several wave files (in this case, a.wav, b.wav) into the memory first.

then, I can playsound() on them without any delay?


I've tried to use SND_ASYNC parameter, i.e.

PlaySound("a.wav",NULL,SND_ASYNC);//PLAY WAV SOUND ONCE
PlaySound("b.wav",NULL,SND_ASYNC);//PLAY WAV SOUND ONCE

however, the result is b.wav is played when a.wav hasn't finished.

any help please?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.