]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Use SNDCTL_DSP_SETFRAGMENT if available. From Tim Shoppa.
authorHarlan Stenn <stenn@ntp.org>
Tue, 7 Sep 2004 10:41:51 +0000 (06:41 -0400)
committerHarlan Stenn <stenn@ntp.org>
Tue, 7 Sep 2004 10:41:51 +0000 (06:41 -0400)
bk: 413d906fPfTZikQ8pTe-lrVwpgBmvw

libntp/audio.c

index 3b39ae03165a1e9747d5cfb22df8a716ce1e4865..8d2f7c2ca9dd2d49166456b42481e7f38a1e9291 100644 (file)
@@ -285,6 +285,15 @@ audio_init(
                s_size.play_size, s_size.rec_size);
 # endif /* HAVE_STRUCT_SND_SIZE */
 
+# ifdef SNDCTL_DSP_SETFRAGMENT
+       {
+               int tmp = (16 << 16) + 6; /* 16 fragments, each 2^6 bytes */
+               if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &tmp) == -1)
+                   printf("audio_init: SNDCTL_DSP_SETFRAGMENT: %s\n",
+                          strerror(errno));
+       }
+# endif /* SNDCTL_DSP_SETFRAGMENT */
+
 # ifdef AIOGFMT
        if (ioctl(fd, AIOGFMT, &s_c_p) == -1)
            printf("audio_init: AIOGFMT: %s\n", strerror(errno));