Blender  V2.59
Defines | Typedefs | Functions | Variables
AUD_C-API.cpp File Reference
#include <cstdlib>
#include <cstring>
#include <cmath>
#include "AUD_NULLDevice.h"
#include "AUD_I3DDevice.h"
#include "AUD_FileFactory.h"
#include "AUD_StreamBufferFactory.h"
#include "AUD_DelayFactory.h"
#include "AUD_LimiterFactory.h"
#include "AUD_PingPongFactory.h"
#include "AUD_LoopFactory.h"
#include "AUD_RectifyFactory.h"
#include "AUD_EnvelopeFactory.h"
#include "AUD_LinearResampleFactory.h"
#include "AUD_LowpassFactory.h"
#include "AUD_HighpassFactory.h"
#include "AUD_AccumulatorFactory.h"
#include "AUD_SumFactory.h"
#include "AUD_SquareFactory.h"
#include "AUD_ChannelMapperFactory.h"
#include "AUD_Buffer.h"
#include "AUD_ReadDevice.h"
#include "AUD_IReader.h"
#include "AUD_SequencerFactory.h"
#include "AUD_SilenceFactory.h"
#include <cassert>
#include "AUD_C-API.h"

Go to the source code of this file.

Defines

#define __STDC_CONSTANT_MACROS
#define AUD_CAPI_IMPLEMENTATION
#define NULL   0

Typedefs

typedef AUD_IFactory AUD_Sound
typedef AUD_ReadDevice AUD_Device
typedef AUD_Handle AUD_Channel

Functions

