beep
beep copied to clipboard
Interruptions if I play two files at the same time on android 6.0
If I play files one by one there are no problemsю But I need play it together. On mac os and android 7.0 and higher all ok Maybe I should create issue here https://github.com/hajimehoshi/oto?
code Example:
https://gist.github.com/marinat/f1f14b61b8cdb070c0d1be14f06e93bd
I just need to create another payer with same context
Sorry, but this not helped. All ok if i do pure otomp3.NewDecoder(f) If I use beep even with two players the issue still reproducing @faiface
The part that mixes the audio streams together is implemented here using a beep.Mixer
. I think this is the right place for the issue.
A lot of times, interruptions are caused by the the speaker draining the streams quicker that they can supply data. I'm not sure if that is the case here. You could try changing the bufferSize
of the speaker.
Some questions:
- Do the interruptions happen mid-stream? So [both clips playing] [both are interrupted] [both playing again] [both interrupted] [both playing again]... If not, what does happen instead?
- Does the clip continue playing from where it stopped after the interruption (as if someone paused it) or does it skip a bit (as if it got muted)?
- In the other issue you said the player wheezes. Is that still the case? Do you mean that it makes a wheezing sound?
I meant rather wheezing instead of interrupts. Only wheezing. I tried to change the bufferSize of the speaker, but this not helped. If you have the opportunity to reproduce it on android lower version 7 you can understand what I'm talking about.
Hi, sorry for not responding earlier, I was taking a break.
Anyway, the code you provided will exit almost immediately after starting, because speaker.Play
isn't blocking, it merely starts the playback of a streamer. Not sure what exactly causes your problem, but this immediately popped out to me.
I omitted details and did not show all code. So, do you have the opportunity to reproduce it on android lower version 7?
No, unfortunately, I do not have such a phone available :/
Tomorrow I'll try to reproduce it on android emulator and will write about the results.