From bf88dd74e3f02e2047fa50fdb0692e47a935dffd Mon Sep 17 00:00:00 2001 From: Nicola Salmoria Date: Tue, 11 Mar 2008 08:28:47 +0000 Subject: [PATCH] fix loading mixer settings when the driver default value is calculated. Cannot use == to compare float with the loaded value in this case. --- src/emu/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }