-
Notifications
You must be signed in to change notification settings - Fork 16
Syncing two advanced audio players #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Quantum and phase synchronization is explained here: https://docs.superpowered.com/reference/latest/advanced-audio-player?lang=js Please let me know if it helps. There is a fundamental problem in your implementation: do not make both players synchronizing to each other, because they will constantly try and fight. You should have one main player and let the other synchronize to it. |
Thanks for the reply. But in this example you're syncing both players to each other in the process method. Did you miss a link to the explanation of the quantum syncing? |
https://docs.superpowered.com/reference/latest/advanced-audio-player?lang=js GitHub text editor doesn't work for me sometimes. I'm not sure what your code is doing, but you have two players playing simultaneously? If one is paused, then there is no "flow" to sync to. |
Thanks for the link. Both players are playing. Do I need to set synctoquantum continuously in the process method? In the android cross example you are syncing both to each other always in the process method. |
Quantum can be set once, phase is the position inside the quantum, so it needs to be updated every time. |
Sorry this still isn't resolved and there are no examples or other issues for me to refer to for help. There are two players A and B. Both are playing, I know this because I can hear them. Both are playing the same track. The BPM and firstBeatMs are accurate, I know this because the phase of each player individually is reported correctly. Both have:
I'm trying to sync B to A. What are the exact steps I need to take? Thank you |
I'm having a lot of difficulty syncing two AdvancedAudioPlayers. The documentation is confusing and there is only one example.
Each player has the sync mode SyncMode_TempoAndBeat and original bpm and first beat ms set correctly.
The way my code works is that it automatically switches between two players as tracks are loaded. The problem is that they just aren't synced. I'm calling
syncToMsElapsedSinceLastBeat
to sync each player to the other but it just doesn't work. What am I missing?Ideally I'd like to sync the tracks on a 4 bars quantisation, rather than beat. But the
syncToQuantum
thing is confusing.The text was updated successfully, but these errors were encountered: