user climits and CHAR_BIT instead on NBBY

Signed-off-by: Denis Kozadaev <denis@dilos.org>
pull/31/head
Denis Kozadaev 3 months ago
parent d6fd6ee0f8
commit 247aa206ed

@ -35,6 +35,7 @@
#include <cstdlib>
#include <cstring>
#include <climits>
int bps, chans;
long long realpos, playpos, recpos;
@ -155,7 +156,7 @@ bool AudioIOSNDIO::open()
while (_fragmentSize * _fragmentCount > 1024*32)
_fragmentCount--;
bpf = ((par.bits / NBBY) * par.pchan);
bpf = ((par.bits / CHAR_BIT) * par.pchan);
par.round = _fragmentSize / bpf;
par.appbufsz = _fragmentSize * _fragmentCount / bpf;

Loading…
Cancel
Save