StockAudioPlayer Question(s)

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

StockAudioPlayer Question(s)

Postby CS60 » April 30th, 2009, 12:14 am

I am trying to write program that will send notification sounds to a user. However, these notifications might be grouped together. (Three in rapid succession, for example.) Is there a way to force the StockAudioPlayer to finish the first sound before beginning the next one (or two)? I'm not familiar with your component(s), but I tried this:

StockAudioPlayer1.PlayStock(0);
StockAudioPlayer1.PlayStock(0);
StockAudioPlayer1.PlayStock(0);

Unfortunately, this generates an exception. (And a mis-spelling of the word "already" in the error dialog.)

Basically, what I would like to be able to do is this:

for x := 1 to 3 do
begin
Play Sound Here...
end;

In this case, each sound should play completely, and all three sounds should play.

Thanks.
CS60
Member
Member
 
Posts: 2
Joined: April 30th, 2009, 12:04 am

Re: StockAudioPlayer Question(s)

Postby Kambiz » April 30th, 2009, 2:25 am

Call

Code: Select all
StockAudioPlayer1.WaitForStop;

after each play.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: StockAudioPlayer Question(s)

Postby CS60 » April 30th, 2009, 3:01 pm

Kambiz wrote:Call

Code: Select all
StockAudioPlayer1.WaitForStop;

after each play.


Thank you. That worked perfectly....
CS60
Member
Member
 
Posts: 2
Joined: April 30th, 2009, 12:04 am


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 3 guests

cron