Hello. I have a problem with synchronizing playback with some kind of position bar in my app. To solve this issue first I used the CALLBACK function of BASS_ChannelSetSync:
void CALLBACK PlaySyncProc(HSYNC handle, DWORD channel, DWORD data, void *user)
{
int n=(int)user; // event number
BASS_ChannelSetPosition(event[n].stream, 0, BASS_POS_BYTE);
BASS_Mixer_StreamAddChannel(mixer, event[n].stream, 0);
event[n].MovePositionBar(); //Function which moves the bar to specified position
}
After compiling this I observed that position bar after calling first event (event[0]) was moved very fast, not according to previously specified time position. Next events are being called correctly, but the whole position bar movement is delayed by previous operation. It is very strange for me.
The second idea that I came up with was to use the timer (timesetEvent), unfortunately it had no accuracy in short intervals around 25 ms. I thought about using the BASS_ChannelGetPosition function to correct the position bar, but I cannot change the timer interval during playback...
I'll appreciate any help.
Thanks in advance.