ID:1307689
 
Applies to:
Status: Open

Issue hasn't been assigned a status value.
song_kick = sound(0, 1, 0, 1, 30)
song_snare = sound(0, 1, 0, 2, 30)
song_hat = sound(0, 1, 0, 3, 30)

song_kick.file = 'song_kick.ogg'
song_snare.file = 'song_snare.ogg'
song_hat.file = 'song_hat.ogg'

src << song_kick
src << song_snare
src << song_hat


If you have perfectly in sync audio files and play them together like this at the same time, they will play out of sync because the << operator sends the audio to the client at different times.

I am requesting that these "calls" are "aligned" within the current tick some-how. If this was implemented, you could create a dynamic music system that changes the instrumentation of a song as events happen in the game. Currently this is not possible to do until there is a way to lock-in the start time of all the "Stems" forming the song. DM currently gives us no feedback of when the start of the song actually occurs... I think it makes logical sense that the sounds needing to play in this tick are grouped together to and prepared to be played next tick, in sync. The packet system would have to account for this synchronicity.

Edit: Update!
Superantx has just shown me a trick that works for now...

This will let you play more than one audio file (across different channels) at the exact same time...

                song_kick = sound(0, 1, 0, 1, 0)
song_snare = sound(0, 1, 0, 2, 0)
song_hat = sound(0, 1, 0, 3, 0)

song_kick.file = 'song_kick.ogg'
song_snare.file = 'song_snare.ogg'
song_hat.file = 'song_hat.ogg'

src << song_kick
src << song_hat
src << song_snare

song_kick.volume = 25
song_snare.volume = 25
song_hat.volume = 25

src << song_kick
src << song_hat
src << song_snare
</<></<<>
Also, if there was further support for FMOD's ability to handle multi-channel files (which does exactly what I'm trying to do), we would have direct support for this feature as well as many other possible things:

http://vimeo.com/10083148
+1