| View previous topic :: View next topic |
| Author |
Message |
jvoelker Member
Joined: 01 Dec 2006 Posts: 1
|
Posted: 04/12/06 02:14 Post subject: StockAudioPlayer - Start playing wave in the middle |
|
|
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 |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1113 Location: Tehran, Iran
|
Posted: 05/12/06 01:31 Post subject: |
|
|
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 |
|
 |
|