Custom audio files not playing in-game

Avatar
AD_79p2
103 Posts
Posted Nov 25, 2012
I created some custom .wav files with a text-to-speech program, and I put them into a custom map I'm working on. I updated the audio cache, but for some reason, the files still won't play when they are triggered. :angrysquare:
So, how do I get the .wav files to play in game?
Advertisement
Registered users don’t see ads! Register now!
Avatar
RectorRocks
522 Posts
Posted Nov 25, 2012
Replied 5 minutes later
Where do you put the .wav files at?
Avatar
AD_79p2
103 Posts
Posted Nov 25, 2012
Replied 4 minutes later
I had put them in the steam/steamapps/common/portal2/portal2/sound/{folder name here}.
Don't know if that's where the files should be.
Avatar
RectorRocks
522 Posts
Posted Nov 25, 2012
Replied 21 minutes later
And what did? Did you place an ambient_generic? When you select your Sound Name in the ambient_generic, the Sound Type should be Raw. Then filter your sound. All the flags in the ambient_generic should be checked.
Avatar
AD_79p2
103 Posts
Posted Nov 25, 2012
Replied 4 minutes later
Sound type raw, all flags checked, not playing the sounds.
Avatar
FelixGriffin
2,680 Posts
Posted Nov 25, 2012
Replied 13 minutes later
Open the console and run snd_updateaudiocache.
Avatar
AD_79p2
103 Posts
Posted Nov 25, 2012
Replied 3 minutes later

AD_79p2 wrote:
I updated the audio cache, but for some reason, the files still won't play when they are triggered. :angrysquare:

Um, did you read that? It was at the top of the thread. I already updated the audio cache.

Avatar
Fracture
797 Posts
Posted Nov 25, 2012
Replied 31 minutes later
what method do you have to trigger the play of the audio?
Avatar
AD_79p2
103 Posts
Posted Nov 25, 2012
Replied 7 minutes later
Different things. I have multiple custom audio files. Two are triggered by a logic_auto, some are activated by triggers, and one is triggered by picking up the portalgun.
Avatar
Fracture
797 Posts
Posted Nov 25, 2012
Replied 9 minutes later
well if everything is set up correctly for the directory, the trigger path and the file type, I don't know. Maybe try this as an experiment in a separate map file. Place in a prop_button and for an output:

onpressed - ambiant_generic - playsound - delay 0

If that works, there may be an issue in you main map file. if it still wont play, it may be a problem with the file

Avatar
FelixGriffin
2,680 Posts
Posted Nov 25, 2012
Replied 37 minutes later
Oh, sorry. Try rebuilding it?
Avatar
josepezdj
2,386 Posts
Posted Nov 26, 2012
Replied 4 hours later
@AD_79p2: What are the specifications of your custom sounds? do you know they must be 44100Hz sample rate?
Avatar
RectorRocks
522 Posts
Posted Nov 26, 2012
Replied 5 minutes later

josepezdj wrote:
...do you know they must be 44100Hz sample rate?

How do you check the sample rate?

Avatar
josepezdj
2,386 Posts
Posted Nov 26, 2012
Replied 8 minutes later

RectorRocks wrote:
How do you check the sample rate?

You check it in whatever audio editting program you are using right before "Save as...". Normally there is a tab for the specifications for each format (.mp3 .wav etc.) you want to save your audio as. Though anyway, it must be displayed somewhere at your working window (this depends on each software, just look for it.)... or in options, you sure have a default settings window to set your desired rate up...

Also, AD_79p2, you mean "in game" when in the Workshop or normal .bsp run?

Avatar
AD_79p2
103 Posts
Posted Dec 01, 2012
Replied 5 days later
The map is not on the workshop, "in game" meaning when I test the map.

BTW I don't actually have an audio editor, I'm just using a text-to-speech demo I found online.

Avatar
Fracture
797 Posts
Posted Dec 01, 2012
Replied 46 minutes later
look up xilisoft, its what i use for video and audio converting
Avatar
AD_79p2
103 Posts
Posted Dec 01, 2012
Replied 34 minutes later
Alright, Fracture, I'll try it and see how it works.
Avatar
AD_79p2
103 Posts
Posted Dec 01, 2012
Replied 56 minutes later
So, how do I get the sample rate down to 44100 or whatever it was? When I converted the .wav to an mp3, the sample rate was changed to 48000.
Avatar
FelixGriffin
2,680 Posts
Posted Dec 01, 2012
Replied 36 minutes later
Use Audacity.
Advertisement
Registered users don’t see ads! Register now!
Avatar
AD_79p2
103 Posts
Posted Dec 02, 2012
Replied 3 hours later
Hell yeah, FelixGriffin, that looks like it will work really well. I just hope it's not too hard to use.

OFFTOPIC: Have any of you ever played Super Meat Boy? (I don't quite know why I just wrote that).