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

ISound Class Reference

ISound is the interface for 2D sound objects. More...

#include <IAudio.h>

Inheritance diagram for ISound::

IPlayable IAudioBase List of all members.

Public Methods

virtual bool Init (const SoundInit &init)=0
virtual bool SetProperties (const SoundProp &prop)=0
virtual bool GetProperties (SoundProp &prop) const=0
virtual bool SetVolume (float fVolume)=0
virtual bool GetVolume (float &fVolume) const=0
virtual bool SetPan (float fPan)=0
virtual bool GetPan (float &fPan) const=0
virtual bool SetPitch (float fPitch)=0
virtual bool GetPitch (float &fPitch) const=0
virtual bool SetReadCursor (uint32 nBytes)=0
virtual bool GetReadCursor (uint32 &nBytes) const=0
virtual bool GetSourceSize (uint32 &nBytes) const=0

Detailed Description

ISound is the interface for 2D sound objects.

ISound-derived objects are representation of 2D sounds. These objects should be used for any sound that does not require true 3D positioning. The interface provides specific initalization routines, pan controls, and read cursor controls.


Member Function Documentation

bool ISound::GetPan ( float & fPan ) const [pure virtual]
 

Gets the current pan value.

Parameters:
fPan   will contain the current pan value for this buffer. The value will be between AUD_PAN_LEFT and AUD_PAN_RIGHT.
Returns:
true indicates success, false indicates failure.
See also:
SetPan()

bool ISound::GetPitch ( float & fPitch ) const [pure virtual]
 

Gets the objects frequency in hertz

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

bool ISound::GetProperties ( SoundProp & prop ) const [pure virtual]
 

Gets all properties simultaneously.

Parameters:
prop   is a structure holding all modifiable properties.
Returns:
true indicates success, false indicates failure.
See also:
SetProperties()

bool ISound::GetReadCursor ( uint32 & nBytes ) const [pure virtual]
 

Gets the current read cursor position in bytes.

Parameters:
nBytes   will be the number of bytes from the beginning of the source.
Returns:
true indicates success, false indicates failure.
See also:
SetReadCursor()

bool ISound::GetSourceSize ( uint32 & nBytes ) const [pure virtual]
 

Retrieves the total size of the current source in bytes.

Parameters:
nBytes   total size retrieved of the source in bytes.
Returns:
true indicates success, false indicates failure.

bool ISound::GetVolume ( float & fVolume ) const [pure virtual]
 

Gets the volume for this audio object.

Parameters:
fVolume   retrieves the current object's volume
Returns:
true indicates success, false indicates failure.
See also:
SetVolume()

bool ISound::Init ( const SoundInit & init ) [pure virtual]
 

Initializes the 2D sound parameters. This must be the first function called on the sound after the object is created.

Parameters:
init   is the initialization structure for 2D sounds, containing pamrameters needed to create the sound.
Returns:
true indicates success, false indicates failure
See also:
SoundInit, Destroy()

bool ISound::SetPan ( float fPan ) [pure virtual]
 

Sets the pan value on the sound. This function could fail if the buffers is not allowed to make pan changes due to hardware limitations or conflicting parameters.

Parameters:
fPan   is automatically clamped between AUD_PAN_LEFT and AUD_PAN_RIGHT.
Returns:
true indicates success, false indicates failure.
See also:
GetPan()

bool ISound::SetPitch ( float fPitch ) [pure virtual]
 

Sets the desired frequency of the audio object relative to its original frequency. For instance, a value of 0.5 sets it to half the original pitch, and a value of 2.0 doubles the pitch. Note that the pitch range may be constained by the sample's original pitch and the range allowed in hardware.

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

bool ISound::SetProperties ( const SoundProp & prop ) [pure virtual]
 

Sets all properties simultaneously.

Parameters:
prop   contains all properties to set.
Returns:
true indicates success, false indicates failure
See also:
GetProperties()

bool ISound::SetReadCursor ( uint32 nBytes ) [pure virtual]
 

Sets the current read cursor position in bytes in the current source.

Parameters:
nBytes   sets the number of bytes from the beginning of the source.
Returns:
true indicates success, false indicates failure.
See also:
GetReadCursor()

bool ISound::SetVolume ( float fVolume ) [pure virtual]
 

Sets the individual volume of a 2D sound. This value will decrease the volume in addition to any decrease from maximum volume set in the master volume controls.

Parameters:
fVolume   sets the volume desired
Returns:
true indicates success, false indicates failure.
See also:
GetVolume()


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