fix MixerVoice.get_level; now returns a float between 0-1.
This commit is contained in:
parent
d02d474cac
commit
965f2bf799
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue