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

snd_sfx_play doesn't work correctly with volume 255 #6

Open
gauauu opened this issue May 10, 2019 · 0 comments
Open

snd_sfx_play doesn't work correctly with volume 255 #6

gauauu opened this issue May 10, 2019 · 0 comments

Comments

@gauauu
Copy link

gauauu commented May 10, 2019

The docs indicate that snd_sfx_play() can take a volume from 0 to 255, but when I set a volume of 255, things start to break in the audio system. The audio effect plays incorrectly, and will not play a second time after that. If I have an ogg file streaming at the time, it starts skipping and stuttering. As soon as I switch the volume to 254 instead, everything works correctly.

This breaks:

snd_init();
sfxhnd_t sfx_powerup = snd_sfx_load("/rd/audio/powerup.wav");
snd_sfx_play(sfx_powerup, 255, 128);

While this works:

snd_init();
sfxhnd_t sfx_powerup = snd_sfx_load("/rd/audio/powerup.wav");
snd_sfx_play(sfx_powerup, 254, 128);

See also this forum post:
http://dcemulation.org/phpBB/viewtopic.php?f=29&t=105061&p=1056366#p1056366

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