Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

CAudioSample Class Reference

Base class for audio related channels. More...

#include <AudioSample.h>

Inheritance diagram for CAudioSample:

CMemoryAudioSample List of all members.

Public Member Functions

Protected Member Functions

Protected Attributes


Detailed Description

Base class for audio related channels.

CAudioSample is a base class for anything that's linear stream of samples.


Constructor & Destructor Documentation

CAudioSample::CAudioSample const SoundAttributes attrs,
SamplePos  buffer_length
[protected]
 

CAudioSample::CAudioSample  ) 
 

CAudioSample::CAudioSample const CAudioSample audio_sample  ) 
 

Copy constructor.

CAudioSample::~CAudioSample  )  [virtual]
 


Member Function Documentation

bool CAudioSample::CanSeek  )  const [virtual]
 

Returns whether we can seek or not.

When this function returns true, we can jump through the sample back and forward randomly with SeekTo. If false, we can't do this (for example, with streaming audio).

bool CAudioSample::CreateBuffer const SoundAttributes attrs,
SamplePos  buffer_length
[protected]
 

void CAudioSample::Detach  )  [protected]
 

int CAudioSample::GetBytesPerSample  )  const [protected]
 

SoundAttributes CAudioSample::GetSoundAttributes  )  const
 

int CAudioSample::GetValue SamplePos  offset,
SoundAttributes::Position  channel
const [virtual]
 

Get sample-value of a channel.

Parameters:
offset The offset within the sample
The channel (left, right, center, etc).
Return sample at offset and channel.

Illegal offsets and channels will return 0 (silence).

bool CAudioSample::IsNull  )  const
 

CAudioSample & CAudioSample::operator= const CAudioSample audio_sample  ) 
 

bool CAudioSample::SeekTo SamplePos  offset  )  [virtual]
 

Set position to sample offset.

Returns:
True when succeeded, false when out-of-bounds
This function will seek internally to the specified offset. If CanSeek returns false, this function is a no-op.

void CAudioSample::SetSoundAttributes const SoundAttributes  )  const [protected]
 

void CAudioSample::SetValue SamplePos  offset,
SoundAttributes::Position  channel,
int  value
[virtual]
 

SamplePos CAudioSample::TotalLength  )  const [virtual]
 

Get total number of samples.

This function will return the total number of samples; for file-based samples this can be very large, more than will fit in memory.


Member Data Documentation

CAudioSample::SampleData * CAudioSample::m_pData [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Dec 13 23:38:47 2006 for CamStream by doxygen 1.3.7