tags:

views:

51

answers:

2

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#?

A: 

Could you use System.Media.SoundPlayer?

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

Alex Humphrey
Yeah, but then I wouldn't need to do it myself, which is the exercise. I should probably make that more clear in the question.
Jouke van der Maas
+1  A: 

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.

jdehaan