ptd::CAudioSample Class Reference

#include <PtdMusicModule.h>

List of all members.

Public Member Functions

Creators
 CAudioSample ()
 Default constructor is disabled..
 CAudioSample (const std::string &strName, const std::string &strWavSource, unsigned int nNbChannels, long nBufferSize=-1)
 3-parameter constructor: node name, wav source name, buffer size
 CAudioSample (const std::string &strName, unsigned int nNbChannels, unsigned int nNbFrames, long nBufferSize=-1)
 4-parameter initialization constructor
 CAudioSample (const CAudioSample &rhs)
 Copy constructor.
 ~CAudioSample ()
 Destructor.
Manipulators
CAudioSample & operator= (const CAudioSample &rhs)
 Assignment operator.
void recordSample (std::string &strWavSource)
 Copies content of argument buffer at record index and advances record index.
void playSample (audio::CAudioBuffer *pOutputBuffer)
 Copies content at play index into argument buffer and advances play index.
void setIsPlaying (bool newIsPlaying)
 Sets the flag indicating whether the sample is currently playing.
void setIsLooping (bool newIsLooping)
 Sets the flag indicating whether the sample is currently looping.
void setPlayIndex (unsigned int index)
 Sets the play index.
Accessors
std::string getSampleName () const
 Gets this audio sample's name.
unsigned int getNbChannels () const
 Gets this audio sample's number of channels.
unsigned int getNbFrames () const
 Gets this audio sample's audio format.
long getRecordIndex () const
 Gets record index position (no locking).
long getPlayIndex () const
 Gets play index position (no locking).
bool getIsPlaying () const
 Gets flag indicating whether the sample is playing.
bool getIsLooping () const
 Gets flag indicating whether the sample is looping.
double * data () const
 Gets the array of doubles representing the audio in the sample.

Private Attributes

std::string m_strSampleName
 Name of sample.
unsigned int m_nNbChannels
 Number of channels.
unsigned int m_nNbFrames
 Number of frames.
long m_nRecordIndex
 Recording index.
long m_nPlayIndex
 Play index.
unsigned int m_nBufferSize
 Buffer size.
double * m_pSampleDataArray
 Dynamically-allocated array of sample data.
bool m_bIsPlaying
 A flag indicating whether the sample is playing.
bool m_bIsLooping
 A flag indicating whether the sample is looping.


Detailed Description

??? Audio sample

Member Function Documentation

unsigned int CAudioSample::getNbFrames (  )  const

Gets this audio sample's audio format.

Gets this audio sample's number of frames


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

Generated on Mon Dec 20 15:54:52 2010 for Platitude by doxygen 1.5.9