INNER CODE UNIT · C
layer
tek256/astera · src/audio.c:285
a_layer* layer = &ctx->layers[i];
if (layer->id) {
if (is_sfx && layer->sfx_count > 0) {
for (uint32_t j = 0; j < layer->sfx_count; ++j) {
if (layer->sfx[j] == id) {
return layer->gain;
}
}
} else if (!is_sfx && layer->song_capacity > 0) {
for (uint32_t j = 0; j < layer->song_count; ++j) {
if (layer->songs[j] == id) {
return layer->gain;
}
}
} else {
continue;
}