Sound interface.
More...
#include <SoundInterface.h>
|
| | SoundInterface (float sampling_rate, int n_channels) |
| | Make a new sound interface. More...
|
| |
| virtual | ~SoundInterface () |
| | Destructor - does nothing. More...
|
| |
| virtual void | setNCars (int n_cars)=0 |
| | Set the number of cars - must be defined in children classes. More...
|
| |
| virtual TorcsSound * | addSample (const char *filename, int flags=(ACTIVE_VOLUME|ACTIVE_PITCH), bool loop=false, bool static_pool=true)=0 |
| | Add a new sample - must be defined in children classes. More...
|
| |
| virtual void | initSharedSourcePool () |
| | initialised the pool of shared sources More...
|
| |
| void | setSkidSound (const char *sound_name) |
| |
| void | setRoadRideSound (const char *sound_name) |
| |
| void | setGrassRideSound (const char *sound_name) |
| |
| void | setCurbRideSound (const char *sound_name) |
| |
| void | setGrassSkidSound (const char *sound_name) |
| |
| void | setMetalSkidSound (const char *sound_name) |
| |
| void | setAxleSound (const char *sound_name) |
| |
| void | setTurboSound (const char *sound_name) |
| |
| void | setBackfireLoopSound (const char *sound_name) |
| |
| void | setCrashSound (const char *sound_name, int index) |
| |
| void | setBangSound (const char *sound_name) |
| |
| void | setBottomCrashSound (const char *sound_name) |
| |
| void | setBackfireSound (const char *sound_name) |
| |
| void | setGearChangeSound (const char *sound_name) |
| |
| virtual void | update (CarSoundData **car_sound_data, int n_cars, sgVec3 p_obs, sgVec3 u_obs, sgVec3 c_obs=NULL, sgVec3 a_obs=NULL) |
| | Update sound for a given observer. More...
|
| |
| virtual void | muteForMenu () |
| |
| virtual float | getGlobalGain () |
| |
| virtual void | setGlobalGain (float g) |
| |
Sound interface.
Definition at line 82 of file SoundInterface.h.
◆ SoundInterface()
| SoundInterface::SoundInterface |
( |
float |
sampling_rate, |
|
|
int |
n_channels |
|
) |
| |
◆ ~SoundInterface()
| virtual SoundInterface::~SoundInterface |
( |
| ) |
|
|
inlinevirtual |
◆ addSample()
◆ getGlobalGain()
| virtual float SoundInterface::getGlobalGain |
( |
| ) |
|
|
inlinevirtual |
◆ initSharedSourcePool()
| virtual void SoundInterface::initSharedSourcePool |
( |
void |
| ) |
|
|
inlinevirtual |
◆ muteForMenu()
| virtual void SoundInterface::muteForMenu |
( |
| ) |
|
|
inlinevirtual |
◆ setAxleSound()
| void SoundInterface::setAxleSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setBackfireLoopSound()
| void SoundInterface::setBackfireLoopSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setBackfireSound()
| void SoundInterface::setBackfireSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setBangSound()
| void SoundInterface::setBangSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setBottomCrashSound()
| void SoundInterface::setBottomCrashSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setCrashSound()
| void SoundInterface::setCrashSound |
( |
const char * |
sound_name, |
|
|
int |
index |
|
) |
| |
|
inline |
◆ setCurbRideSound()
| void SoundInterface::setCurbRideSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setGearChangeSound()
| void SoundInterface::setGearChangeSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setGlobalGain()
| virtual void SoundInterface::setGlobalGain |
( |
float |
g | ) |
|
|
inlinevirtual |
◆ setGrassRideSound()
| void SoundInterface::setGrassRideSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setGrassSkidSound()
| void SoundInterface::setGrassSkidSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ SetMaxSoundCar()
Using the smap->id, get the appropriate entry in car_sound_data and call apprioriate methods for smap->snd in order to play the sound.
Definition at line 75 of file SoundInterface.cpp.
◆ setMetalSkidSound()
| void SoundInterface::setMetalSkidSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setNCars()
| virtual void SoundInterface::setNCars |
( |
int |
n_cars | ) |
|
|
pure virtual |
◆ setRoadRideSound()
| void SoundInterface::setRoadRideSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setSkidSound()
| void SoundInterface::setSkidSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ setTurboSound()
| void SoundInterface::setTurboSound |
( |
const char * |
sound_name | ) |
|
|
inline |
◆ SortSingleQueue()
Find the max amplitude sound in car_sound_data and put it in smap.
Definition at line 57 of file SoundInterface.cpp.
◆ update()
| virtual void SoundInterface::update |
( |
CarSoundData ** |
car_sound_data, |
|
|
int |
n_cars, |
|
|
sgVec3 |
p_obs, |
|
|
sgVec3 |
u_obs, |
|
|
sgVec3 |
c_obs = NULL, |
|
|
sgVec3 |
a_obs = NULL |
|
) |
| |
|
inlinevirtual |
◆ axle
◆ axle_sound
◆ backfire_loop
◆ backfire_loop_sound
◆ backfire_sound
◆ bang_sound
◆ bottom_crash_sound
◆ crash_sound
◆ curb
◆ curb_ride_sound
◆ curCrashSnd
| int SoundInterface::curCrashSnd |
|
protected |
holds current crash sound used - the sound cycles
Definition at line 87 of file SoundInterface.h.
◆ engpri
◆ gear_change_sound
◆ grass
◆ grass_ride_sound
◆ grass_skid
◆ grass_skid_sound
◆ metal_skid
◆ metal_skid_sound
◆ n_channels
| int SoundInterface::n_channels |
|
protected |
◆ n_engine_sounds
| int SoundInterface::n_engine_sounds |
|
protected |
◆ road
The following are mappings for sound prioritisation.
Definition at line 107 of file SoundInterface.h.
◆ road_ride_sound
◆ sampling_rate
| float SoundInterface::sampling_rate |
|
protected |
◆ skid_sound
◆ sound_list
| std::vector<TorcsSound*> SoundInterface::sound_list |
|
protected |
◆ turbo
◆ turbo_sound
The documentation for this class was generated from the following files: