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

wav file not found

Last post 3/14/2010 10:14 PM by hipsnake166. 10 replies.
  • 8/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

     


  • 8/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.)

  • 8/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/3/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/3/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? 
  • 7/28/2009 1:16 AM In reply to

    Re: wav file not found

    I am using XNA 3.1 on Vista and i finally figured this out.

    Put the .wav files you want to use in the folwing folder
    "C":\Users\"User Name"\Documents\Visual Studio 2008\Projects\"Project Name"\"Project Name"\Content
    (things in "" are relative to your system)

    Using XACT 2.0 make your file and save it in the same folder

    add existing item linked to this file

    hit play

    That is how i got it to work.

    Hope this helps.
  • 7/28/2009 1:18 AM In reply to

    Re: wav file not found

    EDIT:

    Of course you have to code it in the program

    forgot that part
  • 12/28/2009 5:44 AM In reply to

    Re: wav file not found


    i work on XNA3.0 XACT2
    the solution : just copy your .wav and .xap files under the "content" diretory, hope this will help u
  • 3/12/2010 2:39 AM In reply to

    Re: wav file not found

    Okay, I totally figured this out. the answer is really kind of lame, but i noticed that i could not seem to add sfx to my game, but full background music worked fine. Then i realized the problem, which i just fixed. Your sound..... has to be at least 1 minute long. Yeah. THAT IS THE PROBLEM (>_<)! I used Audacity a minute ago to make a gunshot sound go from 7 seconds to 61 seconds (at least 58 seconds of blank) and it suddenly worked. I am 90% sure this is your problem. If it isn't i dont know what to tell you... but at least my stuff works now (@_@)!
  • 3/12/2010 2:43 AM In reply to

    Re: wav file not found

    Oh yeah, BTW, if you want to play sounds when you are pressing a key or anything that is not under the initialization function, you want to put the

    Cue

     

     Sound = soundBank.GetCue("sound");

    under the update function. Make a region for the sounds. It will help. Hope this helps!!!

     

  • 3/14/2010 10:14 PM In reply to

    Re: wav file not found

    Never mind my last posts... NOW i figured it out. You put the sounds you want in the game's audio folder and then add them to xact from there, and save the project. Then, in xna, you build your game (ctr+shft+b) and then build and save your xact project. Found this out from audio tutorial on a certain video site.
Page 1 of 1 (11 items) Previous Next