Hi,
I'm new to bass and i think it's the most useful and simple lib to use

BUT when making a test player in delphi at the end of channel play i hear a popping sound.
What can i do to eliminate this (tried autofree flag, bigger buffer length flag nothing worked)?
Here's my very simple code:
load button
procedure TForm1.loadbtnClick(Sender: TObject);
begin
BASS_Init(-1, 44100, 0, 0, nil);
chn := BASS_StreamCreateFile(FALSE, pansichar('s.mp3'), 0, 0, BASS_STREAM_PRESCAN);
statusgauge.MaxValue := BASS_ChannelGetLength(chn,BASS_POS_BYTE);
end;
play/pause button
procedure TForm1.playbtnClick(Sender: TObject);
begin
if playbtn.Tag = 0 then
begin
playbtn.Imageindex := 2;
BASS_ChannelPlay(chn, False);
playbtn.Tag := 1;
end else
begin
playbtn.Imageindex := 0;
BASS_ChannelPause(chn);
playbtn.Tag := 0;
end;
end;
stop button:
procedure TForm1.stopbtnClick(Sender: TObject);
begin
BASS_ChannelStop(chn);
BASS_ChannelSetPosition(chn,0,BASS_POS_BYTE);
playbtn.Imageindex := 0;
playbtn.Tag := 0;
end;
and the last... timer for updating the progress bar
procedure TForm1.infoupdtimerTimer(Sender: TObject);
begin
if chn <> 0 then begin
statusgauge.Progress := BASS_ChannelGetPosition(chn, 0)
//BASS_ChannelBytes2Seconds(chn, BASS_ChannelGetPosition(chn, 0));
end;
At the end of file it's always popping but if i do play/pause or stop it's okay and very smooth.
Regards,
Laurent