Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

snx::ISoundImplementation Class Reference

#include <ISoundImplementation.h>

Inheritance diagram for snx::ISoundImplementation:

Inheritance graph
[legend]
List of all members.

Public Methods

 ISoundImplementation ()
 default constructor. More...

virtual void clone (ISoundImplementation *&newCopy)=0
 every implementation can return a new copy of itself. More...

virtual ~ISoundImplementation ()
 @semantics destructor. More...

virtual void trigger (const std::string &alias, const int &repeat=1)=0
 trigger a sound. More...

virtual bool isPlaying (const std::string &alias)=0
 is the sound currently playing? More...

virtual void setRetriggerable (const std::string &alias, bool onOff)=0
 when sound is already playing then you call trigger, does the sound restart from beginning? (if a tree falls and no one is around to hear it, does it make sound?). More...

virtual bool isRetriggerable (const std::string &alias)=0
 is the sound retriggerable? More...

virtual void stop (const std::string &alias)=0
 @semantics stop the sound @input alias of the sound to be stopped. More...

virtual void pause (const std::string &alias)=0
 pause the sound, use unpause to return playback where you left off... More...

virtual void unpause (const std::string &alias)=0
 resume playback from a paused state. More...

virtual bool isPaused (const std::string &alias)=0
 if the sound is paused, then return true. More...

virtual void setAmbient (const std::string &alias, bool ambient=false)=0
 ambient or positional sound. More...

virtual bool isAmbient (const std::string &alias)=0
 is the sound ambient - attached to the listener, doesn't change volume when listener moves... More...

virtual void setPitchBend (const std::string &alias, float amount)=0
 bend the pitch of the sound. More...

virtual void setVolume (const std::string &alias, float amount)=0
 affect volume. More...

virtual void setCutoff (const std::string &alias, float amount)=0
 affect cutoff. More...

virtual void setPosition (const std::string &alias, float x, float y, float z)=0
 set sound's 3D position. More...

virtual void getPosition (const std::string &alias, float &x, float &y, float &z)=0
 get sound's 3D position @input alias is a name that has been associate()d with some sound data @output x,y,z are returned in OpenGL coordinates. More...

virtual void setListenerPosition (const gmtl::Matrix44f &mat)=0
 set the position of the listener. More...

virtual void getListenerPosition (gmtl::Matrix44f &mat)=0
 get the position of the listener. More...

virtual int startAPI ()=0
 start the sound API, creating any contexts or other configurations at startup. More...

virtual bool isStarted () const=0
 query whether the API has been started or not @semantics return true if api has been started, false otherwise. More...

virtual void shutdownAPI ()=0
 kill the sound API, deallocating any sounds, etc... More...

virtual void configure (const snx::SoundAPIInfo &sai)=0
virtual void configure (const std::string &alias, const snx::SoundInfo &description)=0
 configure/reconfigure a sound configure: associate a name (alias) to the description if not already done reconfigure: change properties of the sound to the descriptino provided. More...

virtual void remove (const std::string &alias)=0
 remove a configured sound, any future reference to the alias will not cause an error, but will not result in a rendered sound. More...

