diff options
author | Nicola Salmoria <nicola@mamedev.org> | 2008-03-11 08:28:47 +0000 |
---|---|---|
committer | Nicola Salmoria <nicola@mamedev.org> | 2008-03-11 08:28:47 +0000 |
commit | bf88dd74e3f02e2047fa50fdb0692e47a935dffd (patch) | |
tree | 44795d46b4dc58bf6f4458309bcd1c37464444a8 | |
parent | 542b48970609fd378973bb20c47de527919b3997 (diff) |
fix loading mixer settings when the driver default value is calculated. Cannot use == to compare float with the loaded value in this case.
-rw-r--r-- | src/emu/sound.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/sound.c b/src/emu/sound.c index adf82d3500c..3f61ac1b913 100644 --- a/src/emu/sound.c +++ b/src/emu/sound.c @@ -583,7 +583,7 @@ static void sound_load(int config_type, xml_data_node *parentnode) { float defvol = xml_get_attribute_float(channelnode, "defvol", -1000.0); float newvol = xml_get_attribute_float(channelnode, "newvol", -1000.0); - if (defvol == sound_get_default_gain(mixernum) && newvol != -1000.0) + if (fabs(defvol - sound_get_default_gain(mixernum)) < 1e-6 && newvol != -1000.0) sound_set_user_gain(mixernum, newvol); } } |