SoundAttributes.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef SOUNDATTRS_H
00023
#define SOUNDATTRS_H
00024
00025
#include <sys/types.h>
00026
00027
#ifdef _WIN32
00028
typedef char int8_t;
00029
typedef unsigned char u_int8_t;
00030
typedef __int16 int16_t;
00031
typedef unsigned short u_int16_t;
00032
typedef long int32_t;
00033
typedef unsigned long u_int32_t;
00034
#endif
00035
00036 struct SoundAttributes
00037 {
00039 enum Format
00040 {
00041
Unknown,
00042
Signed8,
00043
Signed16,
00044
Signed24,
00045
Signed32,
00046
Unsigned8,
00047
Unsigned16,
00048
Unsigned24,
00049
Unsigned32,
00050
Float,
00051 };
00052
00054 enum Position
00055 {
00056
NotUsed = -1,
00057
Mono = 32,
00058
Left,
00059
Right,
00060
Center,
00061
LeftRear,
00062
RightRear,
00063
LFE,
00064
LeftCenter,
00065
RightCenter,
00066
Top,
00067
MaxPosition = 64
00068 };
00069
00071 enum Preset
00072 {
00073
Speech,
00074
Radio,
00075
CD,
00076
DAT,
00077
Dolby51,
00078
00079 };
00080
00081 enum Channels
00082 {
00083
MaxChannel = 32
00084 };
00085
00086 unsigned int SampleRate;
00087 Format SampleFormat;
00088 unsigned short Channels;
00089 Position ChannelPosition[
MaxChannel];
00090
00091
SoundAttributes();
00092
00093
void Reset();
00094
void SetPreset(Preset);
00095
00096
unsigned int FormatWidth() const;
00097
unsigned int BytesPerSample() const;
00098
00099
bool operator ==(const
SoundAttributes &comp) const;
00100
bool operator !=(const
SoundAttributes &comp) const;
00101
00102 static
SoundAttributes GetFormat(Preset fmt);
00103 };
00104
00105 #endif
Generated on Wed Dec 13 23:38:46 2006 for CamStream by
1.3.7