🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.multimedia
1 messages
1 total messages Started by A.Gil Tue, 02 Sep 2003 18:27
PlaySound and threads?
#576
Author: A.Gil
Date: Tue, 02 Sep 2003 18:27
21 lines
1814 bytes
Hi,
I want to use PlaySound for playing a simple wav file when a special 
condition occurs in my application.

So, to test it, in the OnClick event of a button:
      PlaySound("Ring.wav", NULL, SND_FILENAME |  SND_ASYNC);

Well, I realized that when I press the button for the first time, the 
number of threads of my application increases in 2, and when the sound 
is playing in 3. When the sound finishes this third thread ends.
But the other 2 threads are not terminated(I suppose this has a relation 
with allocation of MCI resources).
Since I only want to play the sound one time, how can I terminate these 
threads?
(I tried : PlaySound(NULL, NULL, SND_FILENAME | SND_ASYNC); but it 
didn't work.)

Thanks.
Andres G.

(Excuse me for my poor English).
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads