Atrac3plus
From WikiTemp, the GBAtemp wiki
Revision as of 19:36, 3 August 2015 by Jurassicplayer (talk | contribs)
AT3+ Header Format
(*) Postulation
(**) Starting from the end of the offset.
Offset | Name | Bits | Type | Semantics |
---|---|---|---|---|
0x0 | magic | 32 | ASCII | "RIFF" magic |
0x4 | at3_size | 32 | le int | Total size of AT3 data** |
0x8 | magic | 32 | ASCII | "WAVE" magic |
0xC | magic | 32 | ASCII | "fmt " magic |
0x10 | wave_size | 32 | le int | Total size of wave format data** |
0x14 | format_type | 16 | le int | Type of format starting from FFFF going down (PCM is normally 1, so removing 1 from FFFF le = FEFF*) |
0x16 | channel_num | 16 | le int | Number of channels - 2 byte interger |
0x18 | sample_rate | 32 | le int | Sample Rate aka the number of samples per second. Common value is 44100 |
0x1C | unk1_bitrate | 32 | le int | It is bitrate specific.* |
0x20 | frame_size | 32 | le int | The frame size of the corresponding bitrate. (bits per channel * number of channels) |
0x24 | unk1 | 216 | le int | Unknown static hex (22 00 00 08 03 00 00 00 BF AA 23 E9 58 CB 71 44 A1 19 FF FA 01 E4 CE 62 01 00 28)* |
0x3F | unk3_bitrate | 8 | le int | It is bitrate specific.* |
0x40 | padding | 64 | - | 00 padding - 8 bytes |
0x48 | magic | 32 | ASCII | "fact" magic |
0x4C | fact_size | 32 | le int | Total size of fact data** |
0x50 | duration_ts | 32 | le int | The duration of the song in seconds accurate to microseconds multiplied by the sample rate (Song_duration(sec)*Sample_rate --> ex. 22.854014(s) * 44100 = duration_ts) |
0x54 | unk_fact_01 | 32 | le int | It is song specific (sample size?)* |
0x58 | magic | 32 | ASCII | "smpl" magic |
0x5C | smpl_size | 32 | le int | Total size of smpl data** |
0x60 | unk_smpl_01 | 352 | le int | Unknown static hex (00 00 00 00 00 00 00 00 94 58 00 00 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 18 00 00 00 00 00 00 00 00 00 00 00)* |
0x8C | unk_smpl_02 | 32 | le int | Same as unk_fact_01 |
0x90 | unk_smpl_03 | 32 | le int | It is song specific and seems to follow a pattern of 8FXEXX where X represents positional equivalents from duration_ts. (ex. duration_ts = 2C35AD00 / unk_smpl_03 = 8F3EAD00)* |
0x94 | padding | 64 | - | 00 padding - 8 bytes |
0x9C | magic | 32 | ASCII | "data" magic |
0xA0 | data_size | 32 | le int | Total size of data** |
0xA4 | music_data | - | - | Presumably music data?* |
AT3 Bitrate Values (Information gathered only by experimenting on an AT3 with 2 Channels and a Sampling rate of 44100Hz)
Bit-rate | 4 bytes le-int@0x1C | frame_size | 1 byte int@0x3F | Special Note |
---|---|---|---|---|
48 kbps | 0x0000178D | 0x00000118 (280) | 0x22 | None |
64 kbps | 0x00001FA0 | 0x00000178 (376) | 0x2E | None |
66 kbps | 0x0000204D | 0x000000C0 | 0x?? | Has a Special Header (Invalid AT3+ bitrate) |
96 kbps | 0x00002F1B | 0x00000230 (560) | 0x45 | None |
105 kbps | 0x00003324 | 0x00000130 | 0x?? | Has a Special Header (Invalid AT3+ bitrate) |
128 kbps | 0x0000953E | 0x000002E8 (744) | 0x5C | None |
132 kbps | 0x0000409A | 0x00000180 | 0x?? | Has a Special Header (Invalid AT3+ bitrate) |
160 kbps | 0x00004EBB | 0x000003A8 (936) | 0x74 | None |
192 kbps | 0x00005E35 | 0x00000460 (1120) | 0x8B | None |
256 kbps | 0x00007D29 | 0x000005D0 (1488) | 0xB9 | None |
320 kbps | 0x00009CCA | 0x00000748 (1864) | 0xE8 | None |
352 kbps | 0x0000AC44 | 0x00000800 (2048) | 0xFF | None |