Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically set panning for an individual playing sound #348

Closed
empyreanx opened this issue Apr 21, 2023 · 4 comments
Closed

Dynamically set panning for an individual playing sound #348

empyreanx opened this issue Apr 21, 2023 · 4 comments

Comments

@empyreanx
Copy link
Contributor

empyreanx commented Apr 21, 2023

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);
@RandyGaul
Copy link
Owner

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
Copy link
Owner

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!

@omicronrex
Copy link
Contributor

Looks like this is already implemented currently? There are getters and setters for setting pan on instances in the current codebase.

@RandyGaul
Copy link
Owner

Thanks! We can probably just close this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants