Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a sorted time sequence of sound regions. More...
#include <omSoundTrack.h>
Public Member Functions | |
SoundTrack () | |
Create a new empty track with no regions. More... | |
Size | getRegionCount () const |
Return the number of regions there are in this track. More... | |
SoundRegion & | getRegion (Index regionIndex) |
Return a reference to the sound region at the specified index in this track. More... | |
const SoundRegion & | getRegion (Index regionIndex) const |
Return a const reference to the sound region at the specified index in this track. More... | |
void | setRegion (Index regionIndex, const SoundRegion &newRegion) |
Replace the sound region at the specified index in this track, keeping the previous start time. More... | |
const Time & | getRegionStart (Index regionIndex) const |
Return the start time of the sound region at the specified index in this track. More... | |
void | setRegionStart (Index regionIndex, const Time &newStart) |
Update the start time of the region at the specified index. More... | |
void | addRegion (const SoundRegion ®ion, const Time &start) |
Add a new region to this track that is played back at the specified time. More... | |
void | removeRegion (Index regionIndex) |
Remove the region from this track at the specified index. More... | |
void | clearRegions () |
Remove all regions from this track. More... | |
Static Public Attributes | |
static const om::resources::ResourceType | RESOURCE_TYPE |
The resource type for a sound track. More... | |
A class that represents a sorted time sequence of sound regions.
om::sound::base::SoundTrack::SoundTrack | ( | ) |
Create a new empty track with no regions.
|
inline |
Return the number of regions there are in this track.
|
inline |
Return a reference to the sound region at the specified index in this track.
|
inline |
Return a const reference to the sound region at the specified index in this track.
void om::sound::base::SoundTrack::setRegion | ( | Index | regionIndex, |
const SoundRegion & | newRegion | ||
) |
Replace the sound region at the specified index in this track, keeping the previous start time.
Return the start time of the sound region at the specified index in this track.
Update the start time of the region at the specified index.
After the method call, the regions in the track may have been reordered to keep the regions sorted.
void om::sound::base::SoundTrack::addRegion | ( | const SoundRegion & | region, |
const Time & | start | ||
) |
Add a new region to this track that is played back at the specified time.
The new region is inserted in the track's list of regions at the correct place so that the playback start times are sorted in increasing order.
void om::sound::base::SoundTrack::removeRegion | ( | Index | regionIndex | ) |
Remove the region from this track at the specified index.
void om::sound::base::SoundTrack::clearRegions | ( | ) |
Remove all regions from this track.
|
static |
The resource type for a sound track.