ambient_generic can make my fps go to crap?

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
[SOLVED]ambient_generic StopSound output not working correctly?

OK, so I made this community hotel map for cC. All was fine and dandy. A few players' rooms have music in them - fine. On b1 I realized you couldn't pack mp3s into the map, only wavs. I didn't bother converting them, I just added them into a rar and anyone who downloaded the map from the server wouldn't get the sounds, making the map much smaller.

For b2, I thought it would be a good idea to go ahead and make them all wavs. When I did this and compiled, I'd play the map to test it and run over to hit a button that would activate the wav. It drops my fps to 1 making it impossible to play until a start the map over. Thing is, it still happens if I use the old mp3 versions. I feel like I changed some input/output, though I feel its pretty standard. Maybe too many things being activated at once?

Things I've checked off:
- No 'alt+p' problems
- No compile log problems
-No console errors
- Tests fine when I click 'preview' in ambient_generic entity window
- Tried changing the sample rate
- Sounds that were already wavs that I didn't change do not put me to 1 fps

entprob.png

^This shows all that is going to an ambient_generic. Essentially, a button activates 1 sound and puts the volume down to 0 on all the rest in that room. Then, when everyone has left a room, it puts the volume to 0 on all the I'm not using StopSound because for some reason it doesn't stop the sound when I use it. The odd delay times are just me trying to troubleshoot. It didn't help.

Just wondering if anyone else had ever had this problem. Could it be because it technically has 5 songs running even though 4 are at volume 0? If so, why is stopsound not working?

Sorry for the long post, and thanks in advance.



Edit: OK, so I tried changing all the "Volume 0" to "StopSound"s. That cleared up the original problem, but Stopsound won't actually stop the sounds. Anything that prevents StopSound from working right?
 
Last edited:

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
SOLVED: Sorry, but sometimes I don't think of things to try until I've written a "Help me" post.

The answer is: Don't just put all volumes down to 0. I can only assume that is what was making me lag so bad - 5 different songs all going off at once. StopSound didn't work because it only works for 'looped' sounds. So merely unchecking the "Is Not Looped" flag made StopSound work.

I just hope this accidental spam thread will help someone in the future.