audio_codec_alac.h
来自「AMLOGIC DPF source code」· C头文件 代码 · 共 78 行
H
78 行
#ifndef _AUDIO_CODEC_ALAC_H
#define _AUDIO_CODEC_ALAC_H
#include "ioapi.h"
#define DECLARE_DEVICE_DRIVER_INIT(name) \
avfs_device_driver audio_device_##name##_init(avfs_device_major_number major, avfs_device_minor_number minor, void *arg)
#define DECLARE_DEVICE_DRIVER_OPEN(name) \
avfs_device_driver audio_device_##name##_open(avfs_device_major_number major, avfs_device_minor_number minor, void *arg)
#define DECLARE_DEVICE_DRIVER_CLOSE(name) \
avfs_device_driver audio_device_##name##_close(avfs_device_major_number major, avfs_device_minor_number minor, void *arg)
#define DECLARE_DEVICE_DRIVER_IOCTL(name) \
avfs_device_driver audio_device_##name##_ioctl(avfs_device_major_number major, avfs_device_minor_number minor, void *arg)
#define DECLARE_DEVICE_DRIVER_READ(name) \
avfs_device_driver audio_device_##name##_read(avfs_device_major_number major, avfs_device_minor_number minor, void *arg)
#define DECLARE_DEVICE_DRIVER_WRITE(name) \
avfs_device_driver audio_device_##name##_write(avfs_device_major_number major, avfs_device_minor_number minor, void *arg)
DECLARE_DEVICE_DRIVER_INIT(alacdec);
DECLARE_DEVICE_DRIVER_OPEN(alacdec);
DECLARE_DEVICE_DRIVER_CLOSE(alacdec);
DECLARE_DEVICE_DRIVER_READ(alacdec);
DECLARE_DEVICE_DRIVER_WRITE(alacdec);
DECLARE_DEVICE_DRIVER_IOCTL(alacdec);
#define DEVICE_TABLE_AUDIO_ALACDEC \
{ \
audio_device_alacdec_init, \
audio_device_alacdec_open, \
audio_device_alacdec_close, \
audio_device_alacdec_read, \
audio_device_alacdec_write, \
audio_device_alacdec_ioctl, \
}
typedef struct {
int32_t samplesize; int32_t numchannels; int32_t bytespersample; /* buffers */ int32_t *predicterror_buffer_a; int32_t *predicterror_buffer_b; int32_t *outputsamples_buffer_a; int32_t *outputsamples_buffer_b;
void *output_pcm_buffer; /* stuff from setinfo */ uint32_t setinfo_max_samples_per_frame; /* 0x1000 = 4096 */ /* max samples per frame? */ uint8_t setinfo_7a; /* 0x00 */ uint8_t setinfo_sample_size; /* 0x10 */ uint8_t setinfo_rice_historymult; /* 0x28 */ uint8_t setinfo_rice_initialhistory; /* 0x0a */ uint8_t setinfo_rice_kmodifier; /* 0x0e */ uint8_t setinfo_7f; /* 0x02 */ uint16_t setinfo_80; /* 0x00ff */ uint32_t setinfo_82; /* 0x000020e7 */ uint32_t setinfo_86; /* 0x00069fe4 */ uint32_t setinfo_8a_rate; /* 0x0000ac44 */ /* end setinfo stuff */
uint8_t host_bigendian;
} _audio_codec_config_alacdec_t;
#define MAX_PCM_SAMPLE_PER_FRAME 0x1000
#if defined(AML_ATHENA)
#define MPEG_DOMAIN_BASE 0x1c00000
#else
#define MPEG_DOMAIN_BASE 0x3c00000
#endif
void decode_alac_frame(_audio_codec_config_alacdec_t *alac, int *outputsize);
void reset_alac_framesize(void);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?