Public Member Functions

FIFE::SoundClip Class Reference

#include <soundclip.h>

Inherits FIFE::IResource.

List of all members.

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:
streamid The stream ID

Definition at line 186 of file soundclip.cpp.

References getStream().

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 135 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.

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

Returns the attached decoder

Definition at line 131 of file soundclip.h.

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

Refill a processed buffer with new data

Returns:
True if file was EOF
Parameters:
streamid The stream ID

Definition at line 195 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 173 of file soundclip.cpp.

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.

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

Quits Streaming

Definition at line 226 of file soundclip.cpp.

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 148 of file soundclip.cpp.


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