My Project
Public Member Functions | List of all members
ParaEngine::IParaAudioEngine Class Referenceabstract

ParaAudioEngine core interface. More...

#include <IParaAudioEngine.h>

Inheritance diagram for ParaEngine::IParaAudioEngine:
ParaEngine::CParaSimpleAudioEngine

Public Member Functions

virtual void Release ()=0
 
virtual bool initialize (const char *deviceName=0x0, int outputFrequency=-1, int eaxEffectSlots=4)=0
 Initializes the manager. More...
 
virtual void shutDown ()=0
 Shuts the manager down, cleaning up audio sources in the process. Does not clean up decoders, data sources, or event handlers.
 
virtual void update ()=0
 If threading is disabled, you must call this function every frame to update the playback buffers of audio sources. Otherwise it should not be called.
 
virtual IParaAudioSourcegetSoundByName (const char *name)=0
 Returns an Audio Source by its "name" and NULL if the name is not found. More...
 
virtual void releaseAllSources ()=0
 Releases ALL Audio Sources (but does not shutdown the manager)
 
virtual void release (IParaAudioSource *source)=0
 Releases a single Audio Source, removing it from the manager. More...
 
virtual const char * getAvailableDeviceName (unsigned int index)=0
 Returns the name of an available playback device. More...
 
virtual unsigned int getAvailableDeviceCount ()=0
 Returns the number of playback devices available for use. More...
 
virtual const char * getDefaultDeviceName ()=0
 Returns the name of the default system playback device. More...
 
virtual IParaAudioSourcecreate (const char *name, const char *filename, bool stream=false)=0
 Creates an Audio Source object using the highest priority data source that has the referenced filename. More...
 
virtual IParaAudioSourcecreateFromMemory (const char *name, const char *data, size_t length, const char *extension)=0
 Creates an Audio Source from a memory buffer using a specific audio codec. More...
 
virtual IParaAudioSourcecreateFromRaw (const char *name, const char *data, size_t length, unsigned int frequency, ParaAudioFormats format)=0
 Creates an Audio Source from raw audio data in a memory buffer. More...
 
virtual void SetDistanceModel (ParaAudioDistanceModelEnum eDistModel)=0
 set the audio distance model. More...
 
virtual void setPosition (const PARAVECTOR3 &pos)=0
 Interface for the listener in cAudio. This class provides abilities to move and orient where your camera or user is in the audio world. More...
 
virtual void setDirection (const PARAVECTOR3 &dir)=0
 Sets the direction the listener is facing. More...
 
virtual void setUpVector (const PARAVECTOR3 &up)=0
 Sets the up vector to use for the listener Default up vector is Y+, same as OpenGL. More...
 
virtual void setVelocity (const PARAVECTOR3 &vel)=0
 Sets the current velocity of the listener for doppler effects. More...
 
virtual void setMasterVolume (const float &volume)=0
 Sets the global volume modifier (will effect all sources) More...
 
virtual void move (const PARAVECTOR3 &pos)=0
 Convenience function to automatically set the velocity and position for you in a single call. More...
 
virtual PARAVECTOR3 getPosition (void) const =0
 Returns the current position of the listener.
 
virtual PARAVECTOR3 getDirection (void) const =0
 Returns the current direction of the listener.
 
virtual PARAVECTOR3 getUpVector (void) const =0
 Returns the current up vector of the listener.
 
virtual PARAVECTOR3 getVelocity (void) const =0
 Returns the current velocity of the listener.
 
virtual float getMasterVolume (void) const =0
 Returns the global volume modifier for all sources.
 
virtual void SetCoordinateSystem (int nLeftHand)=0
 set the default coordinate system used. More...
 

Detailed Description

ParaAudioEngine core interface.

Member Function Documentation

§ create()

virtual IParaAudioSource* ParaEngine::IParaAudioEngine::create ( const char *  name,
const char *  filename,
bool  stream = false 
)
pure virtual

Creates an Audio Source object using the highest priority data source that has the referenced filename.

Parameters
nameName of the audio source.
filenamePath to the file to load audio data from.
streamWhether to stream the audio data or load it all into a memory buffer at the start. You should consider using streaming for really large sound files.
Returns
A pointer to an Audio Source or NULL if creation failed.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ createFromMemory()

virtual IParaAudioSource* ParaEngine::IParaAudioEngine::createFromMemory ( const char *  name,
const char *  data,
size_t  length,
const char *  extension 
)
pure virtual

Creates an Audio Source from a memory buffer using a specific audio codec.

Parameters
nameName of the audio source.
dataPointer to a buffer in memory to load the data from.
lengthLength of the data buffer.
extensionExtension for the audio codec of the data in the memory buffer.
Returns
A pointer to an Audio Source or NULL if creation failed.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ createFromRaw()

