CAmbientGeneric

plays a sound, either once or on loop, and either from a location in the world or globally.

Classnames:

It can play:
 * (referred to as a Game Sound) (e.g. )
 * Raw .wav samples (or mp3, in some games) (e.g. )
 * Scripted sentences from sentences.txt (e.g. ) (cannot play a Scene (VCD) file)

Bugged behavior
There is some odd behavior that can happen when the Is NOT Looped flag is checked. The table below shows behavior as seen in Half-Life 2. If different results are seen in other games, please note it here and it will be worked into the table. Conclusion: The Is NOT Looped flag can force a sound to start silent, and break the StopSound and ToggleSound inputs. You should avoid using this flag, at least in Half-Life 2.

1 - A wav file may have markers inserted to make them stop and loop around to a certain point in the sound file. See for a tutorial on how to do this. It has also been observed that these loop markers are the only factor in determining if a sound will loop or not.

2 - MP3 files remain untested.

3 - No means that ToggleSound will cause the sound to restart itself instead of making the sound stop. Sometimes, this "incorrect" behavior could be desired, but this should be done by stopping and actually replaying the sound instead.