When I start to play a mp3 sometimes there happen a small strange sound at the very first moment of playing the song. It lasts abot 0.1 second. Here is my code:
HSTREAM stream;
bool playing;
Bass_Init(-1,44100,0,Form1->Handle);
if (Bass_Start()==0) ShowMessage("BASS START ERROR");
void Play(String song)
{
if (stream!=NULL) Bass_StreamFree(stream);
stream=Bass_StreamCreateFile(0,song.c_str(),0,0,0);
if (stream==NULL) ShowMessage("ERROR OPENING FILE");
playing=Bass_StreamPlay(stream,0,0);
Bass_ChannelSetAttributes(stream,-1,volume,-1);
if (playing==0) ShowMessage("ERROR PLAYING FILE");
}
I don't know maybe I'm incorrectly freeing the stream? I'm totally stuck.