audiere::LoopPointSource Class Reference
#include <audiere.h>
Inheritance diagram for audiere::LoopPointSource:
List of all members.
|
Public Member Functions |
| virtual void ADR_CALL | addLoopPoint (int location, int target, int loopCount)=0 |
| virtual void ADR_CALL | removeLoopPoint (int index)=0 |
| virtual int ADR_CALL | getLoopPointCount ()=0 |
| virtual bool ADR_CALL | getLoopPoint (int index, int &location, int &target, int &loopCount)=0 |
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.
Member Function Documentation
| virtual void ADR_CALL 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 ADR_CALL 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 ADR_CALL audiere::LoopPointSource::getLoopPointCount |
( |
|
) |
[pure virtual] |
|
|
|
Returns the number of loop points in this stream. |
| virtual void ADR_CALL 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:
- D:/CVS/twgui/twgui/source/include/audiere.h
Generated on Tue Feb 14 13:48:45 2006 for Twgui by
1.4.6-NO