virtual IParaAudioSource* ParaEngine::IParaAudioEngine::createFromRaw ( const char *  name,
const char *  data,
size_t  length,
unsigned int  frequency,
ParaAudioFormats  format 
)
pure virtual

Creates an Audio Source from raw audio data in a memory buffer.

Parameters
nameName of the audio source.
dataPointer to a buffer in memory to load the data from.
lengthLength of the data buffer.
frequencyFrequency (or sample rate) of the audio data.
formatFormat of the audio data.
Returns
A pointer to an Audio Source or NULL if creation failed.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ getAvailableDeviceCount()

virtual unsigned int ParaEngine::IParaAudioEngine::getAvailableDeviceCount ( )
pure virtual

Returns the number of playback devices available for use.

Returns
Number of playback devices available.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ getAvailableDeviceName()

virtual const char* ParaEngine::IParaAudioEngine::getAvailableDeviceName ( unsigned int  index)
pure virtual

Returns the name of an available playback device.

Parameters
indexSpecify which name to retrieve ( Range: 0 to getAvailableDeviceCount()-1 )
Returns
Name of the selected device.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ getDefaultDeviceName()

virtual const char* ParaEngine::IParaAudioEngine::getDefaultDeviceName ( )
pure virtual

Returns the name of the default system playback device.

Returns
Name of the default playback device.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ getSoundByName()

virtual IParaAudioSource* ParaEngine::IParaAudioEngine::getSoundByName ( const char *  name)
pure virtual

Returns an Audio Source by its "name" and NULL if the name is not found.

Parameters
nameName of the audio source to retrieve.
Returns
Pointer to the audio source object or NULL if it could not be found.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ initialize()

virtual bool ParaEngine::IParaAudioEngine::initialize ( const char *  deviceName = 0x0,
int  outputFrequency = -1,
int  eaxEffectSlots = 4 
)
pure virtual

Initializes the manager.

Parameters
deviceNameName of the device to create this manager for.
outputFrequencyFrequency of the output audio or -1 for the device default.
eaxEffectSlotsNumber of EFX effect slots to request. Has no effect if EFX is not supported or compiled out.
Returns
True on success, False if initialization of OpenAL failed.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ move()

virtual void ParaEngine::IParaAudioEngine::move ( const PARAVECTOR3 pos)
pure virtual

Convenience function to automatically set the velocity and position for you in a single call.

Velocity will be set to new position - last position

Parameters
posNew position to move the listener to.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ release()

virtual void ParaEngine::IParaAudioEngine::release ( IParaAudioSource source)
pure virtual

Releases a single Audio Source, removing it from the manager.

Parameters
sourcePointer to the source to release.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ SetCoordinateSystem()

virtual void ParaEngine::IParaAudioEngine::SetCoordinateSystem ( int  nLeftHand)
pure virtual

set the default coordinate system used.

Parameters
nLeftHand0 if it is left handed coordinate system, which is the one used by DirectX. and 1, if it is the right handed coordinate system which is OpenAL(and OpenGL) uses.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ setDirection()

virtual void ParaEngine::IParaAudioEngine::setDirection ( const PARAVECTOR3 dir)
pure virtual

Sets the direction the listener is facing.

Parameters
dirNew direction vector for the listener.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ SetDistanceModel()

virtual void ParaEngine::IParaAudioEngine::SetDistanceModel ( ParaAudioDistanceModelEnum  eDistModel)
pure virtual

§ setMasterVolume()

virtual void ParaEngine::IParaAudioEngine::setMasterVolume ( const float &  volume)
pure virtual

Sets the global volume modifier (will effect all sources)

Parameters
volumeVolume to scale all sources by. Range: 0.0 to +inf.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ setPosition()

virtual void ParaEngine::IParaAudioEngine::setPosition ( const PARAVECTOR3 pos)
pure virtual

Interface for the listener in cAudio. This class provides abilities to move and orient where your camera or user is in the audio world.

Sets the position of the listener. Note that you will still have to set velocity after this call for proper doppler effects. Use move() if you'd like to have cAudio automatically handle velocity for you.

Parameters
posNew position for the listener.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ setUpVector()

virtual void ParaEngine::IParaAudioEngine::setUpVector ( const PARAVECTOR3 up)
pure virtual

Sets the up vector to use for the listener Default up vector is Y+, same as OpenGL.

Parameters
upNew up vector for the listener.

Implemented in ParaEngine::CParaSimpleAudioEngine.

§ setVelocity()

virtual void ParaEngine::IParaAudioEngine::setVelocity ( const PARAVECTOR3 vel)
pure virtual

Sets the current velocity of the listener for doppler effects.

Parameters
velNew velocity for the listener.

Implemented in ParaEngine::CParaSimpleAudioEngine.


The documentation for this class was generated from the following file: