Menu

#710 APU volume sliders bug

General
open
zeromus
5
2015-08-14
2015-08-14
Eugene
No

APU volume sliders works incorrect.
This error doesn't occur when vol=100%. But if you try to reduce volume, then:
1) On squares/noise slider work like threshhold filter, causing cut-off on low volumes (lower slider volume = stronger cut-off)
2) On triangle slider work like distortion, causing distort triangle timbre.

Here is test ROM i've made for show this bug.

1 Attachments

Discussion

  • Eugene

    Eugene - 2015-08-14

    test updated

     
  • feos

    feos - 2015-08-14

    Cutoff happens for low volume sounds at low channel level because we don't use floats (by design). I actually doubt anyone ever needs separate channel volumes, it's mostly just on/off and master volume.

     
  • zeromus

    zeromus - 2015-08-14

    It's worse than that. These sliders are just badly implemented. it seems the "mixed" output consists effectively of 3 channel groups packed in 32bits (in WaveHi) organized as (low 16 bits, next 8, next 8) which are then transformed normally by a loop at line 1080 of sound.cpp which applies a lookup table for the volume scaling of each group. The sliders move the output around through the 32bits and mess up other groups.

    Might could fix it by making WaveHi an array with an extra [6] and emit each channel where it belongs, then mix it down properly at line 1080. Since there are like 3 sound quality levels you may have to do it 2 or 3 times. Not really an easy fix, but it could be possible.

     

Log in to post a comment.