XNA Creators Club Online
Page 1 of 2 (27 items) 1 2 Next >
Sort Posts: Previous Next

MP3 in XNA?

Last post 09-22-2008 11:59 PM by Eli Tayrien. 26 replies.
  • 08-04-2008 10:38 PM

    MP3 in XNA?

    Can I load .mp3 songs into my XNA game (without converting to .wav please!)?
    Matthew Doucette / Xona Games
    my Xbox 360 2D shooter: Duality: ZF
  • 08-04-2008 10:42 PM In reply to

    Re: MP3 in XNA?

    Yes if you are using the 3.0 framework. Just drag and drop your mp3 or wav file into your content folder and it will be loaded by the Content Pipeline. To use in your game, simply use the new SoundEffect or Music types.
  • 08-04-2008 10:47 PM In reply to

    Re: MP3 in XNA?

    Or if you're using the 2.0 framework, you could use the QuickXAP tool. It lets you add audio files (including mp3) right to your content project as well. It does convert them to WAV behind the scenes (since that's what XACT requires), but then your source files can be MP3. If you are concerned with file size, in QuickXAP (and therefore XACT, being that XACT is the underlying technology) support compression. In XACT, you could follow these instructions. In QuickXAP, it's as easy as setting one of the processor parameters to true. So it's very easy to have compressed audio using the 2.0 framework.
  • 08-05-2008 9:26 AM In reply to

    Re: MP3 in XNA?

    I suggest you use irrKlang. It is a good engine for both 2D and 3D Sound. http://www.ambiera.com/irrklang/
  • 08-05-2008 2:48 PM In reply to

    Re: MP3 in XNA?

    LEKendoKa:
    I suggest you use irrKlang. It is a good engine for both 2D and 3D Sound. http://www.ambiera.com/irrklang/
    Do note that this will not work on the Xbox 360, so if that platform is a target for you, irrKlang is not an option. In addition irrKlang is not free for commercial projects whereas all the built in audio for XNA Game Studio is, so that is another thing to keep in mind.
  • 08-05-2008 9:03 PM In reply to

    Re: MP3 in XNA?

    Nick Gravelyn:
    LEKendoKa:
    I suggest you use irrKlang. It is a good engine for both 2D and 3D Sound. http://www.ambiera.com/irrklang/
    Do note that this will not work on the Xbox 360, so if that platform is a target for you, irrKlang is not an option.

    This is a pretty huge consideration, so thanks for pointing that out.  I need Xbox 360 support.

    Matthew Doucette / Xona Games
    my Xbox 360 2D shooter: Duality: ZF
  • 08-05-2008 9:07 PM In reply to

    Re: MP3 in XNA?

    George Clingerman:
    Yes if you are using the 3.0 framework.

    Entering Dream Build Play, so I'm using 2.0 framework!  So sad to see this not supported in 2.0! :(

    Matthew Doucette / Xona Games
    my Xbox 360 2D shooter: Duality: ZF
  • 08-05-2008 9:10 PM In reply to

    Re: MP3 in XNA?

    So, I have to use *uncompressed* WAV files for my game music?!!  Nick, thanks for the QuickXAP tool link, but I can output my MP3s to WAVs in winamp, and that's basically the same thing, right?
    Matthew Doucette / Xona Games
    my Xbox 360 2D shooter: Duality: ZF
  • 08-05-2008 9:25 PM In reply to

    Re: MP3 in XNA?

    No Xact will happily compress the data for you http://blogs.msdn.com/mitchw/archive/2007/04/27/audio-compression-using-xact.aspx

    QuickXap has a bunch of other useful things - not only does it convert the files but it automatically makes the Xact project for you. Well worth using.

     

    The ZBuffer News and information for XNA

    Please read the forum FAQs - Bug/Feature reporting
  • 08-05-2008 9:28 PM In reply to

    Re: MP3 in XNA?

    Yep, if you're stuck in 2.0, then i HIGHLY recommend QuickXAP, it's just an incredible tool. Makes working with sound in the older framework so much easier for me.
  • 08-06-2008 3:18 AM In reply to

    Re: MP3 in XNA?

    George Clingerman:
    Yep, if you're stuck in 2.0, [...]

    Last I checked 2.0 was still the latest stable release. How can you be stuck to it?

    We are boki. The rest is known.
    The not so known part of the rest: It is Björn or Bjoern, but never Bjorn.
    Björn does not stalk John Sedlak
  • 08-12-2008 2:00 PM In reply to

    Re: MP3 in XNA?

    Correct me if I am wrong:

    1) I am not stuck to WAV in the sense that I can also use ADPCM and XMA which have compression.  XMA has better compression and higher quality than ADPCM, so it's the obvious choice (until I move to XNA 3.0 where MP3 is supported).

    2) I am stuck to WAV in the sense that I can only input WAV into the XACT tool, but the XACT tool can transform WAV into XMA.

    3) QuickXap does what the XACT tool does, they both produce a XAP file that XNA can import and use, however QuickXap allows you to import MP3 files!  So use it inside of XACT.

    4) I should probably use XACT first, before QuickXap, to get a feel of what QuickXap is replacing.

    Am I right, or did I slip up?!

    Matthew Doucette / Xona Games
    my Xbox 360 2D shooter: Duality: ZF
  • 08-12-2008 3:10 PM In reply to