2018-11-15 14:11:45 -05:00
|
|
|
/*
|
|
|
|
* MixerVoice.c
|
|
|
|
*
|
|
|
|
* Created on: Nov 15, 2018
|
|
|
|
* Author: dean
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "shared-bindings/audioio/Mixer.h"
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "py/runtime.h"
|
|
|
|
#include "shared-module/audioio/__init__.h"
|
|
|
|
#include "shared-module/audioio/RawSample.h"
|
|
|
|
|
2018-11-15 15:04:11 -05:00
|
|
|
void common_hal_audioio_mixervoice_set_gain(audioio_mixervoice_obj_t* self, float gain) {
|
2018-11-15 14:11:45 -05:00
|
|
|
self->gain = gain * ((1 << 15)-1);
|
|
|
|
}
|