StockAudioPlayer - Start playing wave in the middle

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

StockAudioPlayer - Start playing wave in the middle

Postby jvoelker » December 4th, 2006, 2:14 am

Great components! I am having a problem with StockAudioPlayer. I want to start playing a wave file in the middle but when I do, the position counter does not work. The value of StockAudioPlayer.position does not match the position being played.

As a demonstration, I added these lines to the Demo Sound Recorder:

procedure TMainForm.btnPlayClick(Sender: TObject);
StockAudioPlayer.Paused := True;
StockAudioPlayer.Position := 2000;
StockAudioPlayer.Paused := False;

If you record a 10 second clip and click play, the wave file starts playing 2 seconds into the file as it should but the value of StockAudioPlayer.position shows that it starts at zero and ends at 8.

I am using a trackbar to show the position in the file but it does not work because of this if I start playing the wave file in the middle.

Is this intended or a bug?


Jim Voelker
Active Member
Active Member
Posts: 9
Joined: December 1st, 2006, 10:57 pm

Postby Kambiz » December 5th, 2006, 1:31 am

That's a bug and would be fixed on the next release. As you said, the wave plays as expected but the initial offset is not included in the reported position.

Thank you for reporting it.
User avatar
Posts: 2412
Joined: March 7th, 2003, 7:10 pm

Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 1 guest