Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
libaudioserver.cpp File Reference
#include <string>
#include "audiolib.h"
#include "gfx/cockpit_generic.h"

Go to the source code of this file.

Functions

void AUDAdjustSound (int i, QVector const &qv, Vector const &vv)
 Changes the velocity and/or position of a given sound. More...
 
bool AUDIsPlaying (int snd)
 Is a loaded sound still playing. More...
 
void AUDSoundGain (int snd, float howmuch, bool)
 Changes the gain of a loaded sound. More...
 
void AUDRefreshSounds ()
 Checks if sounds are still playing. More...
 
int AUDCreateSoundWAV (const std::string &, const bool LOOP)
 creates a buffer if one doesn't already exists, and then creates a source More...
 
int AUDCreateSoundMP3 (const std::string &, const bool LOOP)
 creates a buffer for an mp3 sound if one doesn't already exist, then creates a source More...
 
int AUDCreateSound (int sound, const bool LOOP)
 copies other sound loaded through AUDCreateSound More...
 
int AUDCreateSound (const std::string &, const bool LOOP)
 guesses the type of sound by extension More...
 
void AUDStartPlaying (int i)
 Plays a loaded sound. More...
 
void AUDStopPlaying (int i)
 Stops a loaded sound. More...
 
void AUDDeleteSound (int i)
 
void AUDDeleteSound (int i, bool b)
 deletes a given sound More...
 
void AUDPlay (const int sound, const QVector &pos, const Vector &vel, const float gain)
 Queries if the sound should be culled. If not, plays. More...
 
QVector AUDListenerLocation ()
 
int createSound (std::string file, bool val)
 

Function Documentation

void AUDAdjustSound ( int  i,
QVector const &  qv,
Vector const &  vv 
)

Changes the velocity and/or position of a given sound.

Definition at line 5 of file libaudioserver.cpp.

References f, VegaConfig::getVariable(), XMLSupport::parse_float(), v, and vs_config.

5 {}
int AUDCreateSound ( int  sound,
const bool  LOOP 
)

copies other sound loaded through AUDCreateSound

Definition at line 21 of file libaudioserver.cpp.

References AUDIsPlaying(), and AUDStopPlaying().

22 {
23  return -1;
24 }
int AUDCreateSound ( const std::string &  ,
const bool  LOOP 
)

guesses the type of sound by extension

Definition at line 25 of file libaudioserver.cpp.

References AUDCreateSoundMP3(), and AUDCreateSoundWAV().

26 {
27  return -1;
28 }
int AUDCreateSoundMP3 ( const std::string &  ,
const bool  LOOP 
)

creates a buffer for an mp3 sound if one doesn't already exist, then creates a source

Definition at line 17 of file libaudioserver.cpp.

References AUDCreateSoundMP3().

18 {
19  return -1;
20 }
int AUDCreateSoundWAV ( const std::string &  ,
const bool  LOOP 
)

creates a buffer if one doesn't already exists, and then creates a source

Definition at line 13 of file libaudioserver.cpp.

References AUDCreateSoundWAV().

14 {
15  return -1;
16 }
void AUDDeleteSound ( int  i)

Definition at line 31 of file libaudioserver.cpp.

31 {}
void AUDDeleteSound ( int  i,
bool  b 
)

deletes a given sound

Definition at line 32 of file libaudioserver.cpp.

References AUDIsPlaying(), AUDStopPlaying(), soundstodelete, and VSFileSystem::vs_fprintf().

32 {}
bool AUDIsPlaying ( int  snd)

Is a loaded sound still playing.

Definition at line 7 of file libaudioserver.cpp.

8 {
9  return false;
10 }
QVector AUDListenerLocation ( )

Definition at line 34 of file libaudioserver.cpp.

References mylistener, Listener::pos, and QVector.

35 {
36  return QVector( 0, 0, 0 );
37 }
void AUDPlay ( const int  sound,
const QVector pos,
const Vector vel,
const float  gain 
)

Queries if the sound should be culled. If not, plays.

Definition at line 33 of file libaudioserver.cpp.

References AUDAddWatchedPlayed(), AUDAdjustSound(), AUDIsPlaying(), AUDQueryAudability(), AUDReclaimSource(), AUDSoundGain(), AUDStopPlaying(), QVector, starSystemOK(), and VSFileSystem::vs_dprintf().

33 {}
void AUDRefreshSounds ( )

Checks if sounds are still playing.

Definition at line 12 of file libaudioserver.cpp.

References AUDDeleteSound(), AUDIsPlaying(), hashsize, i, j, k, playingbuffers, soundstodelete, and totalplaying.

12 {}
void AUDSoundGain ( int  snd,
float  howmuch,
bool   
)

Changes the gain of a loaded sound.

Definition at line 11 of file libaudioserver.cpp.

References Listener::gain, and mylistener.

11 {}
void AUDStartPlaying ( int  i)

Plays a loaded sound.

Definition at line 29 of file libaudioserver.cpp.

References AUDAdjustSound(), AUDReclaimSource(), AUDSoundGain(), QVector, and starSystemOK().

29 {}
void AUDStopPlaying ( int  i)

Stops a loaded sound.

Definition at line 30 of file libaudioserver.cpp.

30 {}
int createSound ( std::string  file,
bool  val 
)

Definition at line 40 of file libaudioserver.cpp.

Referenced by FSM::Node::GetSound().

41 {
42  return -1;
43 }