RavynousHunter on 2/3/2009 at 00:54
OK, I've got a new question to pose to you folks out there who're knowledgeable with .Net (primarily C#). Anyone know of a good, freeware sound library that I could use? I looked at (
http://www.un4seen.com/) Bass, even gave it a go, but it doesn't do what I need it to do in a simple, quick manner.
I've done some searches on MSDN, but didn't find anything worth looking at. Here's a short list of what I'm looking for:
* Decent size (nothing over about... 4-5 MB)
* No hundreds of different functions and crap that serve only a specialized purpose. I'm just looking for playback from file.
* Supports the following: *.ogg, *.mp3, *.wav; more is always good.
* Simple playback interface, something like this :
play_sound( string file, bool repeat ) I'm willing to make some concessions that allow more options in playback, but nothing that needs a half dozen or more arguments to play a simple explosion.
* Something that allows me to dynamically control playback, such as interrupting music mid-song and whatnot.
* BONUS: Cleans up its resources after playback is stopped either manually or once the file is done playing with little to no effort.
I realize I'm asking a lot, but it just seems that people don't know how to make something simple and fast anymore. The level of convolution I've seen in some of this stuff is appalling.
Ulukai on 2/3/2009 at 17:29
I've tinkered with (
http://www.codeplex.com/naudio) NAudio, which will play back MP3s, and is open source, but I think it'll also be too complex for your needs. Nothing to lose by downloading it and seeing what you make of it, though.
Out of the box, you
can get .NET to play back WAV files with System.Media.SoundPlayer, but it's horribly limiting and it'll only play back files of the uncompressed PCM variety.
p.s. why not have a browse through (
http://www.codeplex.com/site/search?ProjectSearchText=audio) CodePlex yourself?
RavynousHunter on 2/3/2009 at 21:52
I'll check out CodePlex later on today, thanks, Ulukai. I've known about the SoundPlayer namespace, and its horrifying limitations; which is why I'm looking for an external library; something I'm reluctant to do simply because I like to do most of my stuff with the bare minimum of external dependencies. I just suck with file interpretation and whatnot. :cheeky: