Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Member Functions | Static Public Attributes | List of all members
om::sound::base::SoundTrack Class Reference

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...
 
SoundRegiongetRegion (Index regionIndex)
 Return a reference to the sound region at the specified index in this track. More...
 
const SoundRegiongetRegion (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 TimegetRegionStart (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 &region, 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...
 

Detailed Description

A class that represents a sorted time sequence of sound regions.

Constructor & Destructor Documentation

om::sound::base::SoundTrack::SoundTrack ( )

Create a new empty track with no regions.

Member Function Documentation

Size om::sound::base::SoundTrack::getRegionCount ( ) const
inline

Return the number of regions there are in this track.

SoundRegion& om::sound::base::SoundTrack::getRegion ( Index  regionIndex)
inline

Return a reference to the sound region at the specified index in this track.

const SoundRegion& om::sound::base::SoundTrack::getRegion ( Index  regionIndex) const
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.

const Time& om::sound::base::SoundTrack::getRegionStart ( Index  regionIndex) const
inline

Return the start time of the sound region at the specified index in this track.

void om::sound::base::SoundTrack::setRegionStart ( Index  regionIndex,
const Time newStart 
)

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.

Member Data Documentation

const om::resources::ResourceType om::sound::base::SoundTrack::RESOURCE_TYPE
static

The resource type for a sound track.


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