简体   繁体   English

C#如何使用同一个声音播放器播放多个声音/歌曲

[英]C# How to play multiple sounds/songs with the same sound player

Hello im trying to make a music playlist and so far i made a checkboxlist with the titles of the songs and if you check for example the first one and you hit the play button the song will play by a sound player. 您好,我正在尝试制作音乐播放列表,到目前为止,我已经制作了带有歌曲标题的复选框列表,例如,如果您选中第一个,然后单击播放按钮,则歌曲将由声音播放器播放。 I want all my songs in this list to play by the same sound player. 我希望列表中的所有歌曲都由同一声音播放器播放。 Can i do that? 我可以那样做吗?

Can i do that? 我可以那样做吗?

Yes, you definitely can. 是的,您绝对可以。 It's implementable in C#. 它可以在C#中实现。 You just call a function like 您只需调用类似

player.stopPlaying();

and then 接着

player.startPlaying(new_song);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM