RandyGaul / cute_headers

Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
4.21k stars 264 forks source link

Dynamically set panning for an individual playing sound #348

Open empyreanx opened 1 year ago

empyreanx commented 1 year ago

Implement functions such as:

RandyGaul commented 1 year ago

Yeah we can definitely add this -- it should be pretty easy. Copying from another similar feature would be good:

bool cs_sound_get_is_looped(cs_playing_sound_t sound)
{
    cs_sound_inst_t* inst = s_get_inst(sound);
    if (!inst) return false;
    return inst->looped;
}

void cs_sound_set_is_looped(cs_playing_sound_t sound, bool true_for_looped)
{
    cs_sound_inst_t* inst = s_get_inst(sound);
    if (!inst) return;
    inst->looped = true_for_looped;
}
RandyGaul commented 1 year ago

I will eventually get to implementing this (mostly just a copy + paste), but it's a bit low priority. If anyone wants this done now please do consider adding a PR!