FIFE  2008.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
FIFE::SoundClip Class Reference

#include <soundclip.h>

Inherits FIFE::IResource.

Collaboration diagram for FIFE::SoundClip:
Collaboration graph

Public Member Functions

bool isStream () const
uint32_t countBuffers () const
ALuint * getBuffers (uint32_t streamid=0) const
uint32_t beginStreaming ()
void acquireStream (uint32_t streamid)
bool setStreamPos (uint32_t streamid, SoundPositionType type, float value)
float getStreamPos (uint32_t streamid, SoundPositionType type) const
bool getStream (uint32_t streamid, ALuint buffer)
void quitStreaming (uint32_t streamid)
void adobtDecoder (SoundDecoder *decoder)
void setDecoder (SoundDecoder *decoder)
SoundDecoder * getDecoder () const

Detailed Description

Class to handle the buffers of an audio file

Definition at line 58 of file soundclip.h.

Member Function Documentation

void FIFE::SoundClip::acquireStream ( uint32_t  streamid)

Fills the streaming-buffers with initial data

Parameters
streamidThe stream ID

Definition at line 187 of file soundclip.cpp.

References getStream().

Referenced by FIFE::SoundEmitter::setCursor().

Here is the caller graph for this function:

void FIFE::SoundClip::adobtDecoder ( SoundDecoder *  decoder)
inline

Adopts a decoder to use so DONT delete it

Definition at line 123 of file soundclip.h.

uint32_t FIFE::SoundClip::beginStreaming ( )

Starts streaming the soundclip

Returns
Returns the streamid

Definition at line 136 of file soundclip.cpp.

uint32_t FIFE::SoundClip::countBuffers ( ) const
inline

Returns the number of buffers used by the SoundClip (only for non-streaming sound clips)

Returns
Returns the number of buffers.

Definition at line 79 of file soundclip.h.

ALuint* FIFE::SoundClip::getBuffers ( uint32_t  streamid = 0) const
inline

Returns the array of buffers for queuing

Definition at line 86 of file soundclip.h.

Referenced by FIFE::SoundEmitter::setCursor().

Here is the caller graph for this function:

SoundDecoder* FIFE::SoundClip::getDecoder ( ) const
inline

Returns the attached decoder

Definition at line 131 of file soundclip.h.

Referenced by FIFE::SoundEmitter::getBitResolution(), FIFE::SoundEmitter::getDecodedLength(), FIFE::SoundEmitter::getSampleRate(), and FIFE::SoundEmitter::isStereo().

Here is the caller graph for this function:

bool FIFE::SoundClip::getStream ( uint32_t  streamid,
ALuint  buffer 
)

Refill a processed buffer with new data

Returns
True if file was EOF
Parameters
streamidThe stream ID

Definition at line 196 of file soundclip.cpp.

Referenced by acquireStream().

Here is the caller graph for this function:

float FIFE::SoundClip::getStreamPos ( uint32_t  streamid,
SoundPositionType  type 
) const

Gets the stream position

Definition at line 174 of file soundclip.cpp.

Referenced by FIFE::SoundEmitter::getCursor().

Here is the caller graph for this function:

bool FIFE::SoundClip::isStream ( ) const
inline

Does this SoundClip require a streaming mechanism?

Returns
Returns true if streaming is required, false if not.

Definition at line 70 of file soundclip.h.

Referenced by FIFE::SoundEmitter::getCursor(), FIFE::SoundEmitter::play(), FIFE::SoundEmitter::reset(), FIFE::SoundEmitter::setCursor(), FIFE::SoundEmitter::setLooping(), and FIFE::SoundEmitter::stop().

Here is the caller graph for this function:

void FIFE::SoundClip::quitStreaming ( uint32_t  streamid)

Quits Streaming

Definition at line 227 of file soundclip.cpp.

Referenced by FIFE::SoundEmitter::reset().

Here is the caller graph for this function:

void FIFE::SoundClip::setDecoder ( SoundDecoder *  decoder)
inline

Sets the decoder to use so DONT delete it before this SoundClip is done with it

Definition at line 127 of file soundclip.h.

bool FIFE::SoundClip::setStreamPos ( uint32_t  streamid,
SoundPositionType  type,
float  value 
)

Sets the stream position

Returns
True if position is invalid (EOF has been reached)

Definition at line 149 of file soundclip.cpp.

Referenced by FIFE::SoundEmitter::setCursor().

Here is the caller graph for this function:


The documentation for this class was generated from the following files: