Skip to content

Commit 5cd0436

Browse files
committed
remove 'if float' pre-processor checks
1 parent e9efc2f commit 5cd0436

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

shared-bindings/audiocore/MixerVoice.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ MP_DEFINE_CONST_FUN_OBJ_KW(audioio_mixervoice_stop_obj, 1, audioio_mixervoice_ob
134134
//| The volume level of a voice, as a floating point number between 0 and 1.
135135
//|
136136
STATIC mp_obj_t audioio_mixervoice_obj_get_level(mp_obj_t self_in) {
137-
138-
#if !MICROPY_PY_BUILTINS_FLOAT
139-
#error "floating point not supported"
140-
#endif
141-
142137
return mp_obj_new_float(common_hal_audioio_mixervoice_get_level(self_in));
143138
}
144139
MP_DEFINE_CONST_FUN_OBJ_1(audioio_mixervoice_get_level_obj, audioio_mixervoice_obj_get_level);
@@ -152,11 +147,7 @@ STATIC mp_obj_t audioio_mixervoice_obj_set_level(size_t n_args, const mp_obj_t *
152147
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
153148
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
154149

155-
#if MICROPY_PY_BUILTINS_FLOAT
156150
float level = mp_obj_get_float(args[ARG_level].u_obj);
157-
#else
158-
#error "floating point not supported"
159-
#endif
160151

161152
if (level > 1 || level < 0) {
162153
mp_raise_ValueError(translate("level must be between 0 and 1"));

0 commit comments

Comments
 (0)