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

sound channels #33

Closed
Akuli opened this issue Jul 20, 2021 · 0 comments
Closed

sound channels #33

Akuli opened this issue Jul 20, 2021 · 0 comments

Comments

@Akuli
Copy link
Owner

Akuli commented Jul 20, 2021

/*
Make sure that we can play all the needed sounds at the same time, even
when smashing buttons. With 20 channels, I could barely smash buttons fast
enough to run out of channels, but I couldn't do that with 25 channels. The
default seems to be 16 channels.
*/
Mix_AllocateChannels(32);

But I can smash arrow keys really fast so that this gets printed:

src/sound.c:103: playing soon: assets/sounds/pop.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
src/sound.c:103: playing soon: assets/sounds/lemonsqueeze.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
src/sound.c:103: playing soon: assets/sounds/lemonsqueeze.wav
src/sound.c:103: playing soon: assets/sounds/pop.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
src/sound.c:103: playing soon: assets/sounds/pop.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
src/sound.c:103: playing soon: assets/sounds/boing.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
@Akuli Akuli closed this as completed in 91c4f52 Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant