summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-09-10 15:53:47 -0700
committerYamaArashi <shadow962@live.com>2016-09-10 15:53:47 -0700
commit744ac256d688d5f45f05e493f94259f554d823b3 (patch)
treea66f2921c54403e95a79ac11b2b24da8152e1dd9
parent9cbf1aae195248d010bda8dabf7f72e1ffb58bf4 (diff)
delta encoding table
-rw-r--r--asm/m4a_1.s2
-rw-r--r--src/m4a_tables.c35
2 files changed, 19 insertions, 18 deletions
diff --git a/asm/m4a_1.s b/asm/m4a_1.s
index 2b548cacc..9e1a34f84 100644
--- a/asm/m4a_1.s
+++ b/asm/m4a_1.s
@@ -679,7 +679,7 @@ sub_81DD520:
add r2, r2, r1
add r2, r2, 0x10
ldr r5, =0x030007b8
- ldr r6, =gUnknown_0842F9F4
+ ldr r6, =gDeltaEncodingTable
mov r7, 0x40
ldrb lr, [r2], 1
strb lr, [r5], 1
diff --git a/src/m4a_tables.c b/src/m4a_tables.c
index f557fb073..c673f265c 100644
--- a/src/m4a_tables.c
+++ b/src/m4a_tables.c
@@ -43,24 +43,25 @@ void * const gMPlayJumpTableTemplate[] =
SoundMainBTM,
};
-const u8 gUnknown_0842F9F4[] =
+// This is a table of deltas between sample values in compressed PCM data.
+const s8 gDeltaEncodingTable[] =
{
- 0,
- 1,
- 4,
- 9,
- 16,
- 25,
- 36,
- 49,
- 192,
- 207,
- 220,
- 231,
- 240,
- 247,
- 252,
- 255,
+ 0,
+ 1,
+ 4,
+ 9,
+ 16,
+ 25,
+ 36,
+ 49,
+ -64,
+ -49,
+ -36,
+ -25,
+ -16,
+ -9,
+ -4,
+ -1,
};
const u8 gScaleTable[] =