I'm trying to synchronize 5 audio files (mp3) each representing a musical instruments. I'm using MediaElements.
I'm starting all the MediaElements at the same time and it works perfectly until I try to pause/play thes开发者_C百科e audio files. When I start them after the pause, they become unsynchronized.
Using a timer, I tried to check when they become unsynchronized, and tried to synchronize them again by giving them the same position... but this didn't work.
Any idea on how to synchronize audio files perfectly.
Regards. Thanks for your help.
The closest you can get to syncing multiple media files is to use a custom MediaStreamSource. By making a media stream source, you feed to the MediaElement the samples and sample times. This allows for perfect control over synchronization. There is an example of MediaStreamSource and MP3 here. You will have to modify it to make it stay in sync.
精彩评论