## StockAudioPlayer Question(s)

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

### StockAudioPlayer Question(s)

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

Posts: 2
Joined: April 30th, 2009, 12:04 am

### Re: StockAudioPlayer Question(s)

Call

Code: Select all
StockAudioPlayer1.WaitForStop;

after each play.
Kambiz

Kambiz

Posts: 2430
Joined: March 7th, 2003, 7:10 pm

### Re: StockAudioPlayer Question(s)

Kambiz wrote:Call

Code: Select all
StockAudioPlayer1.WaitForStop;

after each play.

Thank you. That worked perfectly....
CS60
Member

Posts: 2
Joined: April 30th, 2009, 12:04 am