TORCS  1.3.9
The Open Racing Car Simulator
SoundInterface.h File Reference
#include <plib/sl.h>
#include <plib/sg.h>
#include <raceman.h>
#include <vector>
#include "TorcsSound.h"
#include "QSoundChar.h"
Include dependency graph for SoundInterface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QueueSoundMap_
 A queue containing mappings between sounds and sound sources. More...
 
struct  SoundPri_
 Sound priority, used to sort cars according to amplitude attenuation. More...
 
class  SoundInterface
 Sound interface. More...
 
class  PlibSoundInterface
 PLIB interface. More...
 
struct  PlibSoundInterface::SoundChar_
 
class  OpenalSoundInterface
 
struct  OpenalSoundInterface::SoundChar_
 
struct  sharedSource
 
class  SharedSourcePool
 

Macros

#define USE_OPENAL   1
 
#define logmsg   empty_log
 
#define VOLUME_CUTOFF   0.001f
 

Typedefs

typedef struct QueueSoundMap_ QueueSoundMap
 A queue containing mappings between sounds and sound sources. More...
 
typedef struct SoundPri_ SoundPri
 Sound priority, used to sort cars according to amplitude attenuation. More...
 

Enumerations

enum  SoundPriState {
  None =0x0, Loaded, Playing, Paused,
  Stopped, Cleared
}
 Current state of sound. More...
 

Functions

static void empty_log (const char *s,...)
 
int sortSndPriority (const void *a, const void *b)
 

Macro Definition Documentation

◆ logmsg

#define logmsg   empty_log

Definition at line 30 of file SoundInterface.h.

◆ USE_OPENAL

#define USE_OPENAL   1

Definition at line 22 of file SoundInterface.h.

◆ VOLUME_CUTOFF

#define VOLUME_CUTOFF   0.001f

Definition at line 48 of file SoundInterface.h.

Typedef Documentation

◆ QueueSoundMap

typedef struct QueueSoundMap_ QueueSoundMap

A queue containing mappings between sounds and sound sources.

Provides a mapping various sound sources and actual sounds. This is used for the case where we have many sound sources emitting exactly the same sound and where we don't allow more than 1 source to play simultaneously. This structure can be used to sort competing sources in order to decide which one is going to take priority.

See also
SortSingleQueue(), SetMaxSoundChar()

◆ SoundPri

typedef struct SoundPri_ SoundPri

Sound priority, used to sort cars according to amplitude attenuation.

Enumeration Type Documentation

◆ SoundPriState

Current state of sound.

Enumerator
None 
Loaded 
Playing 
Paused 
Stopped 
Cleared 

Definition at line 71 of file SoundInterface.h.

Function Documentation

◆ empty_log()

static void empty_log ( const char *  s,
  ... 
)
static

Definition at line 31 of file SoundInterface.h.

◆ sortSndPriority()

int sortSndPriority ( const void *  a,
const void *  b 
)

Definition at line 223 of file PlibSoundInterface.cpp.