diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2017-06-20 21:59:33 +0100 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2017-06-20 22:00:27 +0100 |
| commit | 578ae3c8a1a6b98ffa9cb2397961829ad4f9bf5c (patch) | |
| tree | e1d8c504c8c4c157a31c2fabd6be5a1f503dcf4b /Source/Core | |
| parent | a46430851d9ca75535a06d9fdda4f68e7d96e283 (diff) | |
DSPHLE: the light protocol has no sine table
The sine table is only used for Dolby mixing which the light protocol
doesn't support.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp index eef76401cb..92f0e66ee3 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp @@ -483,10 +483,15 @@ void ZeldaUCode::RunPendingCommands() const_patterns[i] = Common::swap16(data_ptr[0x100 + i]); m_renderer.SetConstPatterns(std::move(const_patterns)); - std::array<s16, 0x80> sine_table; - for (size_t i = 0; i < 0x80; ++i) - sine_table[i] = Common::swap16(data_ptr[0x200 + i]); - m_renderer.SetSineTable(std::move(sine_table)); + // The sine table is only used for Dolby mixing + // which the light protocol doesn't support. + if ((m_flags & LIGHT_PROTOCOL) == 0) + { + std::array<s16, 0x80> sine_table; + for (size_t i = 0; i < 0x80; ++i) + sine_table[i] = Common::swap16(data_ptr[0x200 + i]); + m_renderer.SetSineTable(std::move(sine_table)); + } u16* afc_coeffs_ptr = (u16*)HLEMemory_Get_Pointer(Read32()); std::array<s16, 0x20> afc_coeffs; |
