Classes | Typedefs | Functions

Wavepacket 3D Audio Library
[Wavepacket Audio Libraries]

A simple 3D audio library. More...

Collaboration diagram for Wavepacket 3D Audio Library:

Classes

class  audio3d::SoundManager
 This class manages all 3D sounds. More...

Typedefs

typedef dword_t audio3d::id_t

Functions

virtual id_t audio3d::SoundManager::createListener (void)=0
 creates a listener and provides the ID back.
virtual void audio3d::SoundManager::updateListener (id_t listenerId, const point3d_t &position, const point3d_t &facing, const point3d_t &up)=0
 caller can move the specified listener to the given position and orientation.
virtual bool audio3d::SoundManager::removeListener (id_t listenerId)=0
 remove the listener with the given ID
virtual id_t audio3d::SoundManager::createSound (id_t listenerId, const char *filename, float baseVolume)=0
 create a sound that can be heard by the given listener
virtual void audio3d::SoundManager::updateSound (id_t soundId, const point3d_t &position)=0
 move the specified sound to a new location (cannot change spaces)
virtual bool audio3d::SoundManager::removeSound (id_t soundId)=0
 remove the sound with the given ID
virtual void audio3d::SoundManager::updateSounds (void)=0
 update all volume and panning levels based on current positions
static smart_ptr< SoundManager > audio3d::SoundManager::create (const char *device_name, const char *parameters)

Detailed Description

A simple 3D audio library.


This is a simple implementation based on the audiere API.


Typedef Documentation

Definition at line 68 of file audio3d.h.


Function Documentation

virtual id_t audio3d::SoundManager::createListener ( void   )  [pure virtual, inherited]

creates a listener and provides the ID back.

The listener is positioned at the origin (0, 0, 0) facing in the z-direction (facing = [0, 0, 1]) with local up in the y-direction (up = [0, 1, 0]). Call updateListener() to change the position and orientation.

virtual void audio3d::SoundManager::updateListener ( id_t  listenerId,
const point3d_t position,
const point3d_t facing,
const point3d_t up 
) [pure virtual, inherited]

caller can move the specified listener to the given position and orientation.

The facing and up vectors must be normalized.

virtual bool audio3d::SoundManager::removeListener ( id_t  listenerId  )  [pure virtual, inherited]

remove the listener with the given ID

virtual id_t audio3d::SoundManager::createSound ( id_t  listenerId,
const char *  filename,
float  baseVolume 
) [pure virtual, inherited]

create a sound that can be heard by the given listener

virtual void audio3d::SoundManager::updateSound ( id_t  soundId,
const point3d_t position 
) [pure virtual, inherited]

move the specified sound to a new location (cannot change spaces)

virtual bool audio3d::SoundManager::removeSound ( id_t  soundId  )  [pure virtual, inherited]

remove the sound with the given ID

virtual void audio3d::SoundManager::updateSounds ( void   )  [pure virtual, inherited]

update all volume and panning levels based on current positions

smart_ptr< SoundManager > audio3d::SoundManager::create ( const char *  device_name,
const char *  parameters 
) [static, inherited]
Parameters:
device_name device name passed into audiere::OpenDevice
parameters parameters passed into audiere::OpenDevice

Definition at line 435 of file audio3d.cpp.