Blender V2.61 - r43446
|
#include <set>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include "AUD_NULLDevice.h"
#include "AUD_I3DDevice.h"
#include "AUD_I3DHandle.h"
#include "AUD_FileFactory.h"
#include "AUD_FileWriter.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_SequencerEntry.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_Reference < AUD_IFactory > | AUD_Sound |
typedef AUD_Reference < AUD_ReadDevice > | AUD_Device |
typedef AUD_Reference < AUD_IHandle > | AUD_Handle |
typedef AUD_Reference < AUD_SequencerEntry > | AUD_SEntry |
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_Sound * | AUD_load (const char *filename) |
AUD_Sound * | AUD_loadBuffer (unsigned char *buffer, int size) |
AUD_Sound * | AUD_bufferSound (AUD_Sound *sound) |
AUD_Sound * | AUD_monoSound (AUD_Sound *sound) |
AUD_Sound * | AUD_delaySound (AUD_Sound *sound, float delay) |
AUD_Sound * | AUD_limitSound (AUD_Sound *sound, float start, float end) |
AUD_Sound * | AUD_pingpongSound (AUD_Sound *sound) |
AUD_Sound * | AUD_loopSound (AUD_Sound *sound) |
int | AUD_setLoop (AUD_Handle *handle, int loops) |
AUD_Sound * | AUD_rectifySound (AUD_Sound *sound) |
void | AUD_unload (AUD_Sound *sound) |
AUD_Handle * | AUD_play (AUD_Sound *sound, int keep) |
int | AUD_pause (AUD_Handle *handle) |
int | AUD_resume (AUD_Handle *handle) |
int | AUD_stop (AUD_Handle *handle) |
int | AUD_setKeep (AUD_Handle *handle, int keep) |
int | AUD_seek (AUD_Handle *handle, float seekTo) |
float | AUD_getPosition (AUD_Handle *handle) |
AUD_Status | AUD_getStatus (AUD_Handle *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_Handle *handle, const float *location) |
int | AUD_setSourceVelocity (AUD_Handle *handle, const float *velocity) |
int | AUD_setSourceOrientation (AUD_Handle *handle, const float *orientation) |
int | AUD_setRelative (AUD_Handle *handle, int relative) |
int | AUD_setVolumeMaximum (AUD_Handle *handle, float volume) |
int | AUD_setVolumeMinimum (AUD_Handle *handle, float volume) |
int | AUD_setDistanceMaximum (AUD_Handle *handle, float distance) |
int | AUD_setDistanceReference (AUD_Handle *handle, float distance) |
int | AUD_setAttenuation (AUD_Handle *handle, float factor) |
int | AUD_setConeAngleOuter (AUD_Handle *handle, float angle) |
int | AUD_setConeAngleInner (AUD_Handle *handle, float angle) |
int | AUD_setConeVolumeOuter (AUD_Handle *handle, float volume) |
int | AUD_setSoundVolume (AUD_Handle *handle, float volume) |
int | AUD_setSoundPitch (AUD_Handle *handle, float pitch) |
AUD_Device * | AUD_openReadDevice (AUD_DeviceSpecs specs) |
AUD_Handle * | AUD_playDevice (AUD_Device *device, AUD_Sound *sound, float seek) |
int | AUD_setDeviceVolume (AUD_Device *device, 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, double samplerate, int *length) |
static void | pauseSound (AUD_Handle *handle) |
AUD_Handle * | AUD_pauseAfter (AUD_Handle *handle, float seconds) |
AUD_Sound * | AUD_createSequencer (float fps, int muted) |
void | AUD_destroySequencer (AUD_Sound *sequencer) |
void | AUD_setSequencerMuted (AUD_Sound *sequencer, int muted) |
void | AUD_setSequencerFPS (AUD_Sound *sequencer, float fps) |
AUD_SEntry * | AUD_addSequence (AUD_Sound *sequencer, AUD_Sound *sound, float begin, float end, float skip) |
void | AUD_removeSequence (AUD_Sound *sequencer, AUD_SEntry *entry) |
void | AUD_moveSequence (AUD_SEntry *entry, float begin, float end, float skip) |
void | AUD_muteSequence (AUD_SEntry *entry, char mute) |
void | AUD_setRelativeSequence (AUD_SEntry *entry, char relative) |
void | AUD_updateSequenceSound (AUD_SEntry *entry, AUD_Sound *sound) |
void | AUD_setSequenceAnimData (AUD_SEntry *entry, AUD_AnimateablePropertyType type, int frame, float *data, char animated) |
void | AUD_setSequencerAnimData (AUD_Sound *sequencer, AUD_AnimateablePropertyType type, int frame, float *data, char animated) |
void | AUD_updateSequenceData (AUD_SEntry *entry, float volume_max, float volume_min, float distance_max, float distance_reference, float attenuation, float cone_angle_outer, float cone_angle_inner, float cone_volume_outer) |
void | AUD_updateSequencerData (AUD_Sound *sequencer, float speed_of_sound, float factor, AUD_DistanceModel model) |
void | AUD_setSequencerDeviceSpecs (AUD_Sound *sequencer) |
void | AUD_setSequencerSpecs (AUD_Sound *sequencer, AUD_Specs specs) |
void | AUD_seekSequencer (AUD_Handle *handle, float time) |
float | AUD_getSequencerPosition (AUD_Handle *handle) |
void | AUD_startPlayback () |
void | AUD_stopPlayback () |
int | AUD_doesPlayback () |
int | AUD_readSound (AUD_Sound *sound, sample_t *buffer, int length, int samples_per_second) |
AUD_Sound * | AUD_copy (AUD_Sound *sound) |
void | AUD_freeHandle (AUD_Handle *handle) |
void * | AUD_createSet () |
void | AUD_destroySet (void *set) |
char | AUD_removeSet (void *set, void *entry) |
void | AUD_addSet (void *set, void *entry) |
void * | AUD_getSet (void *set) |
const char * | AUD_mixdown (AUD_Sound *sound, unsigned int start, unsigned int length, unsigned int buffersize, const char *filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate) |
AUD_Device * | AUD_openMixdownDevice (AUD_DeviceSpecs specs, AUD_Sound *sequencer, float volume, float start) |
AUD_Reference< AUD_IDevice > | AUD_getDevice () |
AUD_I3DDevice * | AUD_get3DDevice () |
Variables | |
static AUD_Reference< AUD_IDevice > | AUD_device |
static AUD_I3DDevice * | AUD_3ddevice |
Definition in file AUD_C-API.cpp.
#define __STDC_CONSTANT_MACROS |
Definition at line 32 of file AUD_C-API.cpp.
#define AUD_CAPI_IMPLEMENTATION |
Definition at line 97 of file AUD_C-API.cpp.
#define NULL 0 |
Definition at line 101 of file AUD_C-API.cpp.
Referenced by AUD_bufferSound(), AUD_delaySound(), AUD_exit(), AUD_getSet(), AUD_limitSound(), AUD_loopSound(), AUD_mixdown(), AUD_monoSound(), AUD_openMixdownDevice(), AUD_openReadDevice(), AUD_pauseAfter(), AUD_pingpongSound(), AUD_play(), AUD_playDevice(), AUD_readSoundBuffer(), and AUD_rectifySound().
typedef AUD_Reference<AUD_ReadDevice> AUD_Device |
Definition at line 93 of file AUD_C-API.cpp.
typedef AUD_Reference<AUD_IHandle> AUD_Handle |
Definition at line 94 of file AUD_C-API.cpp.
typedef AUD_Reference<AUD_SequencerEntry> AUD_SEntry |
Definition at line 95 of file AUD_C-API.cpp.
typedef AUD_Reference<AUD_IFactory> AUD_Sound |
Definition at line 92 of file AUD_C-API.cpp.
AUD_SEntry* AUD_addSequence | ( | AUD_Sound * | sequencer, |
AUD_Sound * | sound, | ||
float | begin, | ||
float | end, | ||
float | skip | ||
) |
Adds a new entry to the scene.
sequencer | The sound scene. |
sound | The sound this entry should play. |
begin | The start time. |
end | The end time or a negative value if determined by the sound. |
skip | How much seconds should be skipped at the beginning. |
Definition at line 949 of file AUD_C-API.cpp.
References add(), and AUD_Reference< T >::get().
void AUD_addSet | ( | void * | set, |
void * | entry | ||
) |
Adds a new entry to a set.
set | The set work on. |
entry | The entry to add. |
Definition at line 1196 of file AUD_C-API.cpp.
Buffers a sound.
sound | The sound to buffer. |
Definition at line 321 of file AUD_C-API.cpp.
void AUD_closeReadDevice | ( | AUD_Device * | device | ) |
Closes a read device.
device | The read device. |
Definition at line 814 of file AUD_C-API.cpp.
References assert.
Copies a sound.
sound | Sound to copy. |
Definition at line 1169 of file AUD_C-API.cpp.
AUD_Sound* AUD_createSequencer | ( | float | fps, |
int | muted | ||
) |
Creates a new sequenced sound scene.
fps | The FPS of the scene. |
muted | Whether the scene is muted. |
Definition at line 924 of file AUD_C-API.cpp.
References AUD_CHANNELS_STEREO, AUD_RATE_44100, AUD_Specs::channels, and AUD_Specs::rate.
void* AUD_createSet | ( | void | ) |
Delays a sound.
sound | The sound to dealy. |
delay | The delay in seconds. |
Definition at line 353 of file AUD_C-API.cpp.
void AUD_destroySequencer | ( | AUD_Sound * | sequencer | ) |
Deletes a sound scene.
sequencer | The sound scene. |
Definition at line 934 of file AUD_C-API.cpp.
void AUD_destroySet | ( | void * | set | ) |
int AUD_doesPlayback | ( | void | ) |
Returns whether jack transport is currently playing.
Definition at line 1092 of file AUD_C-API.cpp.
References AUD_JackDevice::doesPlayback(), and AUD_Reference< T >::get().
void AUD_exit | ( | void | ) |
Unitinitializes an audio device.
Definition at line 171 of file AUD_C-API.cpp.
References NULL.
Referenced by AUD_init().
void AUD_freeHandle | ( | AUD_Handle * | channel | ) |
AUD_I3DDevice* AUD_get3DDevice | ( | ) |
Definition at line 1266 of file AUD_C-API.cpp.
References AUD_3ddevice.
Referenced by StartKetsjiShell().
AUD_Reference<AUD_IDevice> AUD_getDevice | ( | ) |
Definition at line 1261 of file AUD_C-API.cpp.
References AUD_device.
Referenced by StartKetsjiShell().
AUD_SoundInfo AUD_getInfo | ( | AUD_Sound * | sound | ) |
Returns information about a sound.
sound | The sound to get the info about. |
Definition at line 283 of file AUD_C-API.cpp.
References assert, AUD_CHANNELS_INVALID, AUD_RATE_INVALID, AUD_Specs::channels, AUD_Reference< T >::isNull(), AUD_SoundInfo::length, AUD_Specs::rate, and AUD_SoundInfo::specs.
Referenced by add_nla_soundstrip(), and reload_sequence_new_file().
float AUD_getPosition | ( | AUD_Handle * | handle | ) |
Retrieves the playback position of a handle.
handle | The handle to the sound. |
Definition at line 491 of file AUD_C-API.cpp.
References assert.
float AUD_getSequencerPosition | ( | AUD_Handle * | handle | ) |
Returns the current sound scene playback time.
handle | Playback handle. |
Definition at line 1051 of file AUD_C-API.cpp.
References assert, AUD_Reference< T >::get(), and AUD_JackDevice::getPlaybackPosition().
void* AUD_getSet | ( | void * | set | ) |
Removes one entry from a set and returns it.
set | The set work on. |
Definition at line 1202 of file AUD_C-API.cpp.
References NULL.
AUD_Status AUD_getStatus | ( | AUD_Handle * | handle | ) |
Returns the status of a playing, paused or stopped sound.
handle | The handle to the sound. |
Definition at line 497 of file AUD_C-API.cpp.
References assert.
int AUD_init | ( | AUD_DeviceType | device, |
AUD_DeviceSpecs | specs, | ||
int | buffersize | ||
) |
Initializes an audio device.
device | The device type that should be used. |
specs | The audio specification to be used. |
buffersize | The buffersize for the device. |
Definition at line 114 of file AUD_C-API.cpp.
References AUD_exit(), AUD_JACK_DEVICE, AUD_NULL_DEVICE, AUD_OPENAL_DEVICE, AUD_SDL_DEVICE, AUD_Reference< T >::get(), and AUD_Reference< T >::isNull().
void AUD_initOnce | ( | void | ) |
Initializes FFMPEG if it is enabled.
Definition at line 107 of file AUD_C-API.cpp.
Limits a sound.
sound | The sound to limit. |
start | The start time in seconds. |
end | The stop time in seconds. |
Definition at line 367 of file AUD_C-API.cpp.
AUD_Sound* AUD_load | ( | const char * | filename | ) |
Loads a sound file.
filename | The filename of the sound file. |
Definition at line 309 of file AUD_C-API.cpp.
References assert.
AUD_Sound* AUD_loadBuffer | ( | unsigned char * | buffer, |
int | size | ||
) |
Loads a sound file.
buffer | The buffer which contains the sound file. |
size | The size of the buffer. |
Definition at line 315 of file AUD_C-API.cpp.
References assert.
void AUD_lock | ( | void | ) |
Locks the playback device.
Definition at line 273 of file AUD_C-API.cpp.
Loops a sound.
sound | The sound to loop. |
Definition at line 395 of file AUD_C-API.cpp.
const char* AUD_mixdown | ( | AUD_Sound * | sound, |
unsigned int | start, | ||
unsigned int | length, | ||
unsigned int | buffersize, | ||
const char * | filename, | ||
AUD_DeviceSpecs | specs, | ||
AUD_Container | format, | ||
AUD_Codec | codec, | ||
unsigned int | bitrate | ||
) |
Mixes a sound down into a file.
sound | The sound scene to mix down. |
start | The start frame. |
length | The count of frames to write. |
buffersize | How many samples should be written at once. |
filename | The file to write to. |
specs | The file's audio specification. |
format | The file's container format. |
codec | The codec used for encoding the audio data. |
bitrate | The bitrate for encoding. |
Definition at line 1219 of file AUD_C-API.cpp.
References AUD_SequencerFactory::createQualityReader(), AUD_FileWriter::createWriter(), credits_svn_gen::e, AUD_Reference< T >::get(), NULL, AUD_SequencerFactory::setSpecs(), AUD_DeviceSpecs::specs, AUD_Exception::str, and AUD_FileWriter::writeReader().
Referenced by sound_mixdown_exec().
Rechannels the sound to be mono.
sound | The sound to rechannel. |
Definition at line 335 of file AUD_C-API.cpp.
References assert, AUD_CHANNELS_MONO, AUD_FORMAT_INVALID, AUD_RATE_INVALID, AUD_DeviceSpecs::channels, AUD_DeviceSpecs::format, NULL, and AUD_DeviceSpecs::rate.
void AUD_moveSequence | ( | AUD_SEntry * | entry, |
float | begin, | ||
float | end, | ||
float | skip | ||
) |
Moves the entry.
entry | The sequenced entry. |
begin | The new start time. |
end | The new end time or a negative value if unknown. |
skip | How many seconds to skip at the beginning. |
Definition at line 963 of file AUD_C-API.cpp.
void AUD_muteSequence | ( | AUD_SEntry * | entry, |
char | mute | ||
) |
Sets the muting state of the entry.
entry | The sequenced entry. |
mute | Whether the entry should be muted or not. |
Definition at line 968 of file AUD_C-API.cpp.
AUD_Device* AUD_openMixdownDevice | ( | AUD_DeviceSpecs | specs, |
AUD_Sound * | sequencer, | ||
float | volume, | ||
float | start | ||
) |
Opens a read device and prepares it for mixdown of the sound scene.
specs | Output audio specifications. |
sequencer | The sound scene to mix down. |
volume | The overall mixdown volume. |
start | The start time of the mixdown in the sound scene. |
Definition at line 1239 of file AUD_C-API.cpp.
References AUD_Reference< T >::get(), AUD_Reference< T >::isNull(), NULL, AUD_SoftwareDevice::play(), AUD_SoftwareDevice::setQuality(), AUD_SoftwareDevice::setVolume(), and AUD_DeviceSpecs::specs.
AUD_Device* AUD_openReadDevice | ( | AUD_DeviceSpecs | specs | ) |
Opens a read device, with which audio data can be read.
specs | The specification of the audio data. |
Definition at line 753 of file AUD_C-API.cpp.
References NULL.
int AUD_pause | ( | AUD_Handle * | handle | ) |
Pauses a played back sound.
handle | The handle to the sound. |
Definition at line 459 of file AUD_C-API.cpp.
References assert.
AUD_Handle* AUD_pauseAfter | ( | AUD_Handle * | handle, |
float | seconds | ||
) |
Pauses a playing sound after a specific amount of time.
handle | The handle to the sound. |
seconds | The time in seconds. |
Definition at line 898 of file AUD_C-API.cpp.
References AUD_Reference< T >::isNull(), NULL, and pauseSound().
Ping pongs a sound.
sound | The sound to ping pong. |
Definition at line 381 of file AUD_C-API.cpp.
AUD_Handle* AUD_play | ( | AUD_Sound * | sound, |
int | keep | ||
) |
Plays back a sound file.
sound | The handle of the sound file. |
keep | When keep is true the sound source will not be deleted but set to paused when its end has been reached. |
Definition at line 444 of file AUD_C-API.cpp.
References assert, AUD_Reference< T >::isNull(), and NULL.
AUD_Handle* AUD_playDevice | ( | AUD_Device * | device, |
AUD_Sound * | sound, | ||
float | seek | ||
) |
Plays back a sound file through a read device.
device | The read device. |
sound | The handle of the sound file. |
seek | The position where the sound should be seeked to. |
Definition at line 765 of file AUD_C-API.cpp.
References assert, AUD_Reference< T >::isNull(), and NULL.
int AUD_readDevice | ( | AUD_Device * | device, |
data_t * | buffer, | ||
int | length | ||
) |
Reads the next samples into the supplied buffer.
device | The read device. |
buffer | The target buffer. |
length | The length in samples to be filled. |
Definition at line 799 of file AUD_C-API.cpp.
References assert.
Reads a sound into a buffer for drawing at a specific sampling rate.
sound | The sound to read. |
buffer | The buffer to write to. Must have a size of 3*4*length. |
length | How many samples to read from the sound. |
samples_per_second | How many samples to read per second of the sound. |
Definition at line 1102 of file AUD_C-API.cpp.
References AUD_Buffer::assureSize(), AUD_CHANNELS_MONO, AUD_FORMAT_INVALID, AUD_RATE_INVALID, AUD_SAMPLE_SIZE, AUD_DeviceSpecs::channels, AUD_ChannelMapperFactory::createReader(), AUD_DeviceSpecs::format, AUD_Buffer::getBuffer(), i, len(), length(), max, min, AUD_DeviceSpecs::rate, AUD_DeviceSpecs::specs, and sqrt().
float* AUD_readSoundBuffer | ( | const char * | filename, |
float | low, | ||
float | high, | ||
float | attack, | ||
float | release, | ||
float | threshold, | ||
int | accumulate, | ||
int | additive, | ||
int | square, | ||
float | sthreshold, | ||
double | samplerate, | ||
int * | length | ||
) |
Reads a sound file into a newly created float buffer. The sound is therefore bandpassed, rectified and resampled.
Definition at line 827 of file AUD_C-API.cpp.
References AUD_CHANNELS_MONO, AUD_DeviceSpecs::channels, AUD_Buffer::getBuffer(), AUD_Reference< T >::isNull(), len(), NULL, AUD_DeviceSpecs::rate, and AUD_Buffer::resize().
Rectifies a sound.
sound | The sound to rectify. |
Definition at line 424 of file AUD_C-API.cpp.
void AUD_removeSequence | ( | AUD_Sound * | sequencer, |
AUD_SEntry * | entry | ||
) |
Removes an entry from the scene.
sequencer | The sound scene. |
entry | The entry to remove. |
Definition at line 957 of file AUD_C-API.cpp.
References AUD_Reference< T >::get().
char AUD_removeSet | ( | void * | set, |
void * | entry | ||
) |
Removes an entry from a set.
set | The set work on. |
entry | The entry to remove. |
Definition at line 1189 of file AUD_C-API.cpp.
int AUD_resume | ( | AUD_Handle * | handle | ) |
Resumes a paused sound.
handle | The handle to the sound. |
Definition at line 465 of file AUD_C-API.cpp.
References assert.
int AUD_seek | ( | AUD_Handle * | handle, |
float | seekTo | ||
) |
Seeks a playing or paused sound.
handle | The handle to the sound. |
seekTo | From where the sound file should be played back in seconds. |
Definition at line 485 of file AUD_C-API.cpp.
References assert.
void AUD_seekSequencer | ( | AUD_Handle * | handle, |
float | time | ||
) |
Seeks sequenced sound scene playback.
handle | Playback handle. |
time | Time in seconds to seek to. |
Definition at line 1037 of file AUD_C-API.cpp.
References assert, AUD_Reference< T >::get(), and AUD_JackDevice::seekPlayback().
int AUD_setAttenuation | ( | AUD_Handle * | handle, |
float | factor | ||
) |
Sets the attenuation of a source. This value is used for distance calculation.
handle | The handle of the source. |
factor | The new attenuation. |
Definition at line 679 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setConeAngleInner | ( | AUD_Handle * | handle, |
float | angle | ||
) |
Sets the inner angle of the cone of a source.
handle | The handle of the source. |
angle | The new inner angle of the cone. |
Definition at line 705 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setConeAngleOuter | ( | AUD_Handle * | handle, |
float | angle | ||
) |
Sets the outer angle of the cone of a source.
handle | The handle of the source. |
angle | The new outer angle of the cone. |
Definition at line 692 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setConeVolumeOuter | ( | AUD_Handle * | 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.
handle | The handle of the source. |
volume | The new outer volume of the cone. |
Definition at line 718 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setDeviceVolume | ( | AUD_Device * | device, |
float | volume | ||
) |
Sets the main volume of a device.
device | The device. |
volume | The new volume, must be between 0.0 and 1.0. |
Definition at line 785 of file AUD_C-API.cpp.
References assert.
int AUD_setDistanceMaximum | ( | AUD_Handle * | 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.
handle | The handle of the source. |
distance | The new maximum distance. |
Definition at line 653 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setDistanceModel | ( | AUD_DistanceModel | model | ) |
Sets the distance model.
model | distance model. |
Definition at line 561 of file AUD_C-API.cpp.
References AUD_I3DDevice::setDistanceModel().
int AUD_setDistanceReference | ( | AUD_Handle * | handle, |
float | distance | ||
) |
Sets the reference distance of a source.
handle | The handle of the source. |
distance | The new reference distance. |
Definition at line 666 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
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.
factor | The new doppler factor. |
Definition at line 550 of file AUD_C-API.cpp.
References AUD_I3DDevice::setDopplerFactor().
int AUD_setKeep | ( | AUD_Handle * | handle, |
int | keep | ||
) |
Sets the end behaviour of a playing or paused sound.
handle | The handle to the sound. |
keep | When keep is true the sound source will not be deleted but set to paused when its end has been reached. |
Definition at line 479 of file AUD_C-API.cpp.
References assert.
int AUD_setListenerLocation | ( | const float * | location | ) |
Sets the listener location.
location | The new location. |
Definition at line 503 of file AUD_C-API.cpp.
References AUD_I3DDevice::setListenerLocation().
int AUD_setListenerOrientation | ( | const float * | orientation | ) |
Sets the listener orientation.
orientation | The new orientation as quaternion. |
Definition at line 527 of file AUD_C-API.cpp.
References AUD_I3DDevice::setListenerOrientation().
int AUD_setListenerVelocity | ( | const float * | velocity | ) |
Sets the listener velocity.
velocity | The new velocity. |
Definition at line 515 of file AUD_C-API.cpp.
References AUD_I3DDevice::setListenerVelocity().
int AUD_setLoop | ( | AUD_Handle * | handle, |
int | loops | ||
) |
Sets a remaining loop count of a looping sound that currently plays.
handle | The playback handle. |
loops | The count of remaining loops, -1 for infinity. |
Definition at line 409 of file AUD_C-API.cpp.
References assert.
int AUD_setRelative | ( | AUD_Handle * | handle, |
int | relative | ||
) |
Sets whether the source location, velocity and orientation are relative to the listener.
handle | The handle of the source. |
relative | Whether the source is relative. |
Definition at line 614 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
void AUD_setRelativeSequence | ( | AUD_SEntry * | entry, |
char | relative | ||
) |
Sets whether the entrie's location, velocity and orientation are relative to the listener.
entry | The sequenced entry. |
relative | Whether the source is relative. |
Definition at line 973 of file AUD_C-API.cpp.
void AUD_setSequenceAnimData | ( | AUD_SEntry * | entry, |
AUD_AnimateablePropertyType | type, | ||
int | frame, | ||
float * | data, | ||
char | animated | ||
) |
Writes animation data to a sequenced entry.
entry | The sequenced entry. |
type | The type of animation data. |
frame | The frame this data is for. |
data | The data to write. |
animated | Whether the attribute is animated. |
Definition at line 986 of file AUD_C-API.cpp.
References AUD_AnimateableProperty::write().
void AUD_setSequencerAnimData | ( | AUD_Sound * | sequencer, |
AUD_AnimateablePropertyType | type, | ||
int | frame, | ||
float * | data, | ||
char | animated | ||
) |
Writes animation data to a sequenced entry.
sequencer | The sound scene. |
type | The type of animation data. |
frame | The frame this data is for. |
data | The data to write. |
animated | Whether the attribute is animated. |
Definition at line 998 of file AUD_C-API.cpp.
References AUD_Reference< T >::get(), and AUD_AnimateableProperty::write().
void AUD_setSequencerDeviceSpecs | ( | AUD_Sound * | sequencer | ) |
Sets the audio output specification of the sound scene to the specs of the current playback device.
sequencer | The sound scene. |
Definition at line 1027 of file AUD_C-API.cpp.
References AUD_Reference< T >::get().
void AUD_setSequencerFPS | ( | AUD_Sound * | sequencer, |
float | fps | ||
) |
Sets the scene's FPS.
sequencer | The sound scene. |
fps | The new FPS. |
Definition at line 944 of file AUD_C-API.cpp.
References AUD_Reference< T >::get().
void AUD_setSequencerMuted | ( | AUD_Sound * | sequencer, |
int | muted | ||
) |
Sets the muting state of the scene.
sequencer | The sound scene. |
muted | Whether the scene is muted. |
Definition at line 939 of file AUD_C-API.cpp.
References AUD_Reference< T >::get().
Sets the audio output specification of the sound scene.
sequencer | The sound scene. |
specs | The new specification. |
Definition at line 1032 of file AUD_C-API.cpp.
References AUD_Reference< T >::get().
int AUD_setSoundPitch | ( | AUD_Handle * | handle, |
float | pitch | ||
) |
Sets the pitch of a played back sound.
handle | The handle to the sound. |
pitch | The new pitch. |
Definition at line 742 of file AUD_C-API.cpp.
References assert.
int AUD_setSoundVolume | ( | AUD_Handle * | handle, |
float | volume | ||
) |
Sets the volume of a played back sound.
handle | The handle to the sound. |
volume | The new volume, must be between 0.0 and 1.0. |
Definition at line 731 of file AUD_C-API.cpp.
References assert.
int AUD_setSourceLocation | ( | AUD_Handle * | handle, |
const float * | location | ||
) |
Sets the location of a source.
handle | The handle of the source. |
location | The new location. |
Definition at line 572 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setSourceOrientation | ( | AUD_Handle * | handle, |
const float * | orientation | ||
) |
Sets the orientation of a source.
handle | The handle of the source. |
orientation | The new orientation as quaternion. |
Definition at line 600 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setSourceVelocity | ( | AUD_Handle * | handle, |
const float * | velocity | ||
) |
Sets the velocity of a source.
handle | The handle of the source. |
velocity | The new velocity. |
Definition at line 586 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setSpeedOfSound | ( | float | speed | ) |
Sets the speed of sound. This value is needed for doppler effect calculation.
speed | The new speed of sound. |
Definition at line 539 of file AUD_C-API.cpp.
References AUD_I3DDevice::setSpeedOfSound().
int AUD_setVolumeMaximum | ( | AUD_Handle * | handle, |
float | volume | ||
) |
Sets the maximum volume of a source.
handle | The handle of the source. |
volume | The new maximum volume. |
Definition at line 627 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
int AUD_setVolumeMinimum | ( | AUD_Handle * | handle, |
float | volume | ||
) |
Sets the minimum volume of a source.
handle | The handle of the source. |
volume | The new minimum volume. |
Definition at line 640 of file AUD_C-API.cpp.
References assert, and AUD_Reference< T >::isNull().
void AUD_startPlayback | ( | void | ) |
Starts the playback of jack transport if possible.
Definition at line 1065 of file AUD_C-API.cpp.
References AUD_Reference< T >::get(), and AUD_JackDevice::startPlayback().
int AUD_stop | ( | AUD_Handle * | handle | ) |
Stops a playing or paused sound.
handle | The handle to the sound. |
Definition at line 471 of file AUD_C-API.cpp.
References assert.
void AUD_stopPlayback | ( | void | ) |
Stops the playback of jack transport if possible.
Definition at line 1074 of file AUD_C-API.cpp.
References AUD_Reference< T >::get(), and AUD_JackDevice::stopPlayback().
void AUD_unload | ( | AUD_Sound * | sound | ) |
Unloads a sound of any type.
sound | The handle of the sound. |
Definition at line 438 of file AUD_C-API.cpp.
References assert.
Referenced by sound_free().
void AUD_unlock | ( | void | ) |
Unlocks the device.
Definition at line 278 of file AUD_C-API.cpp.
void AUD_updateSequenceData | ( | AUD_SEntry * | entry, |
float | volume_max, | ||
float | volume_min, | ||
float | distance_max, | ||
float | distance_reference, | ||
float | attenuation, | ||
float | cone_angle_outer, | ||
float | cone_angle_inner, | ||
float | cone_volume_outer | ||
) |
Updates all non-animated parameters of the entry.
entry | The sequenced entry. |
volume_max | The maximum volume. |
volume_min | The minimum volume. |
distance_max | The maximum distance. |
distance_reference | The reference distance. |
attenuation | The attenuation. |
cone_angle_outer | The outer cone opening angle. |
cone_angle_inner | The inner cone opening angle. |
cone_volume_outer | The volume outside the outer cone. |
Definition at line 1010 of file AUD_C-API.cpp.
void AUD_updateSequencerData | ( | AUD_Sound * | sequencer, |
float | speed_of_sound, | ||
float | factor, | ||
AUD_DistanceModel | model | ||
) |
Updates all non-animated parameters of the entry.
sequencer | The sound scene. |
speed_of_sound | The speed of sound for doppler calculation. |
factor | The doppler factor to control the effect's strength. |
model | The distance model for distance calculation. |
Definition at line 1018 of file AUD_C-API.cpp.
References AUD_Reference< T >::get(), AUD_SequencerFactory::setDistanceModel(), AUD_SequencerFactory::setDopplerFactor(), and AUD_SequencerFactory::setSpeedOfSound().
void AUD_updateSequenceSound | ( | AUD_SEntry * | entry, |
AUD_Sound * | sound | ||
) |
Sets the sound of the entry.
entry | The sequenced entry. |
sound | The new sound. |
Definition at line 978 of file AUD_C-API.cpp.
static void pauseSound | ( | AUD_Handle * | handle | ) | [static] |
Definition at line 892 of file AUD_C-API.cpp.
References assert.
Referenced by AUD_pauseAfter(), and KX_SoundActuator::Update().
AUD_I3DDevice* AUD_3ddevice [static] |
Definition at line 105 of file AUD_C-API.cpp.
Referenced by AUD_get3DDevice().
AUD_Reference<AUD_IDevice> AUD_device [static] |
Definition at line 104 of file AUD_C-API.cpp.
Referenced by AUD_getDevice().