music out of sync

Started by selmiak, Sat 02/02/2013 01:54:12

Previous topic - Next topic

selmiak

thanks to khris I'm using this nifty crossfader code and it works really good. But, yeah, here comes the but, but butt when I'm starting 3 tracks at once with
channel 1 = aTrack1.Play(eAudioPriorityNormal, eRepeat);
and so on the first 2 tracks in the script are in sync thus started at the same time but track 3 is out of sync. Only by a bit, but(t) the 3 tracks are all recorded in sync to be faded all around like a pink floyd record so yeah, it is hearable. Is hearable even a word? I have the bad feeling the answer is the audio system in AGS but maybe there is a way to start them all on the very same milisecond. They are just 3 lines in the script but one channel/track seems to take some cycles longer to start.

Khris

Try this:
Code: ags
  AudioChannel *channel1 = aTrack1.Play(eAudioPriorityNormal, eRepeat);
  AudioChannel *channel2 = aTrack2.Play(eAudioPriorityNormal, eRepeat);
  Wait(10);
  AudioChannel *channel3 = aTrack3.Play(eAudioPriorityNormal, eRepeat);
  channel3.Seek(250);   // <- play with this number to sync them perfectly

SMF spam blocked by CleanTalk