1
0
Fork 0

audio_core: hle: mf: rename functions

This commit is contained in:
liushuyu 2019-01-28 21:20:46 -07:00 committed by B3N30
parent ea8a1f8754
commit 2c40ef2a90
3 changed files with 6 additions and 6 deletions

View File

@ -17,6 +17,6 @@ struct ADTSData {
u32 samplerate;
};
u32 parse_adts(char* buffer, struct ADTSData* out);
u32 ParseADTS(char* buffer, struct ADTSData* out);
// last two bytes of MF AAC decoder user data
u16 mf_get_aac_tag(struct ADTSData input);
u16 MFGetAACTag(struct ADTSData input);

View File

@ -7,7 +7,7 @@ constexpr std::array<u32, 16> freq_table = {96000, 88200, 64000, 48000, 44100, 3
16000, 12000, 11025, 8000, 7350, 0, 0, 0};
constexpr std::array<u8, 8> channel_table = {0, 1, 2, 3, 4, 5, 6, 8};
u32 parse_adts(char* buffer, struct ADTSData* out) {
u32 ParseADTS(char* buffer, struct ADTSData* out) {
u32 tmp = 0;
// sync word 0xfff
@ -40,7 +40,7 @@ u32 parse_adts(char* buffer, struct ADTSData* out) {
}
// last two bytes of MF AAC decoder user data
u16 mf_get_aac_tag(struct ADTSData input) {
u16 MFGetAACTag(struct ADTSData input) {
u16 tag = 0;
tag |= input.profile << 11;

View File

@ -214,12 +214,12 @@ int DetectMediaType(char* buffer, size_t len, ADTSData* output, char** aac_tag)
UINT8 aac_tmp[] = {0x01, 0x00, 0xfe, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0x00, 0x00};
uint16_t tag = 0;
uint32_t result = parse_adts(buffer, &tmp);
uint32_t result = ParseADTS(buffer, &tmp);
if (result == 0) {
return -1;
}
tag = mf_get_aac_tag(tmp);
tag = MFGetAACTag(tmp);
aac_tmp[12] |= (tag & 0xff00) >> 8;
aac_tmp[13] |= (tag & 0x00ff);
memcpy(*aac_tag, aac_tmp, 14);