BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I interrupt a playing wave file?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia
View previous topic :: View next topic  
Author Message
Dave Smith
Guest





PostPosted: Wed Jun 16, 2004 4:51 am    Post subject: How do I interrupt a playing wave file? Reply with 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
Tomaz Koritnik
Guest





PostPosted: Sat Jun 19, 2004 7:36 am    Post subject: Re: How do I interrupt a playing wave file? Reply with 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

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





PostPosted: Sat Jun 19, 2004 10:18 pm    Post subject: Re: How do I interrupt a playing wave file? Reply with quote




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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.