29 #include "../idlib/precompiled.h"
41 desc =
"<no description>";
101 "sound %s // IMPLICITLY GENERATED\n"
120 "\t" "_default.wav\n"
184 else if ( token ==
"}" ) {
188 else if ( !token.
Icmp(
"minSamples" ) ) {
192 else if ( !token.
Icmp(
"description" ) ) {
197 else if ( !token.
Icmp(
"mindistance" ) ) {
201 else if ( !token.
Icmp(
"maxdistance" ) ) {
205 else if ( !token.
Icmp(
"shakes" ) ) {
215 else if ( !token.
Icmp(
"reverb" ) ) {
225 else if ( !token.
Icmp(
"volume" ) ) {
229 else if ( !token.
Icmp(
"leadinVolume" ) ) {
233 else if ( !token.
Icmp(
"mask_center" ) ) {
237 else if ( !token.
Icmp(
"mask_left" ) ) {
241 else if ( !token.
Icmp(
"mask_right" ) ) {
245 else if ( !token.
Icmp(
"mask_backright" ) ) {
249 else if ( !token.
Icmp(
"mask_backleft" ) ) {
253 else if ( !token.
Icmp(
"mask_lfe" ) ) {
257 else if ( !token.
Icmp(
"soundClass" ) ) {
260 src.
Warning(
"SoundClass out of range" );
265 else if ( !token.
Icmp(
"altSound" ) ) {
272 else if ( !token.
Icmp(
"ordered" ) ) {
276 else if ( !token.
Icmp(
"no_dups" ) ) {
280 else if ( !token.
Icmp(
"no_flicker" ) ) {
284 else if ( !token.
Icmp(
"plain" ) ) {
288 else if ( !token.
Icmp(
"looping" ) ) {
292 else if ( !token.
Icmp(
"no_occlusion" ) ) {
296 else if ( !token.
Icmp(
"private" ) ) {
300 else if ( !token.
Icmp(
"antiPrivate" ) ) {
304 else if ( !token.
Icmp(
"playonce" ) ) {
308 else if ( !token.
Icmp(
"global" ) ) {
312 else if ( !token.
Icmp(
"unclamped" ) ) {
316 else if ( !token.
Icmp(
"omnidirectional" ) ) {
320 else if ( !token.
Icmp(
"onDemand" ) ) {
326 else if ( !token.
Icmp(
"leadin" ) ) {
329 src.
Warning(
"Expected sound after leadin" );
336 }
else if ( token.
Find(
".wav",
false ) != -1 || token.
Find(
".ogg",
false ) != -1 ) {
341 if ( lang.
Icmp(
"english" ) != 0 && token.
Find(
"sound/vo/",
false ) >= 0 ) {
345 work =
va(
"sound/vo/%s/%s", lang.
c_str(), work.
c_str() );
383 common->
Warning(
"sound shader '%s' has shakes and uses OGG file '%s'",
390 common->
Warning(
"sound shader '%s' has shakes and uses OGG file '%s'",
int GetLineNum(void) const
static int snPrintf(char *dest, int size, const char *fmt,...) id_attribute((format(printf
idStr & SetFileExtension(const char *extension)
virtual const idSoundShader * FindSound(const char *name, bool makeDefault=true)=0
virtual bool HasDefaultSound() const
idCVarSystem * cvarSystem
virtual size_t Size(void) const
void StripLeading(const char c)
const char * GetFileName(void) const
const int DECL_LEXER_FLAGS
virtual const char * DefaultDefinition(void) const
virtual float GetMaxDistance() const
virtual bool Parse(const char *text, const int textLength)
virtual const soundShaderParms_t * GetParms() const
virtual int ReadFile(const char *relativePath, void **buffer, ID_TIME_T *timestamp=NULL)=0
idFileSystem * fileSystem
float GetFloatValue(void)
const char * GetName(void) const
bool ParseShader(idLexer &src)
virtual float GetMinDistance() const
float ParseFloat(bool *errorFlag=NULL)
idStr & DefaultFileExtension(const char *extension)
idSoundSample * FindSound(const idStr &fname, bool loadOnDemandOnly)
static int ClampInt(int min, int max, int value)
int ReadTokenOnLine(idToken *token)
int Icmp(const char *text) const
idStr & BackSlashesToSlashes(void)
int ExpectAnyToken(idToken *token)
idSoundSample * leadins[SOUND_MAX_LIST_WAVS]
int LengthIn44kHzSamples() const
idCVar com_makingBuild("com_makingBuild","0", CVAR_BOOL|CVAR_SYSTEM,"1 when making a build")
virtual bool CheckShakesAndOgg(void) const
virtual int GetNumSounds() const
virtual const char * GetCVarString(const char *name) const =0
int GetInteger(void) const
virtual void List(void) const
virtual const idSoundShader * GetAltSound() const
int Find(const char c, int start=0, int end=-1) const
void UnreadToken(const idToken *token)
virtual const char * GetSound(int index) const
virtual void Printf(const char *fmt,...) id_attribute((format(printf
virtual bool SetDefaultText(void)
int LoadMemory(const char *ptr, int length, const char *name, int startLine=1)
virtual ~idSoundShader(void)
virtual const char * GetDescription() const
void SetText(const char *text)
idDeclManager * declManager
idSoundSample * entries[SOUND_MAX_LIST_WAVS]
int ExpectTokenString(const char *string)
void void Warning(const char *str,...) id_attribute((format(printf
idSoundSystemLocal soundSystemLocal
static idCVar s_maxSoundsPerShader
idSoundCache * soundCache
const idSoundShader * altSound
const char * c_str(void) const
int SkipUntilString(const char *string)
int SamplesToMilliseconds(int samples) const
char * va(const char *fmt,...)
const int SOUND_MAX_LIST_WAVS
virtual void virtual void Warning(const char *fmt,...) id_attribute((format(printf
const int SOUND_MAX_CLASSES
int ReadToken(idToken *token)
virtual void FreeData(void)