fix MixerVoice.get_level; now returns a float between 0-1.

This commit is contained in:
sommersoft 2019-08-24 09:24:54 -05:00
parent d02d474cac
commit 965f2bf799

View File

@ -42,7 +42,7 @@ void common_hal_audioio_mixervoice_set_parent(audioio_mixervoice_obj_t* self, au
}
float common_hal_audioio_mixervoice_get_level(audioio_mixervoice_obj_t* self) {
return self->level;
return ((float) self->level / ((1 << 15) - 1));
}
void common_hal_audioio_mixervoice_set_level(audioio_mixervoice_obj_t* self, float level) {