开发者

Play sounds with managed code

开发者 https://www.devze.com 2023-01-05 19:05 出处:网络
I\'ve been trying to create a sound library as a learning project. I get the reading and parsing, I just don\'t understand how to actually make sound come out of the speaker. I\'ve looked around for q

I've been trying to create a sound library as a learning project. I get the reading and parsing, I just don't understand how to actually make sound come out of the speaker. I've looked around for quite some time now, but I could never find something that explains this. It seems to be开发者_运维技巧 trivial. Am I missing something here? How do I do this in C#?


I would try NBass. It's free and open source, you can peek how they do it in detail.

You can also use the Microsoft Media Player SDK, if you prefer, or the media layer from WPF, which is probably merely the same I guess.

If you want to output things directly then the managed DirectX can help you out, have a look at DirectX.AudioVideoPlayback.


Could you use System.Media.SoundPlayer?

http://msdn.microsoft.com/en-us/library/system.media.soundplayer.aspx

0

精彩评论

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