Page 1 of 1

Audio length and position discrepancy

PostPosted: May 19th, 2007, 5:36 pm
by jvoelker
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

PostPosted: May 19th, 2007, 5:43 pm
by jvoelker
Sorry. I was missing the fact that I should have been looking at StockAudioPlayer1.Position. Sorry for the post.

Thanks.

Great components!

Jim Voelker