[APU] Skip audio header when there is no valid input
Thanks Cancerous1/Randprint for initial reseach in this topic
This commit is contained in:
parent
d6660ac391
commit
f40607041b
|
@ -301,7 +301,9 @@ void XmaContext::Decode(XMA_CONTEXT_DATA* data) {
|
|||
|
||||
// No available data.
|
||||
if (!data->input_buffer_0_valid && !data->input_buffer_1_valid) {
|
||||
data->output_buffer_valid = 0;
|
||||
// 4156081D checks specifically for offset 0x20 when both input buffers
|
||||
// are invalid.
|
||||
data->input_buffer_read_offset = kBitsPerHeader;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ class XmaContext {
|
|||
public:
|
||||
static const uint32_t kBytesPerPacket = 2048;
|
||||
static const uint32_t kBitsPerPacket = kBytesPerPacket * 8;
|
||||
static const uint32_t kBitsPerHeader = 33;
|
||||
static const uint32_t kBitsPerHeader = 32;
|
||||
|
||||
static const uint32_t kBytesPerSample = 2;
|
||||
static const uint32_t kSamplesPerFrame = 512;
|
||||
|
|
Loading…
Reference in New Issue