audiere::LoopPointSource Class Reference

#include <audiere.h>

Inheritance diagram for audiere::LoopPointSource:

Inheritance graph
[legend]
Collaboration diagram for audiere::LoopPointSource:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void addLoopPoint (int location, int target, int loopCount)=0
virtual void removeLoopPoint (int index)=0
virtual int getLoopPointCount ()=0
virtual bool getLoopPoint (int index, int &location, int &target, int &loopCount)=0

Protected Member Functions

 ~LoopPointSource ()

Detailed Description

LoopPointSource is a wrapper around another SampleSource, providing custom loop behavior. LoopPointSource maintains a set of links within the sample stream and whenever the location of one of the links (i.e. a loop point) is reached, the stream jumps to that link's target. Each loop point maintains a count. Every time a loop point comes into effect, the count is decremented. Once it reaches zero, that loop point is temporarily disabled. If a count is not a positive value, it cannot be disabled. Calling reset() resets all counts to their initial values.

Loop points only take effect when repeating has been enabled via the setRepeat() method.

Loop points are stored in sorted order by their location. Each one has an index based on its location within the list. A loop point's index will change if another is added before it.

There is always one implicit loop point after the last sample that points back to the first. That way, this class's default looping behavior is the same as a standard SampleSource. This loop point does not show up in the list.

Definition at line 425 of file audiere.h.


Constructor & Destructor Documentation

audiere::LoopPointSource::~LoopPointSource  )  [inline, protected]
 

Definition at line 427 of file audiere.h.


Member Function Documentation

virtual void audiere::LoopPointSource::addLoopPoint int  location,
int  target,
int  loopCount
[pure virtual]
 

Adds a loop point to the stream. If a loop point at 'location' already exists, the new one replaces it. Location and target are clamped to the actual length of the stream.

Parameters:
location frame where loop occurs
target frame to jump to after loop point is hit
loopCount number of times to execute this jump.

virtual bool audiere::LoopPointSource::getLoopPoint int  index,
int &  location,
int &  target,
int &  loopCount
[pure virtual]
 

Retrieves information about a specific loop point.

Parameters:
index index of the loop point
location frame where loop occurs
target loop point's target frame
loopCount number of times to loop from this particular point
Returns:
true if the index is valid and information is returned

virtual int audiere::LoopPointSource::getLoopPointCount  )  [pure virtual]
 

Returns the number of loop points in this stream.

virtual void audiere::LoopPointSource::removeLoopPoint int  index  )  [pure virtual]
 

Removes the loop point at index 'index' from the stream.

Parameters:
index index of the loop point to remove


The documentation for this class was generated from the following file:
Generated on Mon Feb 13 23:07:18 2006 for audiere by  doxygen 1.4.6