doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
snd_local.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #ifndef __SND_LOCAL_H__
30 #define __SND_LOCAL_H__
31 
32 // you need the OpenAL headers for build, even if AL is not enabled - http://www.openal.org/
33 #ifdef _WIN32
34 #include "../openal/include/al.h"
35 #include "../openal/include/alc.h"
36 #include "../openal/idal.h"
37 // broken OpenAL SDK ?
38 #define ID_ALCHAR (ALubyte *)
39 #elif defined( MACOS_X )
40 #include <OpenAL/al.h>
41 #include <OpenAL/alc.h>
42 #define ID_ALCHAR
43 #else
44 #include <AL/al.h>
45 #include <AL/alc.h>
46 #define ID_ALCHAR
47 #endif
48 #include "../openal/include/efxlib.h"
49 
50 // demo sound commands
51 typedef enum {
52  SCMD_STATE, // followed by a load game state
55 
63 
64 const int SOUND_MAX_CHANNELS = 8;
65 const int SOUND_DECODER_FREE_DELAY = 1000 * MIXBUFFER_SAMPLES / USERCMD_MSEC; // four seconds
66 
67 const int PRIMARYFREQ = 44100; // samples per second
68 const float SND_EPSILON = 1.0f / 32768.0f; // if volume is below this, it will always multiply to zero
69 
70 const int ROOM_SLICES_IN_BUFFER = 10;
71 
72 class idAudioHardware;
73 class idAudioBuffer;
74 class idWaveFile;
75 class idSoundCache;
76 class idSoundSample;
77 class idSampleDecoder;
78 class idSoundWorldLocal;
79 
80 
81 /*
82 ===================================================================================
83 
84  General extended waveform format structure.
85  Use this for all NON PCM formats.
86 
87 ===================================================================================
88 */
89 
90 #ifdef WIN32
91 #pragma pack(1)
92 #endif
93 #ifdef __MWERKS__
94 #pragma pack (push, 1)
95 #endif
97  word wFormatTag; /* format type */
98  word nChannels; /* number of channels (i.e. mono, stereo...) */
99  dword nSamplesPerSec; /* sample rate */
100  dword nAvgBytesPerSec; /* for buffer estimation */
101  word nBlockAlign; /* block size of data */
102  word wBitsPerSample; /* Number of bits per sample of mono data */
103  word cbSize; /* The count in bytes of the size of
104  extra information (after cbSize) */
105 } PACKED;
106 
108 
109 /* OLD general waveform format structure (information common to all formats) */
110 struct waveformat_s {
111  word wFormatTag; /* format type */
112  word nChannels; /* number of channels (i.e. mono, stereo, etc.) */
113  dword nSamplesPerSec; /* sample rate */
114  dword nAvgBytesPerSec; /* for buffer estimation */
115  word nBlockAlign; /* block size of data */
116 } PACKED;
117 
119 
120 /* flags for wFormatTag field of WAVEFORMAT */
121 enum {
124 };
125 
126 /* specific waveform format structure for PCM data */
130 } PACKED;
131 
133 
134 #ifndef mmioFOURCC
135 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
136  ( (dword)(byte)(ch0) | ( (dword)(byte)(ch1) << 8 ) | \
137  ( (dword)(byte)(ch2) << 16 ) | ( (dword)(byte)(ch3) << 24 ) )
138 #endif
139 
140 #define fourcc_riff mmioFOURCC('R', 'I', 'F', 'F')
141 
144  union {
145  word wValidBitsPerSample; /* bits of precision */
146  word wSamplesPerBlock; /* valid if wBitsPerSample==0*/
147  word wReserved; /* If neither applies, set to zero*/
148  } Samples;
149  dword dwChannelMask; /* which channels are */
150  /* present in stream */
152 } PACKED;
153 
155 
156 typedef dword fourcc;
157 
158 /* RIFF chunk information data structure */
159 struct mminfo_s {
160  fourcc ckid; /* chunk ID */
161  dword cksize; /* chunk size */
162  fourcc fccType; /* form type or list type */
163  dword dwDataOffset; /* offset of data portion of chunk */
164 } PACKED;
165 
167 
168 #ifdef WIN32
169 #pragma pack()
170 #endif
171 #ifdef __MWERKS__
172 #pragma pack (pop)
173 #endif
174 
175 /*
176 ===================================================================================
177 
178 idWaveFile
179 
180 ===================================================================================
181 */
182 
183 class idWaveFile {
184 public:
185  idWaveFile( void );
186  ~idWaveFile( void );
187 
188  int Open( const char* strFileName, waveformatex_t* pwfx = NULL );
189  int OpenFromMemory( short* pbData, int ulDataSize, waveformatextensible_t* pwfx );
190  int Read( byte* pBuffer, int dwSizeToRead, int *pdwSizeRead );
191  int Seek( int offset );
192  int Close( void );
193  int ResetFile( void );
194 
195  int GetOutputSize( void ) { return mdwSize; }
196  int GetMemorySize( void ) { return mMemSize; }
197 
198  waveformatextensible_t mpwfx; // Pointer to waveformatex structure
199 
200 private:
201  idFile * mhmmio; // I/O handle for the WAVE
202  mminfo_t mck; // Multimedia RIFF chunk
203  mminfo_t mckRiff; // used when opening a WAVE file
204  dword mdwSize; // size in samples
205  dword mMemSize; // size of the wave data in memory
207  ID_TIME_T mfileTime;
208 
210  short * mpbData;
211  short * mpbDataCur;
213 
214  void * ogg; // only !NULL when !s_realTimeDecoding
215  bool isOgg;
216 
217 private:
218  int ReadMMIO( void );
219 
220  int OpenOGG( const char* strFileName, waveformatex_t* pwfx = NULL );
221  int ReadOGG( byte* pBuffer, int dwSizeToRead, int *pdwSizeRead );
222  int CloseOGG( void );
223 };
224 
225 
226 /*
227 ===================================================================================
228 
229 idAudioHardware
230 
231 ===================================================================================
232 */
233 
235 public:
236  static idAudioHardware *Alloc();
237 
238  virtual ~idAudioHardware();
239 
240  virtual bool Initialize( ) = 0;
241 
242  virtual bool Lock( void **pDSLockedBuffer, ulong *dwDSLockedBufferSize ) = 0;
243  virtual bool Unlock( void *pDSLockedBuffer, dword dwDSLockedBufferSize ) = 0;
244  virtual bool GetCurrentPosition( ulong *pdwCurrentWriteCursor ) = 0;
245 
246  // try to write as many sound samples to the device as possible without blocking and prepare for a possible new mixing call
247  // returns wether there is *some* space for writing available
248  virtual bool Flush( void ) = 0;
249 
250  virtual void Write( bool flushing ) = 0;
251 
252  virtual int GetNumberOfSpeakers( void )= 0;
253  virtual int GetMixBufferSize( void ) = 0;
254  virtual short* GetMixBuffer( void ) = 0;
255 };
256 
257 
258 /*
259 ===================================================================================
260 
261 Encapsulates functionality of a DirectSound buffer.
262 
263 ===================================================================================
264 */
265 
267 public:
268  virtual int Play( dword dwPriority=0, dword dwFlags=0 ) = 0;
269  virtual int Stop( void ) = 0;
270  virtual int Reset( void ) = 0;
271  virtual bool IsSoundPlaying( void ) = 0;
272  virtual void SetVolume( float x ) = 0;
273 };
274 
275 
276 /*
277 ===================================================================================
278 
279 idSoundEmitterLocal
280 
281 ===================================================================================
282 */
283 
284 typedef enum {
290 
291 class idSoundFade {
292 public:
295  float fadeStartVolume; // in dB
296  float fadeEndVolume; // in dB
297 
298  void Clear();
299  float FadeDbAt44kHz( int current44kHz );
300 };
301 
302 class SoundFX {
303 protected:
305 
306  int channel;
307  int maxlen;
308 
309  float* buffer;
311 
312  float param;
313 
314 public:
315  SoundFX() { channel = 0; buffer = NULL; initialized = false; maxlen = 0; memset( continuitySamples, 0, sizeof( float ) * 4 ); };
316  virtual ~SoundFX() { if ( buffer ) delete buffer; };
317 
318  virtual void Initialize() { };
319  virtual void ProcessSample( float* in, float* out ) = 0;
320 
321  void SetChannel( int chan ) { channel = chan; };
322  int GetChannel() { return channel; };
323 
324  void SetContinuitySamples( float in1, float in2, float out1, float out2 ) { continuitySamples[0] = in1; continuitySamples[1] = in2; continuitySamples[2] = out1; continuitySamples[3] = out2; }; // FIXME?
325  void GetContinuitySamples( float& in1, float& in2, float& out1, float& out2 ) { in1 = continuitySamples[0]; in2 = continuitySamples[1]; out1 = continuitySamples[2]; out2 = continuitySamples[3]; };
326 
327  void SetParameter( float val ) { param = val; };
328 };
329 
330 class SoundFX_Lowpass : public SoundFX {
331 public:
332  virtual void ProcessSample( float* in, float* out );
333 };
334 
335 class SoundFX_LowpassFast : public SoundFX {
336  float freq;
337  float res;
338  float a1, a2, a3;
339  float b1, b2;
340 
341 public:
342  virtual void ProcessSample( float* in, float* out );
343  void SetParms( float p1 = 0, float p2 = 0, float p3 = 0 );
344 };
345 
346 class SoundFX_Comb : public SoundFX {
348 
349 public:
350  virtual void Initialize();
351  virtual void ProcessSample( float* in, float* out );
352 };
353 
354 class FracTime {
355 public:
356  int time;
357  float frac;
358 
359  void Set( int val ) { time = val; frac = 0; };
360  void Increment( float val ) { frac += val; while ( frac >= 1.f ) { time++; frac--; } };
361 };
362 
363 enum {
366 };
367 
368 class idSoundChannel;
369 
371  bool active;
373 
376 
379 
382 
384 
385  // functions
386  void GenerateSlowChannel( FracTime& playPos, int sampleCount44k, float* finalBuffer );
387 
388  float GetSlowmoSpeed();
389 
390 public:
391 
392  void AttachSoundChannel( const idSoundChannel *chan );
393  void Reset();
394 
395  void GatherChannelSamples( int sampleOffset44k, int sampleCount44k, float *dest );
396 
397  bool IsActive() { return active; };
399 };
400 
402 public:
403  idSoundChannel( void );
404  ~idSoundChannel( void );
405 
406  void Clear( void );
407  void Start( void );
408  void Stop( void );
409  void GatherChannelSamples( int sampleOffset44k, int sampleCount44k, float *dest ) const;
410  void ALStop( void ); // free OpenAL resources if any
411 
413  int trigger44kHzTime; // hardware time sample the channel started
414  int triggerGame44kHzTime; // game time sample time the channel started
415  soundShaderParms_t parms; // combines the shader parms and the per-channel overrides
416  idSoundSample * leadinSample; // if not looped, this is the only sample
420  float diversity;
421  float lastVolume; // last calculated volume based on distance
422  float lastV[6]; // last calculated volume for each speaker, so we can smoothly fade
424  bool triggered;
429 
431 
432 };
433 
435 public:
436 
437  idSoundEmitterLocal( void );
438  virtual ~idSoundEmitterLocal( void );
439 
440  //----------------------------------------------
441 
442  // the "time" parameters should be game time in msec, which is used to make queries
443  // return deterministic values regardless of async buffer scheduling
444 
445  // a non-immediate free will let all currently playing sounds complete
446  virtual void Free( bool immediate );
447 
448  // the parms specified will be the default overrides for all sounds started on this emitter.
449  // NULL is acceptable for parms
450  virtual void UpdateEmitter( const idVec3 &origin, int listenerId, const soundShaderParms_t *parms );
451 
452  // returns the length of the started sound in msec
453  virtual int StartSound( const idSoundShader *shader, const s_channelType channel, float diversity = 0, int shaderFlags = 0, bool allowSlow = true /* D3XP */ );
454 
455  // can pass SCHANNEL_ANY
456  virtual void ModifySound( const s_channelType channel, const soundShaderParms_t *parms );
457  virtual void StopSound( const s_channelType channel );
458  virtual void FadeSound( const s_channelType channel, float to, float over );
459 
460  virtual bool CurrentlyPlaying( void ) const;
461 
462  // can pass SCHANNEL_ANY
463  virtual float CurrentAmplitude( void );
464 
465  // used for save games
466  virtual int Index( void ) const;
467 
468  //----------------------------------------------
469 
470  void Clear( void );
471 
472  void OverrideParms( const soundShaderParms_t *base, const soundShaderParms_t *over, soundShaderParms_t *out );
473  void CheckForCompletion( int current44kHzTime );
474  void Spatialize( idVec3 listenerPos, int listenerArea, idRenderWorld *rw );
475 
476  idSoundWorldLocal * soundWorld; // the world that holds this emitter
477 
478  int index; // in world emitter list
480 
483  soundShaderParms_t parms; // default overrides for all channels
484 
485 
486  // the following are calculated in UpdateEmitter, and don't need to be archived
487  float maxDistance; // greatest of all playing channel distances
488  int lastValidPortalArea; // so an emitter that slides out of the world continues playing
489  bool playing; // if false, no channel is active
490  bool hasShakes;
491  idVec3 spatializedOrigin; // the virtual sound origin, either the real sound origin,
492  // or a point through a portal chain
493  float realDistance; // in meters
494  float distance; // in meters, this may be the straight-line distance, or
495  // it may go through a chain of portals. If there
496  // is not an open-portal path, distance will be > maxDistance
497 
498  // a single soundEmitter can have many channels playing from the same point
500 
502 
504  void SetSlowChannel( const idSoundChannel *chan, idSlowChannel slow );
505  void ResetSlowChannel( const idSoundChannel *chan );
506 
507  // this is just used for feedback to the game or rendering system:
508  // flashing lights and screen shakes. Because the material expression
509  // evaluation doesn't do common subexpression removal, we cache the
510  // last generated value
511  int ampTime;
512  float amplitude;
513 };
514 
515 
516 /*
517 ===================================================================================
518 
519 idSoundWorldLocal
520 
521 ===================================================================================
522 */
523 
524 class s_stats {
525 public:
526  s_stats( void ) {
527  rinuse = 0;
528  runs = 1;
529  timeinprocess = 0;
530  missedWindow = 0;
531  missedUpdateWindow = 0;
532  activeSounds = 0;
533  }
534  int rinuse;
535  int runs;
540 };
541 
542 typedef struct soundPortalTrace_s {
546 
548 public:
549  virtual ~idSoundWorldLocal( void );
550 
551  // call at each map start
552  virtual void ClearAllSoundEmitters( void );
553  virtual void StopAllSounds( void );
554 
555  // get a new emitter that can play sounds in this world
556  virtual idSoundEmitter *AllocSoundEmitter( void );
557 
558  // for load games
559  virtual idSoundEmitter *EmitterForIndex( int index );
560 
561  // query data from all emitters in the world
562  virtual float CurrentShakeAmplitudeForPosition( const int time, const idVec3 &listererPosition );
563 
564  // where is the camera/microphone
565  // listenerId allows listener-private sounds to be added
566  virtual void PlaceListener( const idVec3 &origin, const idMat3 &axis, const int listenerId, const int gameTime, const idStr& areaName );
567 
568  // fade all sounds in the world with a given shader soundClass
569  // to is in Db (sigh), over is in seconds
570  virtual void FadeSoundClasses( const int soundClass, const float to, const float over );
571 
572  // dumps the current state and begins archiving commands
573  virtual void StartWritingDemo( idDemoFile *demo );
574  virtual void StopWritingDemo( void );
575 
576  // read a sound command from a demo file
577  virtual void ProcessDemoCommand( idDemoFile *readDemo );
578 
579  // background music
580  virtual void PlayShaderDirectly( const char *name, int channel = -1 );
581 
582  // pause and unpause the sound world
583  virtual void Pause( void );
584  virtual void UnPause( void );
585  virtual bool IsPaused( void );
586 
587  // avidump
588  virtual void AVIOpen( const char *path, const char *name );
589  virtual void AVIClose( void );
590 
591  // SaveGame Support
592  virtual void WriteToSaveGame( idFile *savefile );
593  virtual void ReadFromSaveGame( idFile *savefile );
594 
595  virtual void ReadFromSaveGameSoundChannel( idFile *saveGame, idSoundChannel *ch );
597  virtual void WriteToSaveGameSoundChannel( idFile *saveGame, idSoundChannel *ch );
598  virtual void WriteToSaveGameSoundShaderParams( idFile *saveGame, soundShaderParms_t *params );
599 
600  virtual void SetSlowmo( bool active );
601  virtual void SetSlowmoSpeed( float speed );
602  virtual void SetEnviroSuit( bool active );
603 
604  //=======================================
605 
606  idSoundWorldLocal( void );
607 
608  void Shutdown( void );
609  void Init( idRenderWorld *rw );
610  void ClearBuffer( void );
611 
612  // update
613  void ForegroundUpdate( int currentTime );
614  void OffsetSoundTime( int offset44kHz );
615 
617  void CalcEars( int numSpeakers, idVec3 realOrigin, idVec3 listenerPos, idMat3 listenerAxis, float ears[6], float spatialize );
619  int current44kHz, int numSpeakers, float *finalMixBuffer );
620  void MixLoop( int current44kHz, int numSpeakers, float *finalMixBuffer );
621  void AVIUpdate( void );
622  void ResolveOrigin( const int stackDepth, const soundPortalTrace_t *prevStack, const int soundArea, const float dist, const idVec3& soundOrigin, idSoundEmitterLocal *def );
623  float FindAmplitude( idSoundEmitterLocal *sound, const int localTime, const idVec3 *listenerPosition, const s_channelType channel, bool shakesOnly );
624 
625  //============================================
626 
627  idRenderWorld * rw; // for portals and debug drawing
628  idDemoFile * writeDemo; // if not NULL, archive commands here
629 
631  idVec3 listenerPos; // position in meters
633  idVec3 listenerQU; // position in "quake units"
637 
638  int gameMsec;
641  int lastAVI44kHz; // determine when we need to mix and write another block
642 
644 
645  idSoundFade soundClassFade[SOUND_MAX_CLASSES]; // for global sound fading
646 
647  // avi stuff
648  idFile * fpa[6];
651 
652  idSoundEmitterLocal * localSound; // just for playShaderDirectly()
653 
655  float slowmoSpeed;
657 };
658 
659 /*
660 ===================================================================================
661 
662 idSoundSystemLocal
663 
664 ===================================================================================
665 */
666 
667 typedef struct {
671  bool inUse;
672  bool looping;
673  bool stereo;
675 
677 public:
679  isInitialized = false;
680  }
681 
682  // all non-hardware initialization
683  virtual void Init( void );
684 
685  // shutdown routine
686  virtual void Shutdown( void );
687  virtual void ClearBuffer( void );
688 
689  // sound is attached to the window, and must be recreated when the window is changed
690  virtual bool ShutdownHW( void );
691  virtual bool InitHW( void );
692 
693  // async loop, called at 60Hz
694  virtual int AsyncUpdate( int time );
695  // async loop, when the sound driver uses a write strategy
696  virtual int AsyncUpdateWrite( int time );
697  // direct mixing called from the sound driver thread for OSes that support it
698  virtual int AsyncMix( int soundTime, float *mixBuffer );
699 
700  virtual void SetMute( bool mute );
701 
702  virtual cinData_t ImageForTime( const int milliseconds, const bool waveform );
703 
704  int GetSoundDecoderInfo( int index, soundDecoderInfo_t &decoderInfo );
705 
706  // if rw == NULL, no portal occlusion or rendered debugging is available
708 
709  // specifying NULL will cause silence to be played
710  virtual void SetPlayingSoundWorld( idSoundWorld *soundWorld );
711 
712  // some tools, like the sound dialog, may be used in both the game and the editor
713  // This can return NULL, so check!
714  virtual idSoundWorld *GetPlayingSoundWorld( void );
715 
716  virtual void BeginLevelLoad( void );
717  virtual void EndLevelLoad( const char *mapString );
718 
719  virtual void PrintMemInfo( MemInfo_t *mi );
720 
721  virtual int IsEAXAvailable( void );
722 
723  //-------------------------
724 
725  int GetCurrent44kHzTime( void ) const;
726  float dB2Scale( const float val ) const;
727  int SamplesToMilliseconds( int samples ) const;
728  int MillisecondsToSamples( int ms ) const;
729 
730  void DoEnviroSuit( float* samples, int numSamples, int numSpeakers );
731 
732  ALuint AllocOpenALSource( idSoundChannel *chan, bool looping, bool stereo );
733  void FreeOpenALSource( ALuint handle );
734 
737 
738  idSoundWorldLocal * currentSoundWorld; // the one to mix each async tic
739 
740  int olddwCurrentWritePos; // statistics
741  int buffers; // statistics
742  int CurrentSoundTime; // set by the async thread and only used by the main thread
743 
744  unsigned int nextWriteBlock;
745 
747  float * finalMixBuffer; // points inside realAccum at a 16 byte aligned boundary
748 
750  bool muted;
751  bool shutdown;
752 
753  s_stats soundStats; // NOTE: updated throughout the code, not displayed anywhere
754 
755  int meterTops[256];
756  int meterTopsTime[256];
757 
759 
760  float volumesDB[1200]; // dB to float volume conversion
761 
763 
768  EAXSet alEAXSet;
769  EAXGet alEAXGet;
770  EAXSetBufferMode alEAXSetBufferMode;
771  EAXGetBufferMode alEAXGetBufferMode;
773  bool efxloaded;
774  // latches
775  static bool useOpenAL;
776  static bool useEAXReverb;
777  // mark available during initialization, or through an explicit test
778  static int EAXAvailable;
779 
780 
794  static idCVar s_volume;
811 
813 
818 
823 };
824 
826 
827 
828 /*
829 ===================================================================================
830 
831  This class holds the actual wavefile bitmap, size, and info.
832 
833 ===================================================================================
834 */
835 
836 const int SCACHE_SIZE = MIXBUFFER_SAMPLES*20; // 1/2 of a second (aroundabout)
837 
839 public:
840  idSoundSample();
841  ~idSoundSample();
842 
843  idStr name; // name of the sample file
844  ID_TIME_T timestamp; // the most recent of all images used in creation, for reloadImages command
845 
846  waveformatex_t objectInfo; // what are we caching
847  int objectSize; // size of waveform in samples, excludes the header
848  int objectMemSize; // object size in memory
849  byte * nonCacheData; // if it's not cached
850  byte * amplitudeData; // precomputed min,max amplitude pairs
851  ALuint openalBuffer; // openal buffer
854  bool onDemand;
855  bool purged;
856  bool levelLoadReferenced; // so we can tell which samples aren't needed any more
857 
858  int LengthIn44kHzSamples() const;
859  ID_TIME_T GetNewTimeStamp( void ) const;
860  void MakeDefault(); // turns it into a beep
861  void Load(); // loads the current sound based on name
862  void Reload( bool force ); // reloads if timestamp has changed, or always if force
863  void PurgeSoundSample(); // frees all data
864  void CheckForDownSample(); // down sample if required
865  bool FetchFromCache( int offset, const byte **output, int *position, int *size, const bool allowIO );
866 };
867 
868 
869 /*
870 ===================================================================================
871 
872  Sound sample decoder.
873 
874 ===================================================================================
875 */
876 
878 public:
879  static void Init( void );
880  static void Shutdown( void );
881  static idSampleDecoder *Alloc( void );
882  static void Free( idSampleDecoder *decoder );
883  static int GetNumUsedBlocks( void );
884  static int GetUsedBlockMemory( void );
885 
886  virtual ~idSampleDecoder( void ) {}
887  virtual void Decode( idSoundSample *sample, int sampleOffset44k, int sampleCount44k, float *dest ) = 0;
888  virtual void ClearDecoder( void ) = 0;
889  virtual idSoundSample * GetSample( void ) const = 0;
890  virtual int GetLastDecodeTime( void ) const = 0;
891 };
892 
893 
894 /*
895 ===================================================================================
896 
897  The actual sound cache.
898 
899 ===================================================================================
900 */
901 
903 public:
904  idSoundCache();
905  ~idSoundCache();
906 
907  idSoundSample * FindSound( const idStr &fname, bool loadOnDemandOnly );
908 
909  const int GetNumObjects( void ) { return listCache.Num(); }
910  const idSoundSample * GetObject( const int index ) const;
911 
912  void ReloadSounds( bool force );
913 
914  void BeginLevelLoad();
915  void EndLevelLoad();
916 
917  void PrintMemInfo( MemInfo_t *mi );
918 
919 private:
922 };
923 
924 #endif /* !__SND_LOCAL_H__ */
dword nAvgBytesPerSec
Definition: snd_local.h:114
idSlowChannel GetSlowChannel(const idSoundChannel *chan)
void Set(int val)
Definition: snd_local.h:359
idSoundWorldLocal * currentSoundWorld
Definition: snd_local.h:738
int GetMemorySize(void)
Definition: snd_local.h:196
soundShaderParms_t parms
Definition: snd_local.h:415
static idCVar s_force22kHz
Definition: snd_local.h:803
idSoundChannel * chan
Definition: snd_local.h:670
idSoundChannel channels[SOUND_MAX_CHANNELS]
Definition: snd_local.h:499
virtual void SetPlayingSoundWorld(idSoundWorld *soundWorld)
void GetContinuitySamples(float &in1, float &in2, float &out1, float &out2)
Definition: snd_local.h:325
unsigned int dword
Definition: Lib.h:77
virtual int AsyncUpdate(int time)
Definition: snd_system.cpp:626
waveformatextensible_t mpwfx
Definition: snd_local.h:198
dword mdwSize
Definition: snd_local.h:204
void SetChannel(int chan)
Definition: snd_local.h:321
virtual bool Initialize()=0
static idSampleDecoder * Alloc(void)
void ALStop(void)
virtual bool Flush(void)=0
const idSoundShader * soundShader
Definition: snd_local.h:418
float param
Definition: snd_local.h:312
idMat3 listenerAxis
Definition: snd_local.h:630
EAXGetBufferMode alEAXGetBufferMode
Definition: snd_local.h:771
ALuint handle
Definition: snd_local.h:668
static idCVar s_enviroSuitCutoffFreq
Definition: snd_local.h:814
void ClearBuffer(void)
float lastVolume
Definition: snd_local.h:421
static idCVar s_meterTopTime
Definition: snd_local.h:793
virtual idSoundEmitter * EmitterForIndex(int index)
Definition: snd_world.cpp:1390
float continuitySamples[4]
Definition: snd_local.h:310
word nChannels
Definition: snd_local.h:98
virtual void ClearBuffer(void)
Definition: snd_system.cpp:574
virtual bool CurrentlyPlaying(void) const
idSoundFade soundClassFade[SOUND_MAX_CLASSES]
Definition: snd_local.h:645
void ForegroundUpdate(int currentTime)
Definition: snd_world.cpp:959
virtual void Free(bool immediate)
idList< idSoundEmitterLocal * > emitters
Definition: snd_local.h:643
static idCVar s_reverbTime
Definition: snd_local.h:819
int meterTops[256]
Definition: snd_local.h:755
waveformat_s waveformat_t
Definition: snd_local.h:118
static bool useEAXReverb
Definition: snd_local.h:776
int meterTopsTime[256]
Definition: snd_local.h:756
const idSoundChannel * chan
Definition: snd_local.h:372
bool FetchFromCache(int offset, const byte **output, int *position, int *size, const bool allowIO)
Definition: snd_cache.cpp:689
virtual void ProcessSample(float *in, float *out)
static idCVar s_numberOfSpeakers
Definition: snd_local.h:802
const int GetNumObjects(void)
Definition: snd_local.h:909
virtual bool Lock(void **pDSLockedBuffer, ulong *dwDSLockedBufferSize)=0
void GatherChannelSamples(int sampleOffset44k, int sampleCount44k, float *dest)
int listenerEnvironmentID
Definition: snd_local.h:636
int GetChannel()
Definition: snd_local.h:322
virtual void UpdateEmitter(const idVec3 &origin, int listenerId, const soundShaderParms_t *parms)
const int MIXBUFFER_SAMPLES
Definition: Simd.h:84
float dB2Scale(const float val) const
Definition: snd_system.cpp:820
FracTime curPosition
Definition: snd_local.h:380
int trigger44kHzTime
Definition: snd_local.h:413
bool hardwareBuffer
Definition: snd_local.h:852
virtual void Pause(void)
Definition: snd_world.cpp:1420
struct waveformatex_s PACKED
int runs
Definition: snd_local.h:535
union waveformatextensible_s::@96 Samples
float FindAmplitude(idSoundEmitterLocal *sound, const int localTime, const idVec3 *listenerPosition, const s_channelType channel, bool shakesOnly)
Definition: snd_world.cpp:1926
void FreeOpenALSource(ALuint handle)
virtual void WriteToSaveGameSoundChannel(idFile *saveGame, idSoundChannel *ch)
Definition: snd_world.cpp:1192
bool isOgg
Definition: snd_local.h:215
virtual void StopWritingDemo(void)
Definition: snd_world.cpp:233
bool levelLoadReferenced
Definition: snd_local.h:856
virtual void ProcessSample(float *in, float *out)
GLfloat param
Definition: glext.h:3038
int newSampleOffset
Definition: snd_local.h:378
virtual float CurrentShakeAmplitudeForPosition(const int time, const idVec3 &listererPosition)
Definition: snd_world.cpp:388
int currentTime
Definition: snd_local.h:347
virtual idSoundSample * GetSample(void) const =0
static int GetNumUsedBlocks(void)
virtual void ReadFromSaveGame(idFile *savefile)
Definition: snd_world.cpp:1219
static idCVar s_libOpenAL
Definition: snd_local.h:806
virtual ~idSampleDecoder(void)
Definition: snd_local.h:886
virtual void FadeSound(const s_channelType channel, float to, float over)
virtual cinData_t ImageForTime(const int milliseconds, const bool waveform)
Definition: snd_system.cpp:837
dword mseekBase
Definition: snd_local.h:206
int MillisecondsToSamples(int ms) const
fourcc ckid
Definition: snd_local.h:160
static idCVar s_skipHelltimeFX
Definition: snd_local.h:822
Definition: Vector.h:316
int objectMemSize
Definition: snd_local.h:848
static int EAXAvailable
Definition: snd_local.h:778
static idCVar s_dotbias6
Definition: snd_local.h:785
int GetCurrent44kHzTime(void) const
Definition: snd_system.cpp:559
void ReloadSounds(bool force)
Definition: snd_cache.cpp:137
void DoEnviroSuit(float *samples, int numSamples, int numSpeakers)
virtual void ClearDecoder(void)=0
virtual void ModifySound(const s_channelType channel, const soundShaderParms_t *parms)
static idCVar s_spatializationDecay
Definition: snd_local.h:788
void ResolveOrigin(const int stackDepth, const soundPortalTrace_t *prevStack, const int soundArea, const float dist, const idVec3 &soundOrigin, idSoundEmitterLocal *def)
Definition: snd_world.cpp:734
ALuint lastopenalStreamingBuffer[3]
Definition: snd_local.h:428
idAudioHardware * snd_audio_hw
Definition: snd_local.h:735
static idCVar s_slowAttenuate
Definition: snd_local.h:812
int Seek(int offset)
virtual idSoundEmitter * AllocSoundEmitter(void)
Definition: snd_world.cpp:194
void EndLevelLoad()
Definition: snd_cache.cpp:184
idFile * fpa[6]
Definition: snd_local.h:648
static idCVar s_muteEAXReverb
Definition: snd_local.h:809
int s_channelType
Definition: sound.h:147
static idCVar s_dotbias2
Definition: snd_local.h:787
int ReadMMIO(void)
void SetSlowChannel(const idSoundChannel *chan, idSlowChannel slow)
FracTime GetCurrentPosition()
Definition: snd_local.h:398
idSoundSample * FindSound(const idStr &fname, bool loadOnDemandOnly)
Definition: snd_cache.cpp:86
mminfo_t mck
Definition: snd_local.h:202
waveformatex_s waveformatex_t
Definition: snd_local.h:107
virtual idSoundWorld * AllocSoundWorld(idRenderWorld *rw)
static idCVar s_decompressionLimit
Definition: snd_local.h:810
GLenum GLint x
Definition: glext.h:2849
virtual int GetNumberOfSpeakers(void)=0
static idCVar s_useOcclusion
Definition: snd_local.h:797
GLintptr offset
Definition: glext.h:3113
static idCVar s_quadraticFalloff
Definition: snd_local.h:782
int rinuse
Definition: snd_local.h:534
int Open(const char *strFileName, waveformatex_t *pwfx=NULL)
virtual int Play(dword dwPriority=0, dword dwFlags=0)=0
ALuint openalSource
Definition: snd_local.h:425
static idCVar s_playDefaultSound
Definition: snd_local.h:796
idList< idSoundSample * > listCache
Definition: snd_local.h:921
virtual bool Unlock(void *pDSLockedBuffer, dword dwDSLockedBufferSize)=0
const int ROOM_SLICES_IN_BUFFER
Definition: snd_local.h:70
virtual void Shutdown(void)
Definition: snd_system.cpp:436
float diversity
Definition: snd_local.h:420
unsigned ALuint
OpenAL 32bit unsigned integer type.
Definition: altypes.h:45
virtual void Initialize()
virtual void ProcessDemoCommand(idDemoFile *readDemo)
Definition: snd_world.cpp:244
Definition: File.h:50
bool IsActive()
Definition: snd_local.h:397
int LengthIn44kHzSamples() const
Definition: snd_cache.cpp:317
virtual void Init(void)
Definition: snd_system.cpp:298
void SetParms(float p1=0, float p2=0, float p3=0)
unsigned int ALsizei
OpenAL 32bit type.
Definition: altypes.h:57
virtual void FadeSoundClasses(const int soundClass, const float to, const float over)
Definition: snd_world.cpp:2085
s_stats soundStats
Definition: snd_local.h:753
float fadeEndVolume
Definition: snd_local.h:296
void AVIUpdate(void)
Definition: snd_world.cpp:577
float lastV[6]
Definition: snd_local.h:422
const int USERCMD_MSEC
Definition: UsercmdGen.h:41
virtual void SetSlowmoSpeed(float speed)
Definition: snd_world.cpp:2130
void CheckForCompletion(int current44kHzTime)
virtual void SetEnviroSuit(bool active)
Definition: snd_world.cpp:2139
float volumesDB[1200]
Definition: snd_local.h:760
void BeginLevelLoad()
Definition: snd_cache.cpp:158
static int GetUsedBlockMemory(void)
void ResetSlowChannel(const idSoundChannel *chan)
int playbackState
Definition: snd_local.h:374
virtual void Initialize()
Definition: snd_local.h:318
virtual void StopAllSounds(void)
Definition: snd_world.cpp:1407
short * mpbDataCur
Definition: snd_local.h:211
idSoundWorldLocal(void)
Definition: snd_world.cpp:81
void PrintMemInfo(MemInfo_t *mi)
Definition: snd_cache.cpp:222
virtual int Reset(void)=0
bool triggerState
Definition: snd_local.h:412
idEFXFile EFXDatabase
Definition: snd_local.h:772
const struct soundPortalTrace_s * prevStack
Definition: snd_local.h:544
GLuint index
Definition: glext.h:3476
void Clear(void)
void Init(idRenderWorld *rw)
Definition: snd_world.cpp:39
static void Shutdown(void)
virtual int IsEAXAvailable(void)
word nBlockAlign
Definition: snd_local.h:101
void MixLoop(int current44kHz, int numSpeakers, float *finalMixBuffer)
Definition: snd_world.cpp:420
virtual void UnPause(void)
Definition: snd_world.cpp:1434
idSlowChannel slowChannels[SOUND_MAX_CHANNELS]
Definition: snd_local.h:501
int OpenFromMemory(short *pbData, int ulDataSize, waveformatextensible_t *pwfx)
void AddChannelContribution(idSoundEmitterLocal *sound, idSoundChannel *chan, int current44kHz, int numSpeakers, float *finalMixBuffer)
Definition: snd_world.cpp:1570
SoundFX_LowpassFast lowpass
Definition: snd_local.h:383
idSampleDecoder * decoder
Definition: snd_local.h:419
idFile * mhmmio
Definition: snd_local.h:201
virtual void SetMute(bool mute)
static idCVar s_enviroSuitCutoffQ
Definition: snd_local.h:815
int fadeEnd44kHz
Definition: snd_local.h:294
word wFormatTag
Definition: snd_local.h:111
waveformat_t wf
Definition: snd_local.h:128
int OpenOGG(const char *strFileName, waveformatex_t *pwfx=NULL)
static idCVar s_constantAmplitude
Definition: snd_local.h:795
#define NULL
Definition: Lib.h:88
dword nSamplesPerSec
Definition: snd_local.h:99
removeStatus_t removeStatus
Definition: snd_local.h:479
static idCVar s_useOpenAL
Definition: snd_local.h:807
int Close(void)
GLuint buffer
Definition: glext.h:3108
bool insideLevelLoad
Definition: snd_local.h:920
ALCvoid ALCdevice
Definition: alc.h:28
static idCVar s_reverbFeedback
Definition: snd_local.h:820
void CalcEars(int numSpeakers, idVec3 realOrigin, idVec3 listenerPos, idMat3 listenerAxis, float ears[6], float spatialize)
Definition: snd_world.cpp:1503
short * mpbData
Definition: snd_local.h:210
word nBlockAlign
Definition: snd_local.h:115
ALuint openalStreamingOffset
Definition: snd_local.h:426
static void Free(idSampleDecoder *decoder)
virtual bool GetCurrentPosition(ulong *pdwCurrentWriteCursor)=0
virtual bool IsPaused(void)
Definition: snd_world.cpp:1453
idList< SoundFX * > fxList
Definition: snd_local.h:762
int missedUpdateWindow
Definition: snd_local.h:538
virtual int Stop(void)=0
virtual bool InitHW(void)
Definition: snd_system.cpp:493
idWaveFile(void)
idSoundEmitterLocal * AllocLocalSoundEmitter()
Definition: snd_world.cpp:144
const char * path
Definition: sws.c:117
virtual void WriteToSaveGameSoundShaderParams(idFile *saveGame, soundShaderParms_t *params)
Definition: snd_world.cpp:1178
void SetParameter(float val)
Definition: snd_local.h:327
void MakeDefault()
Definition: snd_cache.cpp:333
virtual void StartWritingDemo(idDemoFile *demo)
Definition: snd_world.cpp:216
idSoundFade channelFade
Definition: snd_local.h:423
virtual bool IsSoundPlaying(void)=0
static idCVar s_drawSounds
Definition: snd_local.h:783
static idCVar s_clipVolumes
Definition: snd_local.h:804
int Read(byte *pBuffer, int dwSizeToRead, int *pdwSizeRead)
struct soundPortalTrace_s soundPortalTrace_t
~idWaveFile(void)
void * ogg
Definition: snd_local.h:214
virtual void EndLevelLoad(const char *mapString)
void Start(void)
waveformatextensible_s waveformatextensible_t
Definition: snd_local.h:154
ALuint openalBuffer
Definition: snd_local.h:851
const float SND_EPSILON
Definition: snd_local.h:68
static idCVar s_showLevelMeter
Definition: snd_local.h:792
word wBitsPerSample
Definition: snd_local.h:102
idSoundSample * leadinSample
Definition: snd_local.h:416
s_stats(void)
Definition: snd_local.h:526
static void Init(void)
const int SCACHE_SIZE
Definition: snd_local.h:836
void AttachSoundChannel(const idSoundChannel *chan)
void Reload(bool force)
Definition: snd_cache.cpp:658
virtual short * GetMixBuffer(void)=0
static idCVar s_volume
Definition: snd_local.h:794
mminfo_t mckRiff
Definition: snd_local.h:203
virtual ~idSoundWorldLocal(void)
Definition: snd_world.cpp:89
virtual void ProcessSample(float *in, float *out)=0
void Stop(void)
virtual void StopSound(const s_channelType channel)
virtual int GetLastDecodeTime(void) const =0
dword mMemSize
Definition: snd_local.h:205
void Clear()
Definition: snd_emitter.cpp:40
fourcc fccType
Definition: snd_local.h:162
pcmwaveformat_s pcmwaveformat_t
Definition: snd_local.h:132
idSoundEmitterLocal * localSound
Definition: snd_local.h:652
virtual int StartSound(const idSoundShader *shader, const s_channelType channel, float diversity=0, int shaderFlags=0, bool allowSlow=true)
bool defaultSound
Definition: snd_local.h:853
float GetSlowmoSpeed()
virtual void BeginLevelLoad(void)
static idCVar s_doorDistanceAdd
Definition: snd_local.h:800
static idCVar s_useEAXReverb
Definition: snd_local.h:808
EAXSetBufferMode alEAXSetBufferMode
Definition: snd_local.h:770
removeStatus_t
Definition: snd_local.h:284
static idCVar s_enviroSuitSkipLowpass
Definition: snd_local.h:816
word wBitsPerSample
Definition: snd_local.h:129
Definition: Matrix.h:333
idSoundSystemLocal soundSystemLocal
Definition: snd_system.cpp:91
virtual void ClearAllSoundEmitters(void)
Definition: snd_world.cpp:123
static idCVar s_minVolume2
Definition: snd_local.h:786
virtual void PlaceListener(const idVec3 &origin, const idMat3 &axis, const int listenerId, const int gameTime, const idStr &areaName)
Definition: snd_world.cpp:891
void GatherChannelSamples(int sampleOffset44k, int sampleCount44k, float *dest) const
void GenerateSlowChannel(FracTime &playPos, int sampleCount44k, float *finalBuffer)
int missedWindow
Definition: snd_local.h:537
float realAccum[6 *MIXBUFFER_SAMPLES+16]
Definition: snd_local.h:746
virtual ~SoundFX()
Definition: snd_local.h:316
virtual void ReadFromSaveGameSoundShaderParams(idFile *saveGame, soundShaderParms_t *params)
Definition: snd_world.cpp:1348
dword fourcc
Definition: snd_local.h:156
ID_TIME_T GetNewTimeStamp(void) const
Definition: snd_cache.cpp:415
virtual int GetMixBufferSize(void)=0
float frac
Definition: snd_local.h:357
int triggerOffset
Definition: snd_local.h:375
waveformatex_t Format
Definition: snd_local.h:143
tuple f
Definition: idal.py:89
virtual void Write(bool flushing)=0
unsigned short word
Definition: Lib.h:76
GLuint in
Definition: glext.h:5388
dword cksize
Definition: snd_local.h:161
bool initialized
Definition: snd_local.h:304
int Num(void) const
Definition: List.h:265
unsigned char byte
Definition: Lib.h:75
static idCVar s_enviroSuitVolumeScale
Definition: snd_local.h:821
static idCVar s_maxSoundsPerShader
Definition: snd_local.h:790
const GLcharARB * name
Definition: glext.h:3629
idSoundCache * soundCache
Definition: snd_local.h:736
GLsizeiptr size
Definition: glext.h:3112
ALCvoid ALCcontext
Definition: alc.h:29
openalSource_t openalSources[256]
Definition: snd_local.h:767
void SetContinuitySamples(float in1, float in2, float out1, float out2)
Definition: snd_local.h:324
const idSoundSample * GetObject(const int index) const
Definition: snd_cache.cpp:72
virtual idSoundWorld * GetPlayingSoundWorld(void)
mminfo_s mminfo_t
Definition: snd_local.h:166
ALuint openalStreamingBuffer[3]
Definition: snd_local.h:427
Definition: Str.h:116
static bool useOpenAL
Definition: snd_local.h:775
virtual void ReadFromSaveGameSoundChannel(idFile *saveGame, idSoundChannel *ch)
Definition: snd_world.cpp:1362
SoundFX()
Definition: snd_local.h:315
int fadeStart44kHz
Definition: snd_local.h:293
void Shutdown(void)
Definition: snd_world.cpp:100
virtual void PlayShaderDirectly(const char *name, int channel=-1)
Definition: snd_world.cpp:1466
int curSampleOffset
Definition: snd_local.h:381
idDemoFile * writeDemo
Definition: snd_local.h:628
virtual int Index(void) const
int channel
Definition: snd_local.h:306
int time
Definition: snd_local.h:356
dword dwDataOffset
Definition: snd_local.h:163
int GetOutputSize(void)
Definition: snd_local.h:195
virtual void SetSlowmo(bool active)
Definition: snd_world.cpp:2121
static idCVar s_reverse
Definition: snd_local.h:791
const int SOUND_DECODER_FREE_DELAY
Definition: snd_local.h:65
virtual bool ShutdownHW(void)
Definition: snd_system.cpp:531
idStr listenerAreaName
Definition: snd_local.h:635
int CloseOGG(void)
static idCVar s_globalFraction
Definition: snd_local.h:799
soundShaderParms_t parms
Definition: snd_local.h:483
ID_TIME_T mfileTime
Definition: snd_local.h:207
dword nAvgBytesPerSec
Definition: snd_local.h:100
static idCVar s_subFraction
Definition: snd_local.h:798
void PurgeSoundSample()
Definition: snd_cache.cpp:628
float * finalMixBuffer
Definition: snd_local.h:747
virtual void Decode(idSoundSample *sample, int sampleOffset44k, int sampleCount44k, float *dest)=0
virtual int AsyncMix(int soundTime, float *mixBuffer)
Definition: snd_system.cpp:600
ALsizei openalSourceCount
Definition: snd_local.h:766
unsigned long ulong
Definition: Lib.h:79
idVec3 spatializedOrigin
Definition: snd_local.h:491
void CheckForDownSample()
Definition: snd_cache.cpp:382
int maxlen
Definition: snd_local.h:307
int ResetFile(void)
virtual ~idSoundEmitterLocal(void)
int SamplesToMilliseconds(int samples) const
ALuint AllocOpenALSource(idSoundChannel *chan, bool looping, bool stereo)
float * buffer
Definition: snd_local.h:309
ALCcontext * openalContext
Definition: snd_local.h:765
idVec3 listenerPos
Definition: snd_local.h:631
int GetSoundDecoderInfo(int index, soundDecoderInfo_t &decoderInfo)
Definition: snd_system.cpp:995
static idCVar s_noSound
Definition: snd_local.h:781
static idAudioHardware * Alloc()
Definition: sound.cpp:52
waveformatex_t objectInfo
Definition: snd_local.h:846
const int PRIMARYFREQ
Definition: snd_local.h:67
virtual void AVIClose(void)
Definition: snd_world.cpp:624
FracTime newPosition
Definition: snd_local.h:377
dword nSamplesPerSec
Definition: snd_local.h:113
bool disallowSlow
Definition: snd_local.h:430
static idCVar s_showStartSound
Definition: snd_local.h:789
idRenderWorld * rw
Definition: snd_local.h:627
void OverrideParms(const soundShaderParms_t *base, const soundShaderParms_t *over, soundShaderParms_t *out)
ID_TIME_T timestamp
Definition: snd_local.h:844
virtual int AsyncUpdateWrite(int time)
Definition: snd_system.cpp:748
bool mbIsReadingFromMemory
Definition: snd_local.h:209
virtual void WriteToSaveGame(idFile *savefile)
Definition: snd_world.cpp:1094
const int SOUND_MAX_CLASSES
Definition: sound.h:74
virtual void SetVolume(float x)=0
byte * amplitudeData
Definition: snd_local.h:850
idSoundWorldLocal * soundWorld
Definition: snd_local.h:476
virtual void ProcessSample(float *in, float *out)
byte * nonCacheData
Definition: snd_local.h:849
void Spatialize(idVec3 listenerPos, int listenerArea, idRenderWorld *rw)
static idCVar s_realTimeDecoding
Definition: snd_local.h:805
int ReadOGG(byte *pBuffer, int dwSizeToRead, int *pdwSizeRead)
ALCdevice * openalDevice
Definition: snd_local.h:764
int timeinprocess
Definition: snd_local.h:536
word nChannels
Definition: snd_local.h:112
virtual void AVIOpen(const char *path, const char *name)
Definition: snd_world.cpp:547
virtual void PrintMemInfo(MemInfo_t *mi)
s_channelType triggerChannel
Definition: snd_local.h:417
int triggerGame44kHzTime
Definition: snd_local.h:414
float FadeDbAt44kHz(int current44kHz)
Definition: snd_emitter.cpp:52
soundDemoCommand_t
Definition: snd_local.h:51
dword mulDataSize
Definition: snd_local.h:212
static idCVar s_enviroSuitSkipReverb
Definition: snd_local.h:817
virtual ~idAudioHardware()
Definition: sound.cpp:78
static idCVar s_singleEmitter
Definition: snd_local.h:801
static idCVar s_minVolume6
Definition: snd_local.h:784
const int SOUND_MAX_CHANNELS
Definition: snd_local.h:64
virtual float CurrentAmplitude(void)
void OffsetSoundTime(int offset44kHz)
Definition: snd_world.cpp:1070
GLenum const GLfloat * params
Definition: glext.h:2847
void Increment(float val)
Definition: snd_local.h:360
float fadeStartVolume
Definition: snd_local.h:295
int activeSounds
Definition: snd_local.h:539
word wFormatTag
Definition: snd_local.h:97
unsigned int nextWriteBlock
Definition: snd_local.h:744