0
0

Hi,
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?
Cheers

  • You must to post comments
0
0

No that wont work. If a channel is stopped then it has no position for a start.
Do you mean you want to switch from one sound to another at an arbitrary time and the new one play from the old one’s position?

  • You must to post comments
0
0

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
unpause channel2

  • You must to post comments
0
0

Rather than stop/start, just play 2 streams simultaneously, then use setVolume to bring one in and the other out.

  • You must to post comments
0
0

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.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.