Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include "audiolib.h"
#include <stdio.h>
#include <vector>
#include "al_globals.h"
#include "vs_globals.h"
#include "vsfilesystem.h"
#include "config_xml.h"
Go to the source code of this file.
Classes | |
struct | Listener |
struct | ApproxSound |
Typedefs | |
typedef std::vector< ApproxSound > | ApproxSoundVec |
typedef std::vector< int > | vecint |
Functions | |
unsigned int | hash_sound (unsigned int buffer) |
float | AUDDistanceSquared (const int sound) |
QVector | AUDListenerLocation () |
static float | EstimateGain (const Vector &pos, const float gain) |
char | AUDQueryAudability (const int sound, const Vector &pos, const Vector &vel, const float gain) |
void | AUDAddWatchedPlayed (const int sound, const Vector &pos) |
void | AUDRefreshSounds () |
Checks if sounds are still playing. More... | |
void | AUDListener (const QVector &pos, const Vector &vel) |
void | AUDListenerSize (const float rSize) |
Sets the size in which all sounds are going to be played. More... | |
void | AUDListenerOrientation (const Vector &p, const Vector &q, const Vector &r) |
Will the sound be played. More... | |
void | AUDSoundGain (int sound, float gain, bool music) |
Changes the gain of a loaded sound. More... | |
void | AUDListenerGain (const float ggain) |
float | AUDGetListenerGain () |
Variables | |
struct Listener | mylistener |
unsigned int | totalplaying = 0 |
const unsigned int | hashsize = 47 |
static ApproxSoundVec | playingbuffers [hashsize] |
vecint | soundstodelete |
typedef std::vector< ApproxSound > ApproxSoundVec |
Definition at line 43 of file al_listen.cpp.
Definition at line 171 of file al_listen.cpp.
Definition at line 156 of file al_listen.cpp.
References buffer, h, hash_sound(), playingbuffers, totalplaying, and VSFileSystem::vs_fprintf().
Referenced by AUDPlay().
Definition at line 50 of file al_listen.cpp.
References mylistener, and Listener::pos.
Referenced by AUDReclaimSource().
float AUDGetListenerGain | ( | ) |
Definition at line 273 of file al_listen.cpp.
References Listener::gain, and mylistener.
Definition at line 210 of file al_listen.cpp.
References g_game, mylistener, Listener::pos, game_data_t::sound_enabled, and Listener::vel.
Referenced by Camera::UpdateCameraSounds(), and Camera::UpdateGFX().
void AUDListenerGain | ( | const float | ggain) |
Definition at line 259 of file al_listen.cpp.
References AUDSoundGain(), g_game, Listener::gain, i, mylistener, and game_data_t::sound_enabled.
Referenced by main(), VolDown(), and VolUp().
QVector AUDListenerLocation | ( | ) |
Definition at line 60 of file al_listen.cpp.
Referenced by EstimateGain(), and Mount::PhysicsAlignedFire().
Will the sound be played.
Definition at line 232 of file al_listen.cpp.
References g_game, mylistener, Listener::p, Listener::q, q, Listener::r, and game_data_t::sound_enabled.
Referenced by Camera::UpdateCameraSounds(), and Camera::UpdateGFX().
void AUDListenerSize | ( | const float | rSize) |
Sets the size in which all sounds are going to be played.
Definition at line 225 of file al_listen.cpp.
References mylistener, and Listener::rsize.
Referenced by createObjects().
char AUDQueryAudability | ( | const int | sound, |
const Vector & | pos, | ||
const Vector & | vel, | ||
const float | gain | ||
) |
Definition at line 84 of file al_listen.cpp.
References buffer, EstimateGain(), VegaConfig::getVariable(), hash_sound(), mylistener, XMLSupport::parse_float(), playingbuffers, Listener::pos, size, totalplaying, Vector, vs_config, and VSFileSystem::vs_dprintf().
Referenced by AUDPlay().
void AUDRefreshSounds | ( | ) |
Checks if sounds are still playing.
Definition at line 174 of file al_listen.cpp.
Referenced by StarSystem::Update().
Changes the gain of a loaded sound.
Definition at line 245 of file al_listen.cpp.
Referenced by AUDListenerGain(), AUDPlay(), AUDStartPlaying(), Beam::Draw(), Music::Listen(), and Mount::PhysicsAlignedFire().
Definition at line 65 of file al_listen.cpp.
References AUDListenerLocation(), f, VegaConfig::getVariable(), Magnitude(), mylistener, XMLSupport::parse_float(), Listener::rsize, UniverseUtil::sqrt(), and vs_config.
Referenced by AUDQueryAudability().
Definition at line 45 of file al_listen.cpp.
References hashsize.
Referenced by AUDAddWatchedPlayed(), and AUDQueryAudability().
const unsigned int hashsize = 47 |
Definition at line 36 of file al_listen.cpp.
Referenced by AUDRefreshSounds(), and hash_sound().
struct Listener mylistener |
|
static |
Definition at line 44 of file al_listen.cpp.
Referenced by AUDAddWatchedPlayed(), AUDQueryAudability(), and AUDRefreshSounds().
vecint soundstodelete |
Definition at line 172 of file al_listen.cpp.
Referenced by AUDDeleteSound(), and AUDRefreshSounds().
unsigned int totalplaying = 0 |
Definition at line 35 of file al_listen.cpp.
Referenced by AUDAddWatchedPlayed(), AUDQueryAudability(), and AUDRefreshSounds().