nba-emu / NanoBoyAdvance

A cycle-accurate Nintendo Game Boy Advance emulator.
GNU General Public License v3.0
955 stars 53 forks source link

DMG audio: Envelop step time lasts quite longer than it should #336

Closed copyrat90 closed 7 months ago

copyrat90 commented 7 months ago

Issue

DMG audio: Envelop step time lasts quite longer than it should. This is especially noticable on the shorter envelop.

Test code & ROM

env_len_test2.zip

Playback

Hardware

https://github.com/nba-emu/NanoBoyAdvance/assets/34793045/b59486ae-ce85-460a-8bbe-384d433b2e42

NanoBoyAdvance

https://github.com/nba-emu/NanoBoyAdvance/assets/34793045/9bea4e0d-78fa-462f-a54c-e8cf0e98638b

Comparison Images

image image

fleroviux commented 7 months ago

I accidentally introduced a regression to envelope speed when I fixed the mid-note envelope divider change yesterday night. Thanks for catching this so quickly! I just pushed a fix that should fix this while also not breaking the other tests. Can you confirm that this is the case?

copyrat90 commented 7 months ago

Yeah, looks like it's fixed now, and it sounds OK for the previous 3 tests.

image

Thanks for the quick fix!