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
1 changed files with 1 additions and 1 deletions

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) {