summaryrefslogtreecommitdiffstats
path: root/polyp/oss-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/oss-util.c')
-rw-r--r--polyp/oss-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/polyp/oss-util.c b/polyp/oss-util.c
index cf55a6ee..4fb2b929 100644
--- a/polyp/oss-util.c
+++ b/polyp/oss-util.c
@@ -138,7 +138,7 @@ int pa_oss_auto_format(int fd, struct pa_sample_spec *ss) {
return 0;
}
-static int log2(int v) {
+static int simple_log2(int v) {
int k = 0;
for (;;) {
@@ -152,7 +152,7 @@ static int log2(int v) {
int pa_oss_set_fragments(int fd, int nfrags, int frag_size) {
int arg;
- arg = ((int) nfrags << 16) | log2(frag_size);
+ arg = ((int) nfrags << 16) | simple_log2(frag_size);
if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &arg) < 0) {
fprintf(stderr, "SNDCTL_DSP_SETFRAGMENT: %s\n", strerror(errno));