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

IAudioManager Class Reference

The audio manager controls all low-level audio components. More...

#include <IAudio.h>

List of all members.

Public Methods

virtual bool Init (const AudioMgrInit &init)=0
virtual void Term ()=0
virtual bool IsInitialized () const=0
virtual bool GetStats (AudioMgrStats &stats) const=0
virtual bool CreateSound (ISound *&pSound)=0
virtual bool CreateSound3D (ISound3D *&pSound3D)=0
virtual bool CreateSegment (ISegment *&pSegment)=0
virtual bool CreateDLS (IDLS *&pDLS)=0
virtual bool CreateAudioScript (IAudioScript *&pScript)=0
virtual bool GetListener (IListener *&pListener)=0
virtual bool SetSoundVolume (float fVolume)=0
virtual bool GetSoundVolume (float &fVolume) const=0
virtual bool SetMusicVolume (float fVolume)=0
virtual bool GetMusicVolume (float &fVolume) const=0
virtual bool StopAll ()=0
virtual bool PauseAll ()=0
virtual bool ResumeAll ()=0
virtual bool GetCurrentSegment (ISegment *&pSegment) const=0
virtual bool GetNextSegment (ISegment *&pSegment) const=0
virtual bool CreateAudioStream (IAudioStream *&pStream)=0


Detailed Description

The audio manager controls all low-level audio components.

It is responsible for initializing the sound and music subsystems, and for creating and managing all 2D and 3D sounds (both static and streaming), as well as for queueing and playing music segments. The manager is designed to allow nearly direct access to low level buffers and segments while still providing an easy-to-use and high-level management system.


Member Function Documentation

bool IAudioManager::CreateAudioScript ( IAudioScript *& pScript ) [pure virtual]
 

Creates a new audio script object to be managed by the audio system.

Parameters:
pScript   holds the newly created IAudioScript interface.
Returns:
true indicates success, false indicates failure.

bool IAudioManager::CreateAudioStream ( IAudioStream *& pStream ) [pure virtual]
 

Creates a file object based either on the user-defined file creation factory if one was supplied, or returns a default disk-based file object.

Parameters:
pAudioFile   holds a valid IAudioFile object on success
Returns:
true indicates success, false indicates failure.
See also:
DestroyAudioFile(), IAudioFileFactory, IAudioFile, AudioMgrInit

bool IAudioManager::CreateDLS ( IDLS *& pDLS ) [pure virtual]
 

Creates a new DLS object to be managed by the audio system.

Parameters:
pDLS   holds the newly created IDLS interface.
Returns:
true indicates success, false indicates failure.

bool IAudioManager::CreateSegment ( ISegment *& pSegment ) [pure virtual]
 

Creates a new segment object to be managed by the audio system.

Parameters:
pSegment   holds the newly created ISegment interface.
Returns:
true indicates success, false indicates failure.

bool IAudioManager::CreateSound ( ISound *& pSound ) [pure virtual]
 

Creates a new sound object to be managed by the audio system.

Parameters:
pSound   holds the newly created ISound interface.
Returns:
true indicates success, false indicates failure.

bool IAudioManager::CreateSound3D ( ISound3D *& pSound3D ) [pure virtual]
 

Creates a new 3D sound object to be managed by the audio system.

Parameters:
pSound3D   holds the newly created ISound3D interface.
Returns:
true indicates success, false indicates failure.

bool IAudioManager::GetCurrentSegment ( ISegment *& pSegment ) const [pure virtual]
 

Gets the currently playing music segment from the audio system.

Parameters:
pSegment   is the currently playing primary segment. pSegment will be NULL if no segment is currently playing.
Returns:
true indicates success, false indicates failure.
See also:
GetNextSegment()

bool IAudioManager::GetListener ( IListener *& pListener ) [pure virtual]
 

Retrives the listener object. This function will return the same object on every call.

Parameters:
pListener   holds the acquired IListener interface.
Returns:
true indicates success, false indicates failure.
See also:
IListener

bool IAudioManager::GetMusicVolume ( float & fVolume ) const [pure virtual]
 

Gets the music volume.

Parameters:
fVolume   gets the music volume.
Returns:
true indicates success, false indicates failure.
See also:
SetMusicVolume()

bool IAudioManager::GetNextSegment ( ISegment *& pSegment ) const [pure virtual]
 

Gets the next queued music segment from the audio system.

Parameters:
pSegment   is the next queued segment. pSegment will be NULL if no segment is currently queued.
Returns:
true indicates success, false indicates failure.
See also:
GetCurrentSegment()

bool IAudioManager::GetSoundVolume ( float & fVolume ) const [pure virtual]
 

Gets the master volume from the audio system.

Parameters:
fVolume   gets the master volume.
Returns:
true indicates success, false indicates failure.
See also:
SetSoundVolume()

bool IAudioManager::GetStats ( AudioMgrStats & stats ) const [pure virtual]
 

Gets current usage statistics from the audio manager.

Parameters:
init   is the AudioMgrInit structure that contains statistics fields
Returns:
true indicates success, false indicates failure.
See also:
AudioMgrStats

bool IAudioManager::Init ( const AudioMgrInit & init ) [pure virtual]
 

Initializes the audio manager. This function is automatically called if using the standard engine framework. Otherwise, you must call this manually before attempting to play any sounds.

Parameters:
init   is the AudioMgrInit structure that contains initialization parameters
Returns:
true indicates success, false indicates failure.
See also:
AudioMgrInit, Term()

bool IAudioManager::IsInitialized ( ) const [pure virtual]
 

Determines whether an audio manager is currently initialized.

Returns:
true indicates the manager is initialized, false indicates it is not

bool IAudioManager::PauseAll ( ) [pure virtual]
 

Pauses all currently playing sounds and music.

Returns:
true indicates success, false indicates failure.
See also:
StopAll(), ResumeAll()

bool IAudioManager::ResumeAll ( ) [pure virtual]
 

Resumes all currently paused sounds and music. Note that this will include any sounds paused other than a call to PauseAll().

Returns:
true indicates success, false indicates failure.
See also:
StopAll(), PauseAll()

bool IAudioManager::SetMusicVolume ( float fVolume ) [pure virtual]
 

Sets the music volume.

Parameters:
fVolume   sets the music volume. Acceptable values range from AUD_VOLUME_MIN to AUD_VOLUME_MAX (0 to 1). The volume control is linear.
Returns:
true indicates success, false indicates failure.
See also:
GetMusicVolume()

bool IAudioManager::SetSoundVolume ( float fVolume ) [pure virtual]
 

Sets the master volume for the audio system.

Parameters:
fVolume   sets the master volume. Acceptable values range from AUD_VOLUME_MIN to AUD_VOLUME_MAX (0 to 1). The volume control is linear.
Returns:
true indicates success, false indicates failure.
See also:
GetSoundVolume()

bool IAudioManager::StopAll ( ) [pure virtual]
 

Stops all currently playing sounds and music.

Returns:
true indicates success, false indicates failure.
See also:
PauseAll(), ResumeAll()

void IAudioManager::Term ( ) [pure virtual]
 

Terminates the audio manager. This should be called before the application exits to properly shut down the sound system. This function is called automatically if using the standard engine framework.

See also:
Init()


The documentation for this class was generated from the following file:
Generated at Sun Jul 28 23:17:42 2002 for GAP Audio System by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001