I want to sync a stopped channel with a playing channel. Both channels have the same sound. Or in other words: I want to duplicate the playing channel exactly. Is it sufficient to call channel1->getPosition() and then channel2->setPosition? Are there any other (better) more accurate ways to this?
- mylo asked 9 years ago
Thanks for the reply brett, but I have some doubts, let’s say there are 8 players which are playing 8 different sounds. That would mean I have to play 8 x 8 = 64 sounds at the same time. Next problem would be the timing of sound->release() (e.g. one player decides to play another sound), which would mean passing the ownership of the sound around the 8 players. That seems like a bit of an overkill.
Here is an example:
[list:lle8ltku]channel1 is playing at position x
user clicks button ‘duplicate’
channel2 starts playing from position x, so we have the same sound playing twice at the exact same position
user can play around with the channels to get some nice effects or stop channel1 and load another sound, imagine a DJ who has two identical records spinning at the same time[/list:u:lle8ltku]
My idea was:
start the sound paused on channel2
set the position of channel2 with position of channel1
Please login first to submit.