Skip to content

Commit 82d406c

Browse files
committed
Provide amy.set_render_load_threshold().
1 parent 77f9961 commit 82d406c

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

amy

Submodule amy updated 111 files

tulip/shared/modtulip.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ STATIC mp_obj_t tulip_amy_render_load(size_t n_args, const mp_obj_t *args) {
4444
return mp_obj_new_float(amy_get_render_load());
4545
}
4646
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(tulip_amy_render_load_obj, 0, 0, tulip_amy_render_load);
47+
48+
STATIC mp_obj_t tulip_amy_set_render_load_threshold(size_t n_args, const mp_obj_t *args) {
49+
// MicroPython version of amy/src/pyamy.c:set_render_load_threshold
50+
amy_set_render_load_threshold(mp_obj_get_float(args[0]));
51+
return mp_const_none;
52+
}
53+
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(tulip_amy_set_render_load_threshold_obj, 1, 1, tulip_amy_set_render_load_threshold);
54+
4755
#endif
4856

4957
STATIC mp_obj_t tulip_ticks_ms(size_t n_args, const mp_obj_t *args) {
@@ -1728,6 +1736,7 @@ STATIC const mp_rom_map_elem_t tulip_module_globals_table[] = {
17281736
{ MP_ROM_QSTR(MP_QSTR_amy_send_sysex), MP_ROM_PTR(&tulip_amy_send_sysex_obj) },
17291737
{ MP_ROM_QSTR(MP_QSTR_amy_ticks_ms), MP_ROM_PTR(&tulip_amy_ticks_ms_obj) },
17301738
{ MP_ROM_QSTR(MP_QSTR_amy_render_load), MP_ROM_PTR(&tulip_amy_render_load_obj) },
1739+
{ MP_ROM_QSTR(MP_QSTR_amy_set_render_load_threshold), MP_ROM_PTR(&tulip_amy_set_render_load_threshold_obj) },
17311740
{ MP_ROM_QSTR(MP_QSTR_pcm_load_file), MP_ROM_PTR(&tulip_pcm_load_file_obj) },
17321741
#endif
17331742

0 commit comments

Comments
 (0)