开发者

c# - wmplib - playing 2 mp3 files but can get them in synic

开发者 https://www.devze.com 2022-12-26 00:22 出处:网络
I have 2 windowsMediaPlayer objects setup Both objects have the same mp3 song file but when I play them at the same time they are out of sync by a few seconds. The code I call to play them looks like

I have 2 windowsMediaPlayer objects setup Both objects have the same mp3 song file but when I play them at the same time they are out of sync by a few seconds. The code I call to play them looks like开发者_开发技巧 this

     sound1.controls.play();
     sound2.controls.play();

Is it just because one play method is executed before the other and thus one fast then the other. Is their anyway I could sync them? I have tired messing with the rate of one track to match the other, but not getting it prefect.

Thanks


You can't get this perfect, the players cannot start at the same time by design. You'll need to mix the two songs into a new song, the NAudio library can do this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号