Sounds with c#
-
greetings for all, I am very instered in learn how work with sound in c#... for instance load a music file, see the frequency of that, if any one have any idea or better have a project as example, please tell my, regards my;)
I believe in .NET 2.0 their is a System.Media namespace that has classes to handle wav sound files. If you are using .NET 1.1 or before (or if the classes in the System.Media namespace can't help you with your specific file format) then you might try using activeX controls. I know Windows Media Player has a control for video, but I am not sure whether they have a control for audio. Now that I think of it, I remember somewhere on this site their is an article on audio output using Windows Media Player. Try searching.
Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios[^]
-
greetings for all, I am very instered in learn how work with sound in c#... for instance load a music file, see the frequency of that, if any one have any idea or better have a project as example, please tell my, regards my;)
To just play a file, using Windows Media Player as a control works best. To work with sound directly, you need DirectSound, part of the DirectX libraries.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
greetings for all, I am very instered in learn how work with sound in c#... for instance load a music file, see the frequency of that, if any one have any idea or better have a project as example, please tell my, regards my;)
-
greetings for all, I am very instered in learn how work with sound in c#... for instance load a music file, see the frequency of that, if any one have any idea or better have a project as example, please tell my, regards my;)
If you just want to play WAV sound files, you can use
System.Media.SoundPlayer
. If you want to do advanced things like changing the frequency of sound files, you'll need to go outside the .NET framework for that. You can use DirectSound, part of DirectX. You could probably also use DirectShow, which is part of the PlatformSDK. There are DirectShow wrappers for .NET on this site if you care to search the articles.Tech, life, family, faith: Give me a visit. I'm currently blogging about: Check out this cutie The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
greetings for all, I am very instered in learn how work with sound in c#... for instance load a music file, see the frequency of that, if any one have any idea or better have a project as example, please tell my, regards my;)
You can also "execute" a sound file (as if double clicked in Explorer), using the Process class; please see the many messages that have popped up about this on these message boards... :)
Luc Pattyn