SFXALVoice

Engine/source/sfx/openal/sfxALVoice.h

More...

Public Types

Parent 

Public Friends

Protected Attributes

Buggy OAL jumps around when pausing. Save playback cursor here.

Amount by which OAL's reported sample position is offset.

ALuint

Protected Functions

SFXALVoice(const OPENALFNTABLE & oalft, SFXALBuffer * buffer, ALuint sourceName)

For non-streaming buffers, late-bind the audio buffer to the source as OAL will not accept writes to buffers already bound.

Pause playback on the device.

Start playback on the device.

_seek(U32 sample)

Set the playback cursor on the device.

Return the current playback status (playing, paused, or stopped).

Stop playback on the device.

Get the playback cursor on the device.

Public Static Functions

create(SFXALDevice * device, SFXALBuffer * buffer)

Public Functions

play(bool looping)

Starts playback from the current position.

setCone(F32 innerAngle, F32 outerAngle, F32 outerVolume)

Set sound cone of a 3D sound.

setPitch(F32 pitch)

Sets the pitch scale.

Set the distance attenuation rolloff factor. Support by device optional.

setTransform(const MatrixF & transform)

Sets the position and orientation for a 3d voice.

Sets the velocity for a 3d voice.

setVolume(F32 volume)

Sets the volume.

Detailed Description

Public Types

typedef SFXVoice Parent 

Public Friends

Protected Attributes

Mutex mMutex 
const OPENALFNTABLE & mOpenAL 
F32 mResumeAtSampleOffset 

Buggy OAL jumps around when pausing. Save playback cursor here.

U32 mSampleOffset 

Amount by which OAL's reported sample position is offset.

OAL's sample position is relative to the current queue state, so we manually need to keep track of how far into the total queue we are.

ALuint mSourceName 

Protected Functions

SFXALVoice(const OPENALFNTABLE & oalft, SFXALBuffer * buffer, ALuint sourceName)

_getBuffer()

_lateBindStaticBufferIfNecessary()

For non-streaming buffers, late-bind the audio buffer to the source as OAL will not accept writes to buffers already bound.

_pause()

Reimplemented from: SFXVoice

_play()

Reimplemented from: SFXVoice

_seek(U32 sample)

Reimplemented from: SFXVoice

_status()

Reimplemented from: SFXVoice

_stop()

Reimplemented from: SFXVoice

_tell()

Reimplemented from: SFXVoice

Public Static Functions

create(SFXALDevice * device, SFXALBuffer * buffer)

Public Functions

~SFXALVoice()

play(bool looping)

Reimplemented from: SFXVoice

setCone(F32 innerAngle, F32 outerAngle, F32 outerVolume)

Reimplemented from: SFXVoice

setMinMaxDistance(F32 min, F32 max)

Reimplemented from: SFXVoice

setPitch(F32 pitch)

Reimplemented from: SFXVoice

setRolloffFactor(F32 factor)

Reimplemented from: SFXVoice

setTransform(const MatrixF & transform)

Reimplemented from: SFXVoice

setVelocity(const VectorF & velocity)

Reimplemented from: SFXVoice

setVolume(F32 volume)

Reimplemented from: SFXVoice