forked from alexfreud/winamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ALACMP4Decoder.h
43 lines (41 loc) · 1.19 KB
/
ALACMP4Decoder.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
/* copyright 2006 Ben Allison */
#ifndef NULLSOFT_ALAC_DECODER_H
#define NULLSOFT_ALAC_DECODER_H
#include "alac/ALACDecoder.h"
#include "../Plugins/Input/in_mp4/mpeg4audio.h"
#include "decomp.h"
class ALACMP4Decoder : public MP4AudioDecoder
{
public:
ALACMP4Decoder()
: mpAlacDecoder(0),
channels(0),
bps(0),
output_bits(0),
use_rg(0),
rg(0.0)
{
}
int OpenMP4(MP4FileHandle mp4_file, MP4TrackId mp4_track, size_t output_bits, size_t maxChannels, bool useFloat);
int GetCurrentBitrate(unsigned int *bitrate);
int AudioSpecificConfiguration(void *buffer, size_t buffer_size); // reads ASC block from mp4 file
void Flush();
void Close();
int GetOutputProperties(unsigned int *sampleRate, unsigned int *channels, unsigned int *bitsPerSample);
int DecodeSample(void *inputBuffer, size_t inputBufferBytes, void *outputBuffer, size_t *outputBufferBytes);
int OutputFrameSize(size_t *frameSize);
const char *GetCodecInfoString();
int CanHandleCodec(const char *codecName);
int SetGain(float gain);
unsigned char setinfo_sample_size = 0x10;
private:
ALACDecoder *mpAlacDecoder;
int channels;
int bps;
int output_bits;
bool use_rg;
float rg;
protected:
RECVS_DISPATCH;
};
#endif