cute_headers icon indicating copy to clipboard operation
cute_headers copied to clipboard

Dynamically set panning for an individual playing sound

Open empyreanx opened this issue 1 year ago • 2 comments

Implement functions such as:

  • float cs_sound_get_panning(cs_playing_sound_t sound)
  • void cs_sound_set_panning(cs_playing_sound_t sound, float pan_0_to_1);

empyreanx avatar Apr 21 '23 17:04 empyreanx

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 avatar Jun 08 '23 02:06 RandyGaul

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!

RandyGaul avatar Jun 08 '23 02:06 RandyGaul