INNER CODE UNIT · C
_a_clamp
tek256/astera · src/audio.c:173
static inline float _a_clamp(float value, float min, float max, float def) {
return (value == -1.f) ? def
: (value < min) ? min
: (value > max) ? max
: value;
}
static inline void a_vec3_dup(a_vec3 dst, a_vec3 src) {
dst[0] = src[0];
dst[1] = src[1];
dst[2] = src[2];
}
static a_layer* _a_get_layer(a_ctx* ctx, uint16_t layer_id) {
return (ctx->layers[layer_id - 1].id == 0) ? 0 : &ctx->layers[layer_id - 1];
}
static uint8_t _a_layer_add(a_layer* layer, uint32_t id, uint8_t is_sfx) {