Synchronizing Sound Channels
You can synchronize several different sound channels by issuing syncCmd
commands. The param1 field of the sound command contains a count, and the
param2 field contains an arbitrary identifier. Every syncCmd command is
held in the channel, suspending any further processing until its count equals 0.
syncCmd command having the same identifier to be received on an other
channel.
For example, to synchronize four wave-table channels, send a syncCmd
command to the first channel with a count equal to 4, to the second channel
with a count equal to 3, and so on, giving each command the same identifier. The
Sound Manager decrements the count for each channel having a given identifier each time it receives a syncCmd command. As a result, after you
send the fourth channel a count equal to 1, all four channels will have their
count set to 0 and will resume processing their queued commands.
Note: The syncCmd command is intended to make it easy to synchronize channels linked either to the wave-table synthesizer or
to the square-wave synthesizer. Applications needing to synchronize
and control the execution of multiple channels of sampled sound