 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dave Smith Guest
|
Posted: Wed Jun 16, 2004 4:51 am Post subject: How do I interrupt a playing wave file? |
|
|
My app has to play a wave file and it has to be able to interrupt what is
playing (if anything) to play its sound. I tried using:
playsound(nil,0,0);
playsound(mysound, etc.);
This did not work for some reason. Does anyone know how it can be
accomplished?
Dave
|
|
| Back to top |
|
 |
Tomaz Koritnik Guest
|
Posted: Sat Jun 19, 2004 7:36 am Post subject: Re: How do I interrupt a playing wave file? |
|
|
Hi
I don't know this for PlaySound function. It may play until end is
reached. To have more control over playing sound, you should check the
waveOutXXX (waveOutOpen, waveOutWrite,...) API functions. It's more complex
and not so easy to use as PlaySound but gives you full control.
regards
Tomaz
"Dave Smith" <djsmith9 (AT) pacbell (DOT) net> wrote
| Quote: | My app has to play a wave file and it has to be able to interrupt what is
playing (if anything) to play its sound. I tried using:
playsound(nil,0,0);
playsound(mysound, etc.);
This did not work for some reason. Does anyone know how it can be
accomplished?
Dave
|
|
|
| Back to top |
|
 |
Dave Smith Guest
|
Posted: Sat Jun 19, 2004 10:18 pm Post subject: Re: How do I interrupt a playing wave file? |
|
|
Do you know if waveOut can do that? I started to look at it but
wasn't sure if I was wasting my time or not.
I have concluded that playsound will only interrupt something playing in
it's own application space. Actually, I would prefer if it just played my
sound on top of the other sound, or interrupted it, played my sound, the
resumed playing the other thing.. Fancier than what playSound can do.
Thanks.
Tomaz Koritnik <nospam (AT) nospam (DOT) com> wrote
| Quote: | Hi
I don't know this for PlaySound function. It may play until end is
reached. To have more control over playing sound, you should check the
waveOutXXX (waveOutOpen, waveOutWrite,...) API functions. It's more
complex
and not so easy to use as PlaySound but gives you full control.
regards
Tomaz
"Dave Smith" <djsmith9 (AT) pacbell (DOT) net> wrote in message
news:40cfd24c (AT) newsgroups (DOT) borland.com...
My app has to play a wave file and it has to be able to interrupt what
is
playing (if anything) to play its sound. I tried using:
playsound(nil,0,0);
playsound(mysound, etc.);
This did not work for some reason. Does anyone know how it can be
accomplished?
Dave
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|