void AUD_initOnce ()
int AUD_init (AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
void AUD_exit ()
void AUD_lock ()
void AUD_unlock ()
AUD_SoundInfo AUD_getInfo (AUD_Sound *sound)
AUD_SoundAUD_load (const char *filename)
AUD_SoundAUD_loadBuffer (unsigned char *buffer, int size)
AUD_SoundAUD_bufferSound (AUD_Sound *sound)
AUD_SoundAUD_delaySound (AUD_Sound *sound, float delay)
AUD_SoundAUD_limitSound (AUD_Sound *sound, float start, float end)
AUD_SoundAUD_pingpongSound (AUD_Sound *sound)
AUD_SoundAUD_loopSound (AUD_Sound *sound)
int AUD_setLoop (AUD_Channel *handle, int loops)
AUD_SoundAUD_rectifySound (AUD_Sound *sound)
void AUD_unload (AUD_Sound *sound)
AUD_ChannelAUD_play (AUD_Sound *sound, int keep)
int AUD_pause (AUD_Channel *handle)
int AUD_resume (AUD_Channel *handle)
int AUD_stop (AUD_Channel *handle)
int AUD_setKeep (AUD_Channel *handle, int keep)
int AUD_seek (AUD_Channel *handle, float seekTo)
float AUD_getPosition (AUD_Channel *handle)
AUD_Status AUD_getStatus (AUD_Channel *handle)
int AUD_setListenerLocation (const float *location)
int AUD_setListenerVelocity (const float *velocity)
int AUD_setListenerOrientation (const float *orientation)
int AUD_setSpeedOfSound (float speed)
int AUD_setDopplerFactor (float factor)
int AUD_setDistanceModel (AUD_DistanceModel model)
int AUD_setSourceLocation (AUD_Channel *handle, const float *location)
int AUD_setSourceVelocity (AUD_Channel *handle, const float *velocity)
int AUD_setSourceOrientation (AUD_Channel *handle, const float *orientation)
int AUD_setRelative (AUD_Channel *handle, int relative)
int AUD_setVolumeMaximum (AUD_Channel *handle, float volume)
int AUD_setVolumeMinimum (AUD_Channel *handle, float volume)
int AUD_setDistanceMaximum (AUD_Channel *handle, float distance)
int AUD_setDistanceReference (AUD_Channel *handle, float distance)
int AUD_setAttenuation (AUD_Channel *handle, float factor)
int AUD_setConeAngleOuter (AUD_Channel *handle, float angle)
int AUD_setConeAngleInner (AUD_Channel *handle, float angle)
int AUD_setConeVolumeOuter (AUD_Channel *handle, float volume)
int AUD_setSoundVolume (AUD_Channel *handle, float volume)
int AUD_setSoundPitch (AUD_Channel *handle, float pitch)
AUD_DeviceAUD_openReadDevice (AUD_DeviceSpecs specs)
AUD_ChannelAUD_playDevice (AUD_Device *device, AUD_Sound *sound, float seek)
int AUD_setDeviceVolume (AUD_Device *device, float volume)
int AUD_setDeviceSoundVolume (AUD_Device *device, AUD_Channel *handle, float volume)
int AUD_readDevice (AUD_Device *device, data_t *buffer, int length)
void AUD_closeReadDevice (AUD_Device *device)
float * AUD_readSoundBuffer (const char *filename, float low, float high, float attack, float release, float threshold, int accumulate, int additive, int square, float sthreshold, int samplerate, int *length)
static void pauseSound (AUD_Channel *handle)
AUD_ChannelAUD_pauseAfter (AUD_Channel *handle, float seconds)
AUD_SoundAUD_createSequencer (int muted, void *data, AUD_volumeFunction volume)
void AUD_destroySequencer (AUD_Sound *sequencer)
void AUD_setSequencerMuted (AUD_Sound *sequencer, int muted)
AUD_SequencerEntryAUD_addSequencer (AUD_Sound **sequencer, AUD_Sound *sound, float begin, float end, float skip, void *data)
void AUD_removeSequencer (AUD_Sound *sequencer, AUD_SequencerEntry *entry)
void AUD_moveSequencer (AUD_Sound *sequencer, AUD_SequencerEntry *entry, float begin, float end, float skip)
void AUD_muteSequencer (AUD_Sound *sequencer, AUD_SequencerEntry *entry, char mute)
int AUD_readSound (AUD_Sound *sound, sample_t *buffer, int length)
void AUD_startPlayback ()
void AUD_stopPlayback ()
void AUD_seekSequencer (AUD_Channel *handle, float time)
float AUD_getSequencerPosition (AUD_Channel *handle)
int AUD_doesPlayback ()

Variables

static AUD_IDeviceAUD_device = NULL
static AUD_I3DDeviceAUD_3ddevice = NULL

Detailed Description

Definition in file AUD_C-API.cpp.


Define Documentation

#define __STDC_CONSTANT_MACROS

Definition at line 34 of file AUD_C-API.cpp.

#define AUD_CAPI_IMPLEMENTATION

Definition at line 97 of file AUD_C-API.cpp.

#define NULL   0

Typedef Documentation

Definition at line 95 of file AUD_C-API.cpp.

Definition at line 94 of file AUD_C-API.cpp.

Definition at line 93 of file AUD_C-API.cpp.


Function Documentation

AUD_SequencerEntry* AUD_addSequencer ( AUD_Sound **  sequencer,
AUD_Sound sound,
float  begin,
float  end,
float  skip,
void *  data 
)

Definition at line 890 of file AUD_C-API.cpp.

AUD_Sound* AUD_bufferSound ( AUD_Sound sound)

Buffers a sound.

Parameters:
soundThe sound to buffer.
Returns:
A handle of the sound buffer.

Definition at line 272 of file AUD_C-API.cpp.

References assert, and NULL.

void AUD_closeReadDevice ( AUD_Device device)

Closes a read device.

Parameters:
deviceThe read device.

Definition at line 766 of file AUD_C-API.cpp.

References assert.

AUD_Sound* AUD_createSequencer ( int  muted,
void *  data,
AUD_volumeFunction  volume 
)
AUD_Sound* AUD_delaySound ( AUD_Sound sound,
float  delay 
)

Delays a sound.

Parameters:
soundThe sound to dealy.
delayThe delay in seconds.
Returns:
A handle of the delayed sound.

Definition at line 286 of file AUD_C-API.cpp.

References assert, and NULL.

void AUD_destroySequencer ( AUD_Sound sequencer)

Definition at line 880 of file AUD_C-API.cpp.

int AUD_doesPlayback ( void  )

Definition at line 1010 of file AUD_C-API.cpp.

References AUD_device, and AUD_JackDevice::doesPlayback().

void AUD_exit ( void  )

Unitinitializes an audio device.

Definition at line 169 of file AUD_C-API.cpp.

References AUD_device, and NULL.

Referenced by AUD_init().

AUD_SoundInfo AUD_getInfo ( AUD_Sound sound)

Returns information about a sound.

Parameters:
soundThe sound to get the info about.
Returns:
The AUD_SoundInfo structure with filled in data.

Definition at line 233 of file AUD_C-API.cpp.

References assert, AUD_CHANNELS_INVALID, AUD_RATE_INVALID, AUD_Specs::channels, AUD_IFactory::createReader(), AUD_IReader::getLength(), AUD_IReader::getSpecs(), AUD_SoundInfo::length, AUD_Specs::rate, and AUD_SoundInfo::specs.

Referenced by reload_sequence_new_file().

float AUD_getPosition ( AUD_Channel handle)

Retrieves the playback position of a handle.

Parameters:
handleThe handle to the sound.
Returns:
The current playback position in seconds or 0.0 if the handle is invalid.

Definition at line 422 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::getPosition().

Referenced by KX_SoundActuator::Update().

float AUD_getSequencerPosition ( AUD_Channel handle)
AUD_Status AUD_getStatus ( AUD_Channel handle)

Returns the status of a playing, paused or stopped sound.

Parameters:
handleThe handle to the sound.
Returns:
The status of the sound behind the handle.

Definition at line 428 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::getStatus().

Referenced by KX_SoundActuator::Update().

int AUD_init ( AUD_DeviceType  device,
AUD_DeviceSpecs  specs,
int  buffersize 
)

Initializes an audio device.

Parameters:
deviceThe device type that should be used.
specsThe audio specification to be used.
buffersizeThe buffersize for the device.
Returns:
Whether the device has been initialized.

Definition at line 114 of file AUD_C-API.cpp.

References AUD_device, AUD_exit(), AUD_JACK_DEVICE, AUD_NULL_DEVICE, AUD_OPENAL_DEVICE, AUD_SDL_DEVICE, Device::device, Device_empty(), and NULL.

void AUD_initOnce ( void  )

Initializes FFMPEG if it is enabled.

Definition at line 107 of file AUD_C-API.cpp.

AUD_Sound* AUD_limitSound ( AUD_Sound sound,
float  start,
float  end 
)

Limits a sound.

Parameters:
soundThe sound to limit.
startThe start time in seconds.
endThe stop time in seconds.
Returns:
A handle of the limited sound.

Definition at line 300 of file AUD_C-API.cpp.

References assert, and NULL.

AUD_Sound* AUD_load ( const char *  filename)

Loads a sound file.

Parameters:
filenameThe filename of the sound file.
Returns:
A handle of the sound file.

Definition at line 260 of file AUD_C-API.cpp.

References assert.

AUD_Sound* AUD_loadBuffer ( unsigned char *  buffer,
int  size 
)

Loads a sound file.

Parameters:
bufferThe buffer which contains the sound file.
sizeThe size of the buffer.
Returns:
A handle of the sound file.

Definition at line 266 of file AUD_C-API.cpp.

References assert.

void AUD_lock ( void  )

Locks the playback device.

Definition at line 221 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::lock().

AUD_Sound* AUD_loopSound ( AUD_Sound sound)

Loops a sound.

Parameters:
soundThe sound to loop.
Returns:
A handle of the looped sound.

Definition at line 328 of file AUD_C-API.cpp.

References assert, and NULL.

void AUD_moveSequencer ( AUD_Sound sequencer,
AUD_SequencerEntry entry,
float  begin,
float  end,
float  skip 
)

Definition at line 901 of file AUD_C-API.cpp.

void AUD_muteSequencer ( AUD_Sound sequencer,
AUD_SequencerEntry entry,
char  mute 
)

Definition at line 907 of file AUD_C-API.cpp.

AUD_Device* AUD_openReadDevice ( AUD_DeviceSpecs  specs)

Opens a read device, with which audio data can be read.

Parameters:
specsThe specification of the audio data.
Returns:
A device handle.

Definition at line 692 of file AUD_C-API.cpp.

References NULL.

int AUD_pause ( AUD_Channel handle)

Pauses a played back sound.

Parameters:
handleThe handle to the sound.
Returns:
Whether the handle has been playing or not.

Definition at line 391 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::pause().

Referenced by KX_SoundActuator::Update().

AUD_Channel* AUD_pauseAfter ( AUD_Channel handle,
float  seconds 
)

Pauses a playing sound after a specific amount of time.

Parameters:
handleThe handle to the sound.
timeThe time in seconds.
Returns:
The silence handle.

Definition at line 848 of file AUD_C-API.cpp.

References assert, NULL, pauseSound(), AUD_IDevice::play(), and AUD_IDevice::setStopCallback().

AUD_Sound* AUD_pingpongSound ( AUD_Sound sound)

Ping pongs a sound.

Parameters:
soundThe sound to ping pong.
Returns:
A handle of the ping pong sound.

Definition at line 314 of file AUD_C-API.cpp.

References assert, and NULL.

AUD_Channel* AUD_play ( AUD_Sound sound,
int  keep 
)

Plays back a sound file.

Parameters:
soundThe handle of the sound file.
keepWhen keep is true the sound source will not be deleted but set to paused when its end has been reached.
Returns:
A handle to the played back sound.

Definition at line 377 of file AUD_C-API.cpp.

References assert, NULL, and AUD_IDevice::play().

AUD_Channel* AUD_playDevice ( AUD_Device device,
AUD_Sound sound,
float  seek 
)

Plays back a sound file through a read device.

Parameters:
deviceThe read device.
soundThe handle of the sound file.
seekThe position where the sound should be seeked to.
Returns:
A handle to the played back sound.

Definition at line 704 of file AUD_C-API.cpp.

References assert, NULL, AUD_SoftwareDevice::play(), and AUD_SoftwareDevice::seek().

int AUD_readDevice ( AUD_Device device,
data_t buffer,
int  length 
)

Reads the next samples into the supplied buffer.

Parameters:
deviceThe read device.
bufferThe target buffer.
lengthThe length in samples to be filled.
Returns:
True if the reading succeeded, false if there are no sounds played back currently, in that case the buffer is filled with silence.

Definition at line 751 of file AUD_C-API.cpp.

References assert, and AUD_ReadDevice::read().

int AUD_readSound ( AUD_Sound sound,
sample_t buffer,
int  length 
)
float* AUD_readSoundBuffer ( const char *  filename,
float  low,
float  high,
float  attack,
float  release,
float  threshold,
int  accumulate,
int  additive,
int  square,
float  sthreshold,
int  samplerate,
int *  length 
)

Reads a sound file into a newly created float buffer. The sound is therefore bandpassed, rectified and resampled.

Definition at line 779 of file AUD_C-API.cpp.

References AUD_CHANNELS_MONO, AUD_DeviceSpecs::channels, AUD_IFactory::createReader(), AUD_FileFactory::createReader(), AUD_Buffer::getBuffer(), AUD_IReader::getSpecs(), NULL, AUD_Specs::rate, AUD_DeviceSpecs::rate, AUD_IReader::read(), AUD_Buffer::resize(), and sum().

AUD_Sound* AUD_rectifySound ( AUD_Sound sound)

Rectifies a sound.

Parameters:
soundThe sound to rectify.
Returns:
A handle of the rectified sound.

Definition at line 357 of file AUD_C-API.cpp.

References assert, and NULL.

void AUD_removeSequencer ( AUD_Sound sequencer,
AUD_SequencerEntry entry 
)

Definition at line 896 of file AUD_C-API.cpp.

int AUD_resume ( AUD_Channel handle)

Resumes a paused sound.

Parameters:
handleThe handle to the sound.
Returns:
Whether the handle has been paused or not.

Definition at line 397 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::resume().

Referenced by KX_SoundActuator::Update().

int AUD_seek ( AUD_Channel handle,
float  seekTo 
)

Seeks a playing or paused sound.

Parameters:
handleThe handle to the sound.
seekToFrom where the sound file should be played back in seconds.
Returns:
Whether the handle has been valid or not.

Definition at line 416 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::seek().

Referenced by KX_SoundActuator::Update().

void AUD_seekSequencer ( AUD_Channel handle,
float  time 
)

Definition at line 975 of file AUD_C-API.cpp.

References AUD_device, AUD_IDevice::seek(), and AUD_JackDevice::seekPlayback().

int AUD_setAttenuation ( AUD_Channel handle,
float  factor 
)

Sets the attenuation of a source. This value is used for distance calculation.

Parameters:
handleThe handle of the source.
factorThe new attenuation.
Returns:
Whether the action succeeded.

Definition at line 614 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setAttenuation().

Referenced by KX_SoundActuator::Update().

int AUD_setConeAngleInner ( AUD_Channel handle,
float  angle 
)

Sets the inner angle of the cone of a source.

Parameters:
handleThe handle of the source.
angleThe new inner angle of the cone.
Returns:
Whether the action succeeded.

Definition at line 638 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setConeAngleInner().

Referenced by KX_SoundActuator::Update().

int AUD_setConeAngleOuter ( AUD_Channel handle,
float  angle 
)

Sets the outer angle of the cone of a source.

Parameters:
handleThe handle of the source.
angleThe new outer angle of the cone.
Returns:
Whether the action succeeded.

Definition at line 626 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setConeAngleOuter().

Referenced by KX_SoundActuator::Update().

int AUD_setConeVolumeOuter ( AUD_Channel handle,
float  volume 
)

Sets the outer volume of the cone of a source. The volume between inner and outer angle is interpolated between inner volume and this value.

Parameters:
handleThe handle of the source.
volumeThe new outer volume of the cone.
Returns:
Whether the action succeeded.

Definition at line 650 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setConeVolumeOuter().

Referenced by KX_SoundActuator::Update().

int AUD_setDeviceSoundVolume ( AUD_Device device,
AUD_Channel handle,
float  volume 
)

Sets the volume of a played back sound of a read device.

Parameters:
deviceThe read device.
handleThe handle to the sound.
volumeThe new volume, must be between 0.0 and 1.0.
Returns:
Whether the action succeeded.

Definition at line 735 of file AUD_C-API.cpp.

References assert, and AUD_SoftwareDevice::setVolume().

int AUD_setDeviceVolume ( AUD_Device device,
float  volume 
)

Sets the main volume of a device.

Parameters:
deviceThe device.
volumeThe new volume, must be between 0.0 and 1.0.
Returns:
Whether the action succeeded.

Definition at line 721 of file AUD_C-API.cpp.

References assert, and AUD_SoftwareDevice::setVolume().

int AUD_setDistanceMaximum ( AUD_Channel handle,
float  distance 
)

Sets the maximum distance of a source. If a source is further away from the reader than this distance, the volume will automatically be set to 0.

Parameters:
handleThe handle of the source.
distanceThe new maximum distance.
Returns:
Whether the action succeeded.

Definition at line 590 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setDistanceMaximum().

Referenced by KX_SoundActuator::Update().

int AUD_setDistanceModel ( AUD_DistanceModel  model)

Sets the distance model.

Parameters:
modeldistance model.

Definition at line 502 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setDistanceModel().

Referenced by StartKetsjiShell().

int AUD_setDistanceReference ( AUD_Channel handle,
float  distance 
)

Sets the reference distance of a source.

Parameters:
handleThe handle of the source.
distanceThe new reference distance.
Returns:
Whether the action succeeded.

Definition at line 602 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setDistanceReference().

Referenced by KX_SoundActuator::Update().

int AUD_setDopplerFactor ( float  factor)

Sets the doppler factor. This value is a scaling factor for the velocity vectors of sources and listener which is used while calculating the doppler effect.

Parameters:
factorThe new doppler factor.

Definition at line 489 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setDopplerFactor().

Referenced by StartKetsjiShell().

int AUD_setKeep ( AUD_Channel handle,
int  keep 
)

Sets the end behaviour of a playing or paused sound.

Parameters:
handleThe handle to the sound.
keepWhen keep is true the sound source will not be deleted but set to paused when its end has been reached.
Returns:
Whether the handle has been valid or not.

Definition at line 410 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::setKeep().

int AUD_setListenerLocation ( const float *  location)

Sets the listener location.

Parameters:
locationThe new location.

Definition at line 434 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setListenerLocation().

int AUD_setListenerOrientation ( const float *  orientation)

Sets the listener orientation.

Parameters:
orientationThe new orientation as quaternion.

Definition at line 462 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setListenerOrientation().

int AUD_setListenerVelocity ( const float *  velocity)

Sets the listener velocity.

Parameters:
velocityThe new velocity.

Definition at line 448 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setListenerVelocity().

int AUD_setLoop ( AUD_Channel handle,
int  loops 
)

Sets a remaining loop count of a looping sound that currently plays.

Parameters:
handleThe playback handle.
loopsThe count of remaining loops, -1 for infinity.
Returns:
Whether the handle is valid.

Definition at line 342 of file AUD_C-API.cpp.

References AUD_IDevice::setLoopCount().

Referenced by KX_SoundActuator::Update().

int AUD_setRelative ( AUD_Channel handle,
int  relative 
)

Sets whether the source location, velocity and orientation are relative to the listener.

Parameters:
handleThe handle of the source.
relativeWhether the source is relative.
Returns:
Whether the action succeeded.

Definition at line 554 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setRelative().

void AUD_setSequencerMuted ( AUD_Sound sequencer,
int  muted 
)

Definition at line 885 of file AUD_C-API.cpp.

int AUD_setSoundPitch ( AUD_Channel handle,
float  pitch 
)

Sets the pitch of a played back sound.

Parameters:
handleThe handle to the sound.
pitchThe new pitch.
Returns:
Whether the action succeeded.

Definition at line 677 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::setPitch().

Referenced by KX_SoundActuator::Update().

int AUD_setSoundVolume ( AUD_Channel handle,
float  volume 
)

Sets the volume of a played back sound.

Parameters:
handleThe handle to the sound.
volumeThe new volume, must be between 0.0 and 1.0.
Returns:
Whether the action succeeded.

Definition at line 662 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::setVolume().

Referenced by KX_SoundActuator::Update().

int AUD_setSourceLocation ( AUD_Channel handle,
const float *  location 
)

Sets the location of a source.

Parameters:
handleThe handle of the source.
locationThe new location.
Returns:
Whether the action succeeded.

Definition at line 515 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setSourceLocation().

Referenced by KX_SoundActuator::Update().

int AUD_setSourceOrientation ( AUD_Channel handle,
const float *  orientation 
)

Sets the orientation of a source.

Parameters:
handleThe handle of the source.
orientationThe new orientation as quaternion.
Returns:
Whether the action succeeded.

Definition at line 541 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setSourceOrientation().

Referenced by KX_SoundActuator::Update().

int AUD_setSourceVelocity ( AUD_Channel handle,
const float *  velocity 
)

Sets the velocity of a source.

Parameters:
handleThe handle of the source.
velocityThe new velocity.
Returns:
Whether the action succeeded.

Definition at line 528 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setSourceVelocity().

Referenced by KX_SoundActuator::Update().

int AUD_setSpeedOfSound ( float  speed)

Sets the speed of sound. This value is needed for doppler effect calculation.

Parameters:
speedThe new speed of sound.

Definition at line 476 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setSpeedOfSound().

Referenced by StartKetsjiShell().

int AUD_setVolumeMaximum ( AUD_Channel handle,
float  volume 
)

Sets the maximum volume of a source.

Parameters:
handleThe handle of the source.
volumeThe new maximum volume.
Returns:
Whether the action succeeded.

Definition at line 566 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setVolumeMaximum().

Referenced by KX_SoundActuator::Update().

int AUD_setVolumeMinimum ( AUD_Channel handle,
float  volume 
)

Sets the minimum volume of a source.

Parameters:
handleThe handle of the source.
volumeThe new minimum volume.
Returns:
Whether the action succeeded.

Definition at line 578 of file AUD_C-API.cpp.

References assert, and AUD_I3DDevice::setVolumeMinimum().

Referenced by KX_SoundActuator::Update().

void AUD_startPlayback ( void  )

Definition at line 957 of file AUD_C-API.cpp.

References AUD_device, and AUD_JackDevice::startPlayback().

int AUD_stop ( AUD_Channel handle)

Stops a playing or paused sound.

Parameters:
handleThe handle to the sound.
Returns:
Whether the handle has been valid or not.

Definition at line 403 of file AUD_C-API.cpp.

References AUD_IDevice::stop().

Referenced by KX_SoundActuator::Update(), and KX_SoundActuator::~KX_SoundActuator().

void AUD_stopPlayback ( void  )

Definition at line 966 of file AUD_C-API.cpp.

References AUD_device, and AUD_JackDevice::stopPlayback().

void AUD_unload ( AUD_Sound sound)

Unloads a sound of any type.

Parameters:
soundThe handle of the sound.

Definition at line 371 of file AUD_C-API.cpp.

References assert.

Referenced by sound_free().

void AUD_unlock ( void  )

Unlocks the device.

Definition at line 227 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::unlock().

static void pauseSound ( AUD_Channel handle) [static]

Definition at line 841 of file AUD_C-API.cpp.

References assert, and AUD_IDevice::pause().

Referenced by AUD_pauseAfter(), and KX_SoundActuator::Update().


Variable Documentation

AUD_I3DDevice* AUD_3ddevice = NULL [static]

Definition at line 105 of file AUD_C-API.cpp.

AUD_IDevice* AUD_device = NULL [static]