SoundAttributes Struct Reference
A struct for storage of audio device or audio file parameters.
More...
#include <SoundAttributes.h>
List of all members.
Public Types
- enum Format {
Unknown,
Signed8,
Signed16,
Signed24,
Signed32,
Unsigned8,
Unsigned16,
Unsigned24,
Unsigned32,
Float
}
- enum Position {
NotUsed = -1,
Mono = 32,
Left,
Right,
Center,
LeftRear,
RightRear,
LFE,
LeftCenter,
RightCenter,
Top,
MaxPosition = 64
}
- enum Preset {
Speech,
Radio,
CD,
DAT,
Dolby51
}
- enum Channels { MaxChannel = 32
}
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
|
The various sample formats - Enumeration values:
-
Unknown |
|
Signed8 |
|
Signed16 |
|
Signed24 |
|
Signed32 |
|
Unsigned8 |
|
Unsigned16 |
|
Unsigned24 |
|
Unsigned32 |
|
Float |
|
|
|
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 |
|
|
|
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. |
void SoundAttributes::Reset |
( |
|
) |
|
|
void SoundAttributes::SetPreset |
( |
Preset |
|
) |
|
|
Member Data Documentation
|
Per channel position info.
|
|
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
1.3.7