Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: Zap::SFXObject Class Reference

# Zap::SFXObject Class Reference

`#include <sfx.h>`

Inheritance diagram for Zap::SFXObject:

## Public Member Functions

| SFXObject (U32 profileIndex, ByteBufferPtr samples, F32 gain, Point position, Point velocity)
| ~SFXObject ()
void | setGain (F32 gain)
void | play ()
void | stop ()
void | setMovementParams (Point position, Point velocity)
void | queueBuffer (ByteBufferPtr b)
bool | isPlaying ()

## Static Public Member Functions

static bool | startRecording ()
static void | captureSamples (ByteBufferPtr sampleBuffer)
static void | stopRecording ()
static void | setMaxDistance (F32 maxDistance)
static void | init ()
static void | shutdown ()
static void | process ()
static void | setListenerParams (Point position, Point velocity)
static RefPtr< SFXObject > | play (U32 profileIndex, F32 gain=1.0f)
static RefPtr< SFXObject > | play (U32 profileIndex, Point position, Point velocity, F32 gain=1.0f)
static RefPtr< SFXObject > | playRecordedBuffer (ByteBufferPtr b, F32 gain=1.0f)

## Private Member Functions

void | playOnSource ()
void | updateGain ()
void | updateMovementParams ()

## Private Attributes

U32 | mSFXIndex
Point | mPosition
Point | mVelocity
ByteBufferPtr | mInitialBuffer
SFXProfile * | mProfile
F32 | mGain
S32 | mSourceIndex
F32 | mPriority

## Static Private Attributes

static Point | mListenerPosition
static Point | mListenerVelocity
static F32 | mMaxDistance
static S32 | mCaptureGain

## Constructor & Destructor Documentation

Zap::SFXObject::SFXObject | ( | U32 | profileIndex,
|  | ByteBufferPtr | samples,
|  | F32 | gain,
|  | Point | position,
|  | Point | velocity |
| ) |  |  |

Zap::SFXObject::~SFXObject | ( |  | ) |

## Member Function Documentation

void Zap::SFXObject::playOnSource | ( |  | ) | `[private]`

void Zap::SFXObject::updateGain | ( |  | ) | `[private]`

void Zap::SFXObject::updateMovementParams | ( |  | ) | `[private]`

void Zap::SFXObject::setGain | ( | F32 | gain | ) |

void Zap::SFXObject::play | ( |  | ) |

void Zap::SFXObject::stop | ( |  | ) |

void Zap::SFXObject::setMovementParams | ( | Point | position,
|  | Point | velocity |
| ) |  |  |

void Zap::SFXObject::queueBuffer | ( | ByteBufferPtr | b | ) |

bool Zap::SFXObject::isPlaying | ( |  | ) | `[inline]`

static bool Zap::SFXObject::startRecording | ( |  | ) | `[static]`

static void Zap::SFXObject::captureSamples | ( | ByteBufferPtr | sampleBuffer | ) | `[static]`

static void Zap::SFXObject::stopRecording | ( |  | ) | `[static]`

static void Zap::SFXObject::setMaxDistance | ( | F32 | maxDistance | ) | `[static]`

static void Zap::SFXObject::init | ( |  | ) | `[static]`

static void Zap::SFXObject::shutdown | ( |  | ) | `[static]`

static void Zap::SFXObject::process | ( |  | ) | `[static]`

static void Zap::SFXObject::setListenerParams | ( | Point | position,
|  | Point | velocity |
| ) |  |  | `[static]`

static RefPtr<SFXObject> Zap::SFXObject::play | ( | U32 | profileIndex,
|  | F32 | gain = `1.0f` |
| ) |  |  | `[static]`

static RefPtr<SFXObject> Zap::SFXObject::play | ( | U32 | profileIndex,
|  | Point | position,
|  | Point | velocity,
|  | F32 | gain = `1.0f` |
| ) |  |  | `[static]`

static RefPtr<SFXObject> Zap::SFXObject::playRecordedBuffer | ( | ByteBufferPtr | b,
|  | F32 | gain = `1.0f` |
| ) |  |  | `[static]`

## Field Documentation

Point Zap::SFXObject::mListenerPosition`[static, private]`

Point Zap::SFXObject::mListenerVelocity`[static, private]`

F32 Zap::SFXObject::mMaxDistance`[static, private]`

S32 Zap::SFXObject::mCaptureGain`[static, private]`

U32 Zap::SFXObject::mSFXIndex`[private]`

Point Zap::SFXObject::mPosition`[private]`

Point Zap::SFXObject::mVelocity`[private]`

ByteBufferPtr Zap::SFXObject::mInitialBuffer`[private]`

SFXProfile* Zap::SFXObject::mProfile`[private]`

F32 Zap::SFXObject::mGain`[private]`

S32 Zap::SFXObject::mSourceIndex`[private]`

F32 Zap::SFXObject::mPriority`[private]`