diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2013-03-30 14:39:59 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2013-03-30 14:39:59 +0100 |
| commit | 04f9c6793bea3b5bd7a57e21074e69ceca79e31d (patch) | |
| tree | 72343d5f518ebaf8cf19f3d711526d1532a7e2e9 /Source/Core | |
| parent | a813f9e13c697bc866ad7f0402dfbfeb3e4c0fee (diff) | |
Fix the argument to the samples reading callback in voice processing - should fix issues with wiimote audio, untested
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h index 87c0d51f46..f36f5760e7 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h @@ -291,6 +291,8 @@ u32 ResampleAudio(function<s16(u32)> input_callback, s16* output, u32 count, s16* last_samples, u32 curr_pos, u32 ratio, int srctype, const s16* coeffs) { + int read_samples_count = 0; + // If DSP DROM coefficients are available, support polyphase resampling. if (coeffs && srctype == SRCTYPE_POLYPHASE) { @@ -307,7 +309,7 @@ u32 ResampleAudio(function<s16(u32)> input_callback, s16* output, u32 count, curr_pos += ratio; while (curr_pos >= 0x10000) { - temp[idx++ & 3] = input_callback(curr_pos >> 16); + temp[idx++ & 3] = input_callback(read_samples_count++); curr_pos -= 0x10000; } @@ -350,7 +352,7 @@ u32 ResampleAudio(function<s16(u32)> input_callback, s16* output, u32 count, // circular buffer. while (curr_pos >= 0x10000) { - temp[idx++ & 3] = input_callback(curr_pos >> 16); + temp[idx++ & 3] = input_callback(read_samples_count++); curr_pos -= 0x10000; } |
