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

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;

Jim Voelker
jvoelker
Active Member

Posts: 9
Joined: December 1st, 2006, 10:57 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

Posts: 9
Joined: December 1st, 2006, 10:57 pm