virtual void step (const float &timeElapsed)=0
 @semantics call once per sound frame (doesn't have to be same as your graphics frame) @input time elapsed since last frame. More...

virtual void clear ()=0
 clear all associate()tions. More...

virtual void bindAll ()=0
 bind: load (or reload) all associate()d sounds. More...

virtual void unbindAll ()=0
 unbind: unload/deallocate all associate()d sounds. More...

virtual void bind (const std::string &alias)=0
 load/allocate the sound data this alias refers to the sound API. More...

virtual void unbind (const std::string &alias)=0
 unload/deallocate the sound data this alias refers from the sound API. More...

virtual snx::SoundInfolookup (const std::string &alias)=0
virtual void setName (const std::string &name)=0
virtual std::string & name ()=0

Protected Methods

virtual void destroy ()=0
 Subclasses must implement this so that dynamically loaded plug-ins delete themselves in the correct memory space. More...


Constructor & Destructor Documentation

snx::ISoundImplementation::ISoundImplementation   [inline]
 

default constructor.

Definition at line 62 of file ISoundImplementation.h.

00062 {}

virtual snx::ISoundImplementation::~ISoundImplementation   [inline, virtual]
 

@semantics destructor.

Definition at line 72 of file ISoundImplementation.h.

00072 {}


Member Function Documentation

virtual void snx::ISoundImplementation::clone ISoundImplementation *&    newCopy [pure virtual]
 

every implementation can return a new copy of itself.

Implemented in snx::SoundImplementation.

virtual void snx::ISoundImplementation::trigger const std::string &    alias,
const int &    repeat = 1
[pure virtual]
 

trigger a sound.

@input alias of the sound to trigger, and number of times to play, -1 is repeat infinately @preconditions alias does not have to be associated with a loaded sound. @postconditions if it is, then the loaded sound is triggered. if it isn't then nothing happens. @semantics Triggers a sound

Implemented in snx::SoundImplementation.

Referenced by sonix::trigger.

virtual bool snx::ISoundImplementation::isPlaying const std::string &    alias [pure virtual]
 

is the sound currently playing?

Implemented in snx::SoundImplementation.

Referenced by sonix::isPlaying.

virtual void snx::ISoundImplementation::setRetriggerable const std::string &    alias,
bool    onOff
[pure virtual]
 

when sound is already playing then you call trigger, does the sound restart from beginning? (if a tree falls and no one is around to hear it, does it make sound?).

Implemented in snx::SoundImplementation.

Referenced by sonix::setRetriggerable.

virtual bool snx::ISoundImplementation::isRetriggerable const std::string &    alias [pure virtual]
 

is the sound retriggerable?

Implemented in snx::SoundImplementation.

Referenced by sonix::isRetriggerable.

virtual void snx::ISoundImplementation::stop const std::string &    alias [pure virtual]
 

@semantics stop the sound @input alias of the sound to be stopped.

Implemented in snx::SoundImplementation.

Referenced by sonix::stop.

virtual void snx::ISoundImplementation::pause const std::string &    alias [pure virtual]
 

pause the sound, use unpause to return playback where you left off...

Implemented in snx::SoundImplementation.

Referenced by sonix::pause.

virtual void snx::ISoundImplementation::unpause const std::string &    alias [pure virtual]
 

resume playback from a paused state.

does nothing if sound was not paused.

Implemented in snx::SoundImplementation.

Referenced by sonix::unpause.

virtual bool snx::ISoundImplementation::isPaused const std::string &    alias [pure virtual]
 

if the sound is paused, then return true.

Implemented in snx::SoundImplementation.

Referenced by sonix::isPaused.

virtual void snx::ISoundImplementation::setAmbient const std::string &    alias,
bool    ambient = false
[pure virtual]
 

ambient or positional sound.

is the sound ambient - attached to the listener, doesn't change volume when listener moves... or is the sound positional - changes volume as listener nears or retreats..

Implemented in snx::SoundImplementation.

Referenced by sonix::setAmbient.

virtual bool snx::ISoundImplementation::isAmbient const std::string &    alias [pure virtual]
 

is the sound ambient - attached to the listener, doesn't change volume when listener moves...

Implemented in snx::SoundImplementation.

Referenced by sonix::isAmbient.

virtual void snx::ISoundImplementation::setPitchBend const std::string &    alias,
float    amount
[pure virtual]
 

bend the pitch of the sound.

Implemented in snx::SoundImplementation.

Referenced by sonix::setPitchBend.

virtual void snx::ISoundImplementation::setVolume const std::string &    alias,
float    amount
[pure virtual]
 

affect volume.

set to a value between [0..1].

Implemented in snx::SoundImplementation.

Referenced by sonix::setVolume.

virtual void snx::ISoundImplementation::setCutoff const std::string &    alias,
float    amount
[pure virtual]
 

affect cutoff.

set to a value between [0..1]... 1 is no change. 0 is total cutoff.

Implemented in snx::SoundImplementation.

Referenced by sonix::setCutoff.

virtual void snx::ISoundImplementation::setPosition const std::string &    alias,
float    x,
float    y,
float    z
[pure virtual]
 

set sound's 3D position.

Implemented in snx::SoundImplementation.

Referenced by sonix::setPosition.

virtual void snx::ISoundImplementation::getPosition const std::string &    alias,
float &    x,
float &    y,
float &    z
[pure virtual]
 

get sound's 3D position @input alias is a name that has been associate()d with some sound data @output x,y,z are returned in OpenGL coordinates.

Implemented in snx::SoundImplementation.

Referenced by sonix::getPosition.

virtual void snx::ISoundImplementation::setListenerPosition const gmtl::Matrix44f &    mat [pure virtual]
 

set the position of the listener.

Implemented in snx::SoundImplementation.

Referenced by sonix::setListenerPosition.

virtual void snx::ISoundImplementation::getListenerPosition gmtl::Matrix44f &    mat [pure virtual]
 

get the position of the listener.

Implemented in snx::SoundImplementation.

Referenced by sonix::getListenerPosition.

virtual int snx::ISoundImplementation::startAPI   [pure virtual]
 

start the sound API, creating any contexts or other configurations at startup.

@postconditions sound API is ready to go. @semantics this function should be called before using the other functions in the class.

Returns:
values: return 1 if successful, 0 otherwise

Implemented in snx::SoundImplementation.

Referenced by sonix::changeAPI, and sonix::impl.

virtual bool snx::ISoundImplementation::isStarted   const [pure virtual]
 

query whether the API has been started or not @semantics return true if api has been started, false otherwise.

Implemented in snx::SoundImplementation.

virtual void snx::ISoundImplementation::shutdownAPI   [pure virtual]
 

kill the sound API, deallocating any sounds, etc...

@postconditions sound API is ready to go. @semantics this function could be called any time, the function could be called multiple times, so it should be smart.

Implemented in snx::SoundImplementation.

Referenced by sonix::changeAPI, and sonix::~sonix.

virtual void snx::ISoundImplementation::configure const snx::SoundAPIInfo   sai [pure virtual]
 

Implemented in snx::SoundImplementation.

Referenced by sonix::configure.

virtual void snx::ISoundImplementation::configure const std::string &    alias,
const snx::SoundInfo   description
[pure virtual]
 

configure/reconfigure a sound configure: associate a name (alias) to the description if not already done reconfigure: change properties of the sound to the descriptino provided.

@preconditions provide an alias and a SoundInfo which describes the sound @postconditions alias will point to loaded sound data @semantics associate an alias to sound data. later this alias can be used to operate on this sound data.

Implemented in snx::SoundImplementation.

virtual void snx::ISoundImplementation::remove const std::string &    alias [pure virtual]
 

remove a configured sound, any future reference to the alias will not cause an error, but will not result in a rendered sound.

Implemented in snx::SoundImplementation.

Referenced by sonix::remove.

virtual void snx::ISoundImplementation::step const float &    timeElapsed [pure virtual]
 

@semantics call once per sound frame (doesn't have to be same as your graphics frame) @input time elapsed since last frame.

Implemented in snx::SoundImplementation.

Referenced by sonix::step.

virtual void snx::ISoundImplementation::clear   [pure virtual]
 

clear all associate()tions.

@semantics any existing aliases will be stubbed. sounds will be unbound

Implemented in snx::SoundImplementation.

virtual void snx::ISoundImplementation::bindAll   [pure virtual]
 

bind: load (or reload) all associate()d sounds.

@postconditions all sound associations are buffered by the sound API

Implemented in snx::SoundImplementation.

Referenced by sonix::changeAPI, and sonix::impl.

virtual void snx::ISoundImplementation::unbindAll   [pure virtual]
 

unbind: unload/deallocate all associate()d sounds.

@postconditions all sound associations are unbuffered by the sound API

Implemented in snx::SoundImplementation.

Referenced by sonix::changeAPI, and sonix::~sonix.

virtual void snx::ISoundImplementation::bind const std::string &    alias [pure virtual]
 

load/allocate the sound data this alias refers to the sound API.

@postconditions the sound API has the sound buffered.

Implemented in snx::SoundImplementation.

virtual void snx::ISoundImplementation::unbind const std::string &    alias [pure virtual]
 

unload/deallocate the sound data this alias refers from the sound API.

@postconditions the sound API no longer has the sound buffered.

Implemented in snx::SoundImplementation.

virtual snx::SoundInfo& snx::ISoundImplementation::lookup const std::string &    alias [pure virtual]
 

Implemented in snx::SoundImplementation.

virtual void snx::ISoundImplementation::setName const std::string &    name [pure virtual]
 

Implemented in snx::SoundImplementation.

Referenced by snx::SoundFactory::reg.

virtual std::string& snx::ISoundImplementation::name   [pure virtual]
 

Implemented in snx::SoundImplementation.

Referenced by sonix::changeAPI.

virtual void snx::ISoundImplementation::destroy   [protected, pure virtual]
 

Subclasses must implement this so that dynamically loaded plug-ins delete themselves in the correct memory space.

This uses a template method pattern.

Implemented in snx::StubSoundImplementation.


The documentation for this class was generated from the following file:
Generated on Sun May 2 14:39:33 2004 for Juggler Sonix by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002