-
Notifications
You must be signed in to change notification settings - Fork 42
/
AudioConverterXX.h
45 lines (39 loc) · 1.46 KB
/
AudioConverterXX.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef AudioConverterXX_H
#define AudioConverterXX_H
#include "AudioConverterX.h"
class AudioConverterXX : public AudioConverterX {
private:
typedef AudioConverterX BaseT;
UInt32 m_InputChannelLayoutTag;
UInt32 m_OutputChannelLayoutTag;
public:
AudioConverterXX()
: m_InputChannelLayoutTag(0),
m_OutputChannelLayoutTag(0)
{}
AudioConverterXX(AudioConverterRef converter, bool takeOwn)
: BaseT(converter, takeOwn),
m_InputChannelLayoutTag(0),
m_OutputChannelLayoutTag(0)
{}
AudioConverterXX(const AudioStreamBasicDescription &iasbd,
const AudioStreamBasicDescription &oasbd)
: BaseT(iasbd, oasbd),
m_InputChannelLayoutTag(0),
m_OutputChannelLayoutTag(0)
{}
// overrides to support AAC 7.1ch rear encoding
virtual std::vector<uint8_t> getCompressionMagicCookie();
virtual std::shared_ptr<AudioChannelLayout> getInputChannelLayout();
virtual void setInputChannelLayout(const AudioChannelLayout &value);
virtual std::shared_ptr<AudioChannelLayout> getOutputChannelLayout();
virtual void setOutputChannelLayout(const AudioChannelLayout &value);
//utilities
bool isOutputAAC();
double getClosestAvailableBitRate(double value);
void configAACCodec(UInt32 bitrateControlMode, double bitrate,
UInt32 codecQuality);
std::string getConfigAsString();
std::string getEncodingParamsTag();
};
#endif