forked from nu774/qaac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAudioConverterX.h
54 lines (50 loc) · 2.06 KB
/
AudioConverterX.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
46
47
48
49
50
51
52
53
54
#ifndef AudioConverterX_H
#define AudioConverterX_H
#include <stdint.h>
#include <memory>
#include <string>
#include <vector>
#include "CoreAudio/AudioConverter.h"
class AudioConverterX {
std::shared_ptr<OpaqueAudioConverter> m_converter;
public:
AudioConverterX() {}
virtual ~AudioConverterX() {}
AudioConverterX(AudioConverterRef converter, bool takeOwn)
{
attach(converter, takeOwn);
}
AudioConverterX(const AudioStreamBasicDescription &iasbd,
const AudioStreamBasicDescription &oasbd);
operator AudioConverterRef() { return m_converter.get(); }
void attach(AudioConverterRef converter, bool takeOwn);
// properties
UInt32 getSampleRateConverterComplexity();
void setSampleRateConverterComplexity(UInt32 complexity);
UInt32 getSampleRateConverterQuality();
void setSampleRateConverterQuality(UInt32 quality);
UInt32 getPrimeMethod();
void setPrimeMethod(UInt32 value);
AudioConverterPrimeInfo getPrimeInfo();
void setPrimeInfo(const AudioConverterPrimeInfo &info);
virtual std::vector<uint8_t> getCompressionMagicCookie();
void setDecompressionMagicCookie(const std::vector<uint8_t> &cookie);
UInt32 getEncodeBitRate();
void setEncodeBitRate(UInt32 value);
virtual std::shared_ptr<AudioChannelLayout> getInputChannelLayout();
virtual void setInputChannelLayout(const AudioChannelLayout &value);
virtual std::shared_ptr<AudioChannelLayout> getOutputChannelLayout();
virtual void setOutputChannelLayout(const AudioChannelLayout &value);
std::vector<AudioValueRange> getApplicableEncodeBitRates();
std::vector<AudioValueRange> getApplicableEncodeSampleRates();
AudioStreamBasicDescription getInputStreamDescription();
AudioStreamBasicDescription getOutputStreamDescription();
UInt32 getMaximumOutputPacketSize();
UInt32 getBitRateControlMode();
void setBitRateControlMode(UInt32 value);
UInt32 getSoundQualityForVBR();
void setSoundQualityForVBR(UInt32 value);
UInt32 getCodecQuality();
void setCodecQuality(UInt32 value);
};
#endif