Hello. I changed my code, but sound is not good yet.
This my code
Channel := BASS_StreamCreateFile(FALSE,
PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,BASS_UNICODE or BASS_STREAM_DECODE or BASS_STREAM_AUTOFREE);
If Channel = 0 Then
Channel := BASS_MusicLoad(FALSE,
PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
BASS_MUSIC_RAMP or BASS_MUSIC_DECODE or BASS_MUSIC_PRESCAN or BASS_MUSIC_AUTOFREE, 0);
If Channel = 0 then
Channel := BASS_WMA_StreamCreateFile(FALSE,
PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
BASS_UNICODE or BASS_STREAM_DECODE or BASS_STREAM_AUTOFREE);
If Channel = 0 then
Channel := BASS_FLAC_StreamCreateFile(FALSE,
PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
BASS_UNICODE or BASS_STREAM_DECODE or BASS_STREAM_AUTOFREE);
If Channel = 0 then
begin
Error('Selected file couldnt be loaded!');
exit;
end;
Channel := BASS_FX_TempoCreate(Channel, BASS_FX_FREESOURCE or BASS_STREAM_AUTOFREE);
If (Channel = 0) Then
begin
Error('Couldn''t create a resampled stream!');
BASS_StreamFree(Channel);
BASS_MusicFree(Channel);
exit;
End;
FX_parameq := BASS_ChannelSetFX(channel, BASS_FX_BFX_PEAKEQ, 0);
parameq.fGain := 0;
parameq.fQ := 0;
parameq.fBandwidth :=0.5;
parameq.lChannel := BASS_BFX_CHANALL;
for i := 0 to BandsCount-1 do begin
parameq.lBand := i;
parameq.fCenter := parameq_bands[i];
BASS_FXSetParameters(FX_parameq, @parameq);
end;
In trackbars OnChange notify I use this code
BASS_FXGetParameters(FX_parameq, @parameq);
parameq.lBand:=TrackBarIndex-1;
parameq.fgain :=TrackBar.Value-15;
BASS_FXSetParameters(FX_parameq, @parameq);
I use this bands 31,63,125,170,250,310,600,1000,1500,2000,3000,4000,6000,8000,10000,12000,14000,16000
And when I used 44, 63, 88, 125, 177, 250, 354, 500, 707, 1000, 1414, 2000, 2828, 4000, 5657, 8000, 11314, 16000, I too had bad sound.