Looping a sound

From Valve Developer Community
Revision as of 01:45, 2 February 2009 by Craziestdan (talk | contribs) (slight reword)
Jump to navigation Jump to search

Intro

In this short tutorial you will learn how to loop a .wave sound file. (.mp3 can't be looped via cue points) Looping sounds in Source requires a simple short process to be made. Sounds cannot be simply looped by un-checking the Is NOT Looped flag of a ambient_generic. Instead you must add cue points to the sound file. To do we must use a program called Goldwave. Download it here. There is a free trial version available, after it ends you will need to buy Goldwave. Once it is installed you are ready to begin.

Adding the loop

Open Goldwave and open the sound you want to loop. Click the cues icon. (Cues button.jpg) Then in the new window click on the New button and add a cue point At Start. Then click New for another cue point and add a point At End. So it looks similar to this:

Cue dialog.jpg

Conclusion

Save your file and it's loop-ready. Now when you use a ambient_generic and un-check the Is NOT Looped flag with your sound it will loop in game correctly.

See Also