Fix audio decoding.

This commit is contained in:
Dr. Chat
2015-06-02 00:42:26 -05:00
parent c780d5528d
commit 77e245dc51
2 changed files with 80 additions and 10 deletions

View File

@@ -46,6 +46,7 @@ struct XMAContextData {
// DWORD 0
uint32_t input_buffer_0_packet_count : 12; // XMASetInputBuffer0, number of
// 2KB packets. Max 4095 packets.
// These packets form a block.
uint32_t loop_count : 8; // +12bit, XMASetLoopData NumLoops
uint32_t input_buffer_0_valid : 1; // +20bit, XMAIsInputBuffer0Valid
uint32_t input_buffer_1_valid : 1; // +21bit, XMAIsInputBuffer1Valid
@@ -57,6 +58,7 @@ struct XMAContextData {
// DWORD 1
uint32_t input_buffer_1_packet_count : 12; // XMASetInputBuffer1, number of
// 2KB packets. Max 4095 packets.
// These packets form a block.
uint32_t loop_subframe_end : 2; // +12bit, XMASetLoopData
uint32_t unk_dword_1_a : 3; // ? might be loop_subframe_skip
uint32_t loop_subframe_skip : 3; // +17bit, XMASetLoopData might be
@@ -64,8 +66,8 @@ struct XMAContextData {
uint32_t subframe_decode_count : 4; // +20bit might be subframe_skip_count
uint32_t unk_dword_1_b : 3; // ? NumSubframesToSkip/NumChannels(?)
uint32_t sample_rate : 2; // +27bit enum of sample rates
uint32_t is_stereo : 1; // +29bit might be NumChannels
uint32_t unk_dword_1_c : 1; // ? part of NumChannels?
uint32_t is_stereo : 1; // +29bit
uint32_t unk_dword_1_c : 1; // +29bit
uint32_t output_buffer_valid : 1; // +31bit, XMAIsOutputBufferValid
// DWORD 2