News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

Zap::SFXObject class Reference

Zap::SFXObject Class Reference

#include <sfx.h>

Inheritance diagram for Zap::SFXObject:

TNL::Object

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

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

Point mListenerPosition
Point mListenerVelocity
F32 mMaxDistance
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]
 

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

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

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

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

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

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

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

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

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

RefPtr<SFXObject> Zap::SFXObject::play (  U32  profileIndex,
Point  position,
Point  velocity,
F32  gain = 1.0f
)  [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]