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?
Thanks in advance for your response.
Jim Voelker
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