-
Notifications
You must be signed in to change notification settings - Fork 118
Generate mixer buffer size from sample rate #483
Generate mixer buffer size from sample rate #483
Conversation
prboom2/src/SDL/i_sound.c
Outdated
{ | ||
int limit, n; | ||
|
||
if (snd_samplecount) return snd_samplecount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do the following:
if (snd_samplecount >= 32)
return snd_samplecount * snd_samplerate / 11025;
so users can keep their config if they fine-tuned it with the previous implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Since those users have likely moved away from 512, I'll put this condition too:
if ((snd_samplecount >= 32) && (snd_samplecount != 512))
return snd_samplecount * snd_samplerate / 11025;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, please don't. We don't need two "do nothing else" cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I admit that it's a hack, but shouldn't we handle the previous default? Or would it be safer to just do this for newer installs?
Thank you! |
Fixes #429, but breaks
slice_samplecount
behavior. Suggested re-usage on line 234.