DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   Watched TopicsWatched Topics     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

StockAudioPlayer - Start playing wave in the middle

 
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
jvoelker
Member


Joined: 01 Dec 2006
Posts: 1

PostPosted: 04/12/06 02:14    Post subject: StockAudioPlayer - Start playing wave in the middle Reply with quote

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);
begin
StockAudioPlayer.PlayFile(WaveFile.Caption);
StockAudioPlayer.WaitForStart;
StockAudioPlayer.Paused := True;
StockAudioPlayer.Position := 2000;
StockAudioPlayer.Paused := False;
end;

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?

Thanks.

Jim Voelker
Back to top
View user's profile Send private message
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1113
Location: Tehran, Iran

PostPosted: 05/12/06 01:31    Post subject: Reply with quote

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.

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Page 1 of 1

Add to favorites

 
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group