complain if modulator source unknown

This commit is contained in:
Tom M 2017-08-24 21:47:17 +02:00 committed by GitHub
parent b7673c0e25
commit 5cc1d9f659

View file

@ -198,6 +198,7 @@ fluid_mod_get_source_value(const unsigned char mod_src,
val = fluid_channel_get_pitch_wheel_sensitivity (chan); val = fluid_channel_get_pitch_wheel_sensitivity (chan);
break; break;
default: default:
FLUID_LOG(FLUID_ERR, "Unknown modulator source '%d', disabling modulator.", mod_src);
val = 0.0; val = 0.0;
} }
} }
@ -278,7 +279,7 @@ fluid_mod_transform_source_value(fluid_real_t val, unsigned char mod_flags, cons
val = (val_norm >= 0.5f)? -1.0f : 1.0f; val = (val_norm >= 0.5f)? -1.0f : 1.0f;
break; break;
default: default:
FLUID_LOG(FLUID_ERR, "Unknown modulator type %d, disabling modulator.", mod_flags); FLUID_LOG(FLUID_ERR, "Unknown modulator type '%d', disabling modulator.", mod_flags);
val = 0.0f; val = 0.0f;
break; break;
} }