Well if you are like me and like playing with the newest stuff out there you have downloaded the new CTP for XNA 3.0.
So far I have been nothing but pleased with it. It integrates directly into VS 2008 so I don't need VS 2005 express or VS 2005 Pro to use it now (there were ways to install it to work in VS 2008 but it was a nightmare to make it work).
The thing that I absolutely LOVE is the new Audio stuff here is a brief overview of what's there that I have played with so far.
SoundEffect - this class let's you play wav sound effect files, you can try using the Song and MediaPlayer classes to play your sound effects as MP3's if you want to save storage space / file size - but I will warn you that there is a slight delay on the first play of your effect so this is not advised - do yourself a favor and stick with the wav files and use the MP3 files for your music.
What is even better about this class is the ability to control the volume and pan / pitch and looping at runtime! This is really cool, for example - say you have a bomb or explosion go off on the left side of the screen, you simply pan it to the left and it put's more umph into the left speaker - likewise to the right and so on. You can also control the volume in reference to the z-axis of where your sound is originating (you can go even further and start tweaking the doppler effects, etc using some other methods and classes if needed). So as you can see so far, this is a very flexible and powerful audio class. Sure you could use XACT to do this stuff, but I would really like to stick to controlling my audio in the actual code and not having to script it in a "flash like - timeline manner" as I have had to do in the past. I like to keep my external audio tools limited to Audacity and the LAME encoder.
SoundEffectInstance - this is sort of like a Sound cue in play - there is not constructor for this class - it comes from calling the play method of your sound effect instance this comes in handy if you want to restrict playing the sound to only be one per play - you can say "are you playing" and if it is you can wait or move on until it's finished. Very handy indeed (the Cue class did this too - I just like the way they did this better as it appears to be much cleaner).
Song - this guy holds on to your MP3 content. you use this to contain the actual stream of data that is your MP3 file. An instance of this is what you will pass to the media player class to actually play the song.
MediaPlayer - this is the class you will use to play the MP3 files - it's not advisable to use the media player class to play your sound effects as I have found so far that this can lack responsiveness on the first play (or it could just be my computer remember folks this is the cutting edge so anything can happen) :)
Now the new objects are great - but what I love the most is how they made the audio consistent with the rest of your resources such as textures. You simply call the content manager's Load method - as always it expects a parameterized type and for songs and sound effects you simply pass in (you guessed it) Song and SoundEffect. It will load these from your content just like everything else you will use the content manager for. This is a refreshing change over what was there before and the consistency makes it so much more intuitive - kudos to the Microsoft XNA team on all this stuff so far!
I will say this - I have said some crap about Microsoft in the past - and it's usually true at the time - but one thing is for certain - if it weren't for the crap talkers out there - then things wouldn't get continually better as they have been, one thing about Microsoft - they always make it a ton better on the next pass, I cannot wait to see what happens with XNA next.
There is a ton more in the Audio and Media namespaces that I have not mentioned yet - but I do have a life and this would take me the better part of my Saturday to cover it all (not to mention this blog post would be huge). I have been playing around with some helper classes that combine the functionality of the SoundEffect and sound effect instance classes to give them finer grained control over what they do (they already give you a TON of control as it is - so there's not much left to add). I will post the code sometime this week once I have something I am satisfied with showing to other people.