28 static bool HasCodec(UInt_64 hashExt);
30 static bool HasCodec(
const Str_8& ext);
34 static const AudioCodec* GetCodec(UInt_64 hashExt);
64 operator const Byte*()
const;
68 void Release()
override;
70 UInt_64 GetSampleRate()
const;
74 UInt_8 GetByteDepth()
const;
76 UInt_8 GetBitDepth()
const;
78 UInt_8 GetChannels()
const;
80 UInt_64 GetFrameCount()
const;
82 UInt_64 GetSampleCount()
const;
84 UInt_8 GetFrameSize()
const;
86 UInt_64 GetSize()
const;
88 float GetLength()
const;
90 Byte* GetFrame(UInt_64 frameIndex)
const;
94 Array<Byte> FrameAsStereo(UInt_64 frameIndex)
const;
96 Array<Byte> FrameAsFive_One(UInt_64 frameIndex)
const;
98 Array<Byte> FrameAsSeven_One(UInt_64 frameIndex)
const;
100 SInt_8 SampleAsSInt_8(UInt_64 sampleIndex)
const;
102 SInt_16 SampleAsSInt_16(UInt_64 sampleIndex)
const;
104 float SampleAsFloat(UInt_64 sampleIndex)
const;
106 SInt_32 SampleAsSInt_32(UInt_64 sampleIndex)
const;
108 SInt_64 SampleAsSInt_64(UInt_64 sampleIndex)
const;
110 SInt_8 PeakAsSInt_8()
const;
114 float PeakAsFloat()
const;
118 SInt_64 PeakAsSInt_64()
const;
120 void SetPeak(UInt_64 size,
const Byte* newPeak);
122 const Byte* GetPeak()
const;
124 void ToDataType(
DataType newDataType);
128 void ToChannels(
UInt_8 newChannels);
132 bool Export(
const Str_8& filePath)
const;
135 void ToMono(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
137 void Mono_to_Stereo(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
139 void Five_One_to_Stereo(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
141 void Seven_One_to_Stereo(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
143 void Mono_to_Five_One(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
145 void Stereo_to_Five_One(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
147 void Seven_One_to_Five_One(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
149 void Mono_to_Seven_One(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
151 void Stereo_to_Seven_One(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
153 void Five_One_to_Seven_One(UInt_64 newFrameCount,
Byte* newData, UInt_64 frameOffset)
const;
156 void SInt_16_to_SInt_8(
Byte* newData,
Byte* newPeak)
const;
158 void Float_to_SInt_8(
Byte* newData,
Byte* newPeak)
const;
160 void SInt_32_to_SInt_8(
Byte* newData,
Byte* newPeak)
const;
162 void SInt_64_to_SInt_8(
Byte* newData,
Byte* newPeak)
const;
165 void SInt_8_to_SInt_16(
Byte* newData,
Byte* newPeak)
const;
167 void Float_to_SInt_16(
Byte* newData,
Byte* newPeak)
const;
169 void SInt_32_to_SInt_16(
Byte* newData,
Byte* newPeak)
const;
171 void SInt_64_to_SInt_16(
Byte* newData,
Byte* newPeak)
const;
174 void SInt_8_to_Float(
Byte* newData,
Byte* newPeak)
const;
176 void SInt_16_to_Float(
Byte* newData,
Byte* newPeak)
const;
178 void SInt_32_to_Float(
Byte* newData,
Byte* newPeak)
const;
180 void SInt_64_to_Float(
Byte* newData,
Byte* newPeak)
const;
183 void SInt_8_to_SInt_32(
Byte* newData,
Byte* newPeak)
const;
185 void SInt_16_to_SInt_32(
Byte* newData,
Byte* newPeak)
const;
187 void Float_to_SInt_32(
Byte* newData,
Byte* newPeak)
const;
189 void SInt_64_to_SInt_32(
Byte* newData,
Byte* newPeak)
const;
192 void SInt_8_to_SInt_64(
Byte* newData,
Byte* newPeak)
const;
194 void SInt_16_to_SInt_64(
Byte* newData,
Byte* newPeak)
const;
196 void Float_to_SInt_64(
Byte* newData,
Byte* newPeak)
const;
198 void SInt_32_to_SInt_64(
Byte* newData,
Byte* newPeak)
const;
Definition: AudioCodec.h:12
Definition: Resource.h:11
signed int SInt_32
Definition: Types.h:50
unsigned char UInt_8
Definition: Types.h:43
bool DecodeWAV(const ehs::AudioCodec *codec, ehs::Serializer< ehs::UInt_64 > &in, ehs::Audio *out)
Definition: Audio.cpp:1961
bool DecodeEHA(const ehs::AudioCodec *codec, ehs::Serializer< ehs::UInt_64 > &in, ehs::Audio *out)
Definition: Audio.cpp:1935
DataType
Definition: DataType.h:8
unsigned char Byte
Definition: Types.h:39
signed char SInt_8
Definition: Types.h:44
signed short SInt_16
Definition: Types.h:47
bool EncodeEHA(const ehs::AudioCodec *codec, ehs::Serializer< ehs::UInt_64 > &out, const ehs::Audio *in)
Definition: Audio.cpp:1913