syncing multiple audio tracks on android

白昼怎懂夜的黑 提交于 2019-11-30 23:21:42

The problem is that each MediaPlayer represents a separate stream, which may start at different times. Even if you call start on all of them at the same time (which is impossible), there's no way to guarantee that the OS will load and actually start each one at the same time.

As far as I know, Android offers no way to synchronize multiple streams. Even with operating systems that do offer this capability, it's extremely cumbersome, and usually not 100% accurate.

The correct solution is to open a single stream, eg using the audio track interface, and do the MP3 decoding and mixing yourself before sending the data to the stream.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!