NLSOUND::CTrack Class Reference

#include <mixing_track.h>


Detailed Description

A source selected for playing
Author:
Olivier Cado

Nevrax France

Date:
2001

Definition at line 46 of file mixing_track.h.

Public Member Functions

 CTrack ()
 Constructor.

CSimpleSourcegetSource ()
 Return the logical source.

void init (ISoundDriver *sd)
 Init.

bool isAvailable () const
 Return availability.

bool isPlaying () const
 Returns true if the track is physically playing (different from getUserSource()->isPlaying()).

void setSource (CSimpleSource *src)
 Set logical source (if NULL, the track becomes available).

virtual ~CTrack ()
 Destructor.


Data Fields

ISourceDrvSource
 Physical source played by the driver.


Private Attributes

CSimpleSource_SimpleSource
 The current logical source.


Constructor & Destructor Documentation

NLSOUND::CTrack::CTrack  )  [inline]
 

Constructor.

Definition at line 51 of file mixing_track.h.

References _SimpleSource, and DrvSource.

00051 : DrvSource(NULL), _SimpleSource(NULL) {}

virtual NLSOUND::CTrack::~CTrack  )  [inline, virtual]
 

Destructor.

Definition at line 55 of file mixing_track.h.

References DrvSource.

00055 { if ( DrvSource != NULL ) delete DrvSource; }


Member Function Documentation

CSimpleSource* NLSOUND::CTrack::getSource  )  [inline]
 

Return the logical source.

Definition at line 67 of file mixing_track.h.

References _SimpleSource.

Referenced by NLSOUND::CAudioMixerUser::bufferUnloaded(), NLSOUND::CAudioMixerUser::freeTrack(), NLSOUND::CAudioMixerUser::getFreeTrack(), NLSOUND::CAudioMixerUser::reset(), and NLSOUND::CAudioMixerUser::update().

00067 { return _SimpleSource; }

void NLSOUND::CTrack::init ISoundDriver sd  )  [inline]
 

Init.

Definition at line 53 of file mixing_track.h.

References NLSOUND::ISoundDriver::createSource(), and DrvSource.

Referenced by NLSOUND::CAudioMixerUser::init().

00053 { DrvSource = sd->createSource(); }

bool NLSOUND::CTrack::isAvailable  )  const [inline]
 

Return availability.

Definition at line 61 of file mixing_track.h.

References _SimpleSource, DrvSource, NLSOUND::ISource::isStopped(), and nlassert.

00061 { nlassert( DrvSource != NULL ); return (_SimpleSource==NULL) && DrvSource->isStopped(); }

bool NLSOUND::CTrack::isPlaying  )  const [inline]
 

Returns true if the track is physically playing (different from getUserSource()->isPlaying()).

Definition at line 63 of file mixing_track.h.

References DrvSource, NLSOUND::ISource::isPlaying(), and nlassert.

Referenced by NLSOUND::CAudioMixerUser::update().

00063 { nlassert( DrvSource != NULL ); return DrvSource->isPlaying(); }

void NLSOUND::CTrack::setSource CSimpleSource src  )  [inline]
 

Set logical source (if NULL, the track becomes available).

Definition at line 65 of file mixing_track.h.

References _SimpleSource, and src.

Referenced by NLSOUND::CAudioMixerUser::freeTrack(), and NLSOUND::CAudioMixerUser::getFreeTrack().

00065 { _SimpleSource = src; }


Field Documentation

CSimpleSource* NLSOUND::CTrack::_SimpleSource [private]
 

The current logical source.

Definition at line 76 of file mixing_track.h.

Referenced by CTrack(), getSource(), isAvailable(), and setSource().

ISource* NLSOUND::CTrack::DrvSource
 

Physical source played by the driver.

Definition at line 71 of file mixing_track.h.

Referenced by CTrack(), NLSOUND::CSimpleSource::getTime(), init(), isAvailable(), isPlaying(), NLSOUND::CSimpleSource::play(), NLSOUND::CSimpleSource::setDirection(), NLSOUND::CSimpleSource::setGain(), NLSOUND::CSimpleSource::setLooping(), NLSOUND::CSimpleSource::setPitch(), NLSOUND::CSimpleSource::setPos(), NLSOUND::CSimpleSource::setRelativeGain(), NLSOUND::CSimpleSource::setSourceRelativeMode(), NLSOUND::CSimpleSource::setVelocity(), NLSOUND::CSimpleSource::stop(), and ~CTrack().


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 14:49:32 2004 for NeL by doxygen 1.3.6