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

[cute_sound.h v2.x] Support multiple contexts. #342

Closed ramirez7 closed 1 year ago

ramirez7 commented 1 year ago

From Discord:

@ramirez7:

I noticed the new cute_sound 2.0 and took a look. I noticed that the idea of distinct "contexts" isn't around anymore and cs_update (nee _mix) now operates globally.

I have one game where I use two different ctxs because I have audio files at different Hz (I downsampled some recorded audio to give it a "retro" feel). I was able to just use different ctxs and it all worked fine. But it looks like in 2.0 that's not an option? I guess the solution would be to figure out how to get my downsampled/lower Hz audio back to 44.1khz while preserving how it sounds.

@RandyGaul:

I can add in a function to support contexts again, it’s a trivial addition. Can you make a GitHub issue for this to track?

RandyGaul commented 1 year ago

Added! Thank you for your patience :)

https://github.com/RandyGaul/cute_headers/commit/db2e63cc26c31c5ba5347bde6300f74828dd9d32

ramirez7 commented 1 year ago

Thank you!