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

wav file not found

Last post 10-03-2008 10:28 AM by Koder. 4 replies.
  • 08-15-2008 10:06 AM

    wav file not found

    hi

    i am trying to add sound to my game but there is a problem when ever i try to compile it it gives an error wav file not found i cant sem to find the source of error i am using xna gs 3.0 and creaed the xag file using the xact

     


  • 08-17-2008 7:08 AM In reply to

    Re: wav file not found

    XACT stores relative paths, so if your working directory when you build is not the same as the directory where the XAP file is stored, it can't find the WAV files.

    When Visual Studio builds your Content folder, its working directory is the Content folder. So unless your XAP file was created by XACT in that folder, it can't find any of your sound files.

    The solution is a little hairy, but you get used to it. Right-click your Content node in the project, and "Add" a "New Folder". Name that folder "Audio".

    Now start XACT and open your project. Save the project into the newly-created "Audio" folder under your "Content" folder, and XACT will convert all the paths.

    Return to Visual Studio and remove the current XAP file from your project. Right-click on the "Audio" folder and "Add" an "Existing Item". Select the XAP file in the Audio folder, and you should be able to build successfully.

    (I'm working on an audio tutorial.)

  • 08-19-2008 3:29 PM In reply to

    Re: wav file not found

    hi thanks for the reply i followed the steps u had said but still the problem persists is it because i am using system sounds such as ding.wav and notify.wav in windows/media folder??

    eagerly waiting the audio tutorial


  • 10-03-2008 9:43 AM In reply to

    Re: wav file not found

    I'm going to bump this up.. as I seem to have the same problem.

    I've tried many ways to do this, I've tried saving it in my project folder, in my content folder, and in my audio folder, and NONE have worked.  I was getting the same error as him, with the "Can't find wav file" But I've seen to have gotten around that.  Now it has problems finding the xgs file it needs (picture shown at bottom).  First of all, that error is strange enough.. as it's in a T directory??  But regardless.. I have added "shitsweak.xgs" to my projects content/audio/ folder so it IS there.  I don't know what the problem is I guess.   I'm guessing it's XACT having problems building.  As in.. I save the project to the content folder, I then go File -> Build (this is in xact) and it SHOULD add the xgs/xsb/xwb files to the AUDIO folder, but it puts them in my xbox360 folder in my main project folder.  I've tried this same process with the XACT project saved in the audio folder.. in the main project folder.. in the content folder.. even in the xbox 360 folder, and none work, the building just doesn't seem to work, and moving the files there manually just isn't cutting it, it needs to do it, itself, or so it seems.

    Picture of error

     Thanks in advance.. if anyone can help us figure this out.

  • 10-03-2008 10:28 AM In reply to

    Re: wav file not found

    Never mind, I must have blanked.  Hopefully this was your problem too chiki.. I had base.Inititalize( ); above my engine/bank declarations so XNA wouldn't try to build it by itself, and apparently XACT's building isn't sufficient enough, lol.  Yeah, I know, stupid me.  Well, it is 5:30 am on a Friday, what do you expect? 
Page 1 of 1 (5 items) Previous Next