Audio length and position discrepancy

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

Audio length and position discrepancy

Postby jvoelker » May 19th, 2007, 5:36 pm

When using the StockAudioPlayer to play a wave file loaded into WaveStorage there is a discrepancy between the reported position and length of the file. In the code below, WaveStorage1.Wave.Position displays a much larger number than WaveStorage1.Wave.Length at the end of the file.

Am I missing something?

Code: Select all
procedure TfrmWavePlayer.MultimediaTimer1Timer(Sender: TObject);
begin
  TrackBarPosition.Max := WaveStorage1.Wave.Length;
  TrackBarPosition.Position := WaveStorage1.Wave.Position;
  lblLength.Caption := Long2StrS(WaveStorage1.Wave.Length);
  lblPosition.Caption := Long2StrS(WaveStorage1.Wave.Position);
end;


Thanks in advance for your response.

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

Postby jvoelker » May 19th, 2007, 5:43 pm

Sorry. I was missing the fact that I should have been looking at StockAudioPlayer1.Position. Sorry for the post.

Thanks.

Great components!

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


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron