Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
03616 Interface Minor Always Dec 29, 2009, 09:28 Jun 22, 2017, 15:22
Tester emuman View Status Public Platform MAME (Official Binary)
Assigned To Resolution Fixed OS Windows XP (32-bit)
Status [?] Resolved Driver
Version 0.135u4 Fixed in Version Build Normal
Summary 03616: Slider Controls does not reset and save float values correctly
Description run captcomm for example. in Slider Controls, adjust speaker YM2151 Ch0 volumn to 0.31, quit MAME. then start MAME again, try to set it back to default value, i.e., 0.35.

you will have something like this in cfg\captcomm.cfg, which actually should be removed

        <mixer>
            <channel index="0" defvol="0.350000" newvol="0.350000" />
        </mixer>
Steps To Reproduce
Additional Information to fix it, apply the patch to emu/sound.c

  float defvol = sound_get_default_gain(machine, mixernum);
  float newvol = sound_get_user_gain(machine, mixernum);
 
- if (defvol != newvol)
+ if (floor((defvol - newvol) * 1000.0f + 0.5f) != 0)
  {
  xml_data_node *channelnode = xml_add_child(parentnode, "channel", NULL);
  if (channelnode != NULL)
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationsihp linked to this issue.
Notes
3
User avatar
No.05343
Tafoid
Administrator
Dec 29, 2009, 16:11
I'm not sure what the problem is. The default is forever the MAME default, not the value it was the last time you adjusted the item.
I'll leave this open for other Devs to comment. Hopefully Aaron can clear up behavior.
User avatar
No.05345
emuman
Tester
Dec 30, 2009, 00:57
no problem for the default. the problem is when defvol and newvol are identical it is unnecessary to save them to an xml node.
User avatar
No.13924
Fujix
Administrator
Jun 22, 2017, 15:22
Confirmed fix.