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

SoundAttributes Struct Reference

A struct for storage of audio device or audio file parameters. More...

#include <SoundAttributes.h>

List of all members.

Public Types

Public Member Functions

Static Public Member Functions

Public Attributes


Detailed Description

A struct for storage of audio device or audio file parameters.

Sample definition
A sample is defined as one or more audio values that are measured at the same point in time. So, for a normal stereo track, a sample consists of two values, one for the Left and one for the Right channel.

A number of successive samples is called a stream.

Up to 32 channels can be present in an audio sample/stream; each channel can be associated with a position (Left, Right, Center, Subwoofer, etc), or, in case Position is < Mono, a channel is defined as a single unassociated stream (but can still be numbered from 0 to 31). There is no pre-defined order for the channel positions; a stereo sample could be stored as |Left|Right| or |Right|Left|.

Each channel must have the same format (8 bit, 16 bit, signed, unsigned, etc.).


Member Enumeration Documentation

enum SoundAttributes::Channels
 

Enumeration values:
MaxChannel 

enum SoundAttributes::Format
 

The various sample formats

Enumeration values:
Unknown 
Signed8 
Signed16 
Signed24 
Signed32 
Unsigned8 
Unsigned16 
Unsigned24 
Unsigned32 
Float 

enum SoundAttributes::Position
 

Designation per channel

Enumeration values:
NotUsed 
Mono 
Left  Front left.
Right  Front right.
Center 
LeftRear  5.1 sound
RightRear  5.1 sound
LFE  Low Frequency Effects = subwoofer.
LeftCenter  7.1 sound
RightCenter  7.1 sound
Top  Overhead (does this get used at all?).
MaxPosition 

enum SoundAttributes::Preset
 

Some presets

Enumeration values:
Speech  8 KHz, mono, 8 bits unsigned
Radio  22 KHz, mono, 16 bits signed
CD  44.1 KHz, stereo, 16 bits signed
DAT  48 KHz, stereo, 16 bits signed
Dolby51  5.1 surround, left/right/center/lrear/rrear/lfe, 16 bits signed


Constructor & Destructor Documentation

SoundAttributes::SoundAttributes  ) 
 


Member Function Documentation

unsigned int SoundAttributes::BytesPerSample  )  const
 

Returns number of bytes required for a single sample in current format.

unsigned int SoundAttributes::FormatWidth  )  const
 

Returns number of bits for current format.

Note: all channels in a sample(stream) have the same format.

SoundAttributes SoundAttributes::GetFormat Preset  fmt  )  [static]
 

bool SoundAttributes::operator!= const SoundAttributes comp  )  const
 

bool SoundAttributes::operator== const SoundAttributes comp  )  const
 

void SoundAttributes::Reset  ) 
 

void SoundAttributes::SetPreset Preset   ) 
 


Member Data Documentation

Position SoundAttributes::ChannelPosition[MaxChannel]
 

Per channel position info.

unsigned short SoundAttributes::Channels
 

1 to 32; see ChannelPosition

Format SoundAttributes::SampleFormat
 

unsigned int SoundAttributes::SampleRate
 

Frequency at which samples are taken.


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