XNA Creators Club Online
Page 1 of 1 (9 items)
Sort Posts: Previous Next

.wav support

Last post 12/8/2009 4:06 AM by Chris Covington. 8 replies.
  • 8/28/2009 10:55 PM

    .wav support

    Are there any plans to support direct loading and playback of wav files without being forced to use XACT or the Content Pipeline?  This feature seems so simple yet in version 3.1, it's still not there.  I want my (PC-only game) players to be able to swap out textures and wav files (think themes) any time they feel like it.  For textures it's easy but for sounds it's not yet possible in XNA...must I dive into interop & DirectX to do this??????

    Thanks!
  • 8/28/2009 10:58 PM In reply to

    Re: .wav support

    Yes, there's all kinds of options called, don't use the Content Pipeline or XACT but instead use whatever you want to on the PC. Since you're developing on the PC you can use any audio system you want to to meet your needs. You're just using C#. There's nothing special about using the XNA framework that restricts you from using any solution you code yourself or any existing library you find out there.
  • 8/28/2009 11:16 PM In reply to

    Re: .wav support

    First, thanks for the quick response! 

    I know that I can certainly use interop or develop/buy a library out there that will play .wav/.mp3 files from a file (or stream).  The question is: Are there any plans for XNA to support this?  I'm disappointed that this seemingly simple feature has been overlooked or purposely left out.  You'd think that the SoundEffect class would have a method similar to Texture2D.FromFile().  It seems silly to have to resort to other methods *just to play a .wav from a file/stream*.  Not everyone is programming for the XBox/Zune!
  • 8/28/2009 11:31 PM In reply to

    Re: .wav support

    I guess if I was a framework developer, I'd say it seems silly to spend time coding a solution to load music/sound effects from file and play them in game on the PC when there's so many choices and options out there already for developers to use :)

    Most game don't need the "FromFile" option for their content, not all game developers want players to quickly and easily be able to mod or change their games. So now you're asking the team to spend time coding a solution for a small set of game developers on a platform that already has a ton of options out there for developers? Doesn't seem like a good use of their time to me.

    I haven't heard of any plans, if it's something you really want in the framework I'd suggest creating a Connect issue for the suggestion so they know that there are those in the community that want it.
  • 8/28/2009 11:47 PM In reply to

    Re: .wav support

    First, I agree with George. It would be a waste of time for anyone to add this feature to the XNA Framework *only* for Windows. There are lots of ways for you to do this without the XNA Framework.

    To provide a specific example, the System.Media.SoundPlayer class does *exactly* what you're asking for.

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

    Stephen Styrchak | XNA Game Studio Developer
  • 8/29/2009 12:02 AM In reply to

    Re: .wav support

    George,
    By that first argument there would be no need for XNA at all since it didn't add anything new that we couldn't do before...it just made things a lot easier :) 

    I realize most developers would go on fine without it but that applies to Texture2D.FromFile() too...yet they chose to code that one.  I'll create a Connect issue and cross my fingers.  I can't be the only one wanting this when there are so many games nowadays that allow (and thrive on) user-generated content.

    Thanks!
  • 8/29/2009 12:24 AM In reply to

    Re: .wav support

    There are lots of ways to use the keyboard and mouse without the framework too...and that only benefits PC developers :)

    I looked at SoundPlayer some time ago and noted that it doesn't do anything but play a sound using the PlaySound() Win32 API call.  The SoundEffect class is more suited for games because it allows for 3D sound, panning, pitch changes, etc...hence my desire for a FromFile method for that class so that I get all the same features.

    I guess I'm just in the minority here...but I do thank you both for the replies.
  • 12/8/2009 2:55 AM In reply to

    Re: .wav support

    I think it's really absurd to say that a small amount of developers use it. It may be true but the only reason it's true is because so many XNA tutorials tell you to use the content pipeline which I think is absolutely absurd. Infact, I think the content pipeline is extremely poorly designed and clunky to use. I wrote my own resource system for my XNA MMORPG that works off of custom resource loading providers that give me a much higher range of use. Unfortunately when it came time to implement this for the sound provider I realized you could only load them from the content pipeline. There is really no reason that all resource types should not support the "FromFile" method. It's a single method and it opens up the possibilities to a much wider range.

    And yes I am building my engine to work on the Xbox as well where I can simply write resource loading providers that use the content pipeline.

    I bumped this thread because it's ludicrous that this isn't supported.
  • 12/8/2009 4:06 AM In reply to

    Re: .wav support

    NullSoldier:
    I bumped this thread because it's ludicrous that this isn't supported.


    Feel free to open a Connect issue for it then. If other people agree, they can add to it.
Page 1 of 1 (9 items) Previous Next