Handle clients that just want to set fragment size (and not count).
authorPierre Ossman <ossman@cendio.se>
Mon, 19 Jun 2006 16:39:28 +0000 (16:39 +0000)
committerPierre Ossman <ossman@cendio.se>
Mon, 19 Jun 2006 16:39:28 +0000 (16:39 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1030 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/utils/padsp.c

index e25fdfd..56acbb2 100644 (file)
@@ -1839,7 +1839,11 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
             
             i->fragment_size = 1 << (*(int*) argp);
             i->n_fragments = (*(int*) argp) >> 16;
-            
+
+            /* 0x7FFF means that we can set whatever we like */
+            if (i->n_fragments == 0x7FFF)
+                i->n_fragments = 12;
+
             free_streams(i);
             
             pa_threaded_mainloop_unlock(i->mainloop);