On Thu, 10 Jul 2003, Carlo Wood wrote:

> ~>a.out
> Fragment size: 1024
> Number of fragments: 32767
> Number of channels: 1
> Sample rate: 22050
> Read 1024 bytes.
> Number of full fragments that can be read or written without blocking: 0
> Total number of fragments allocated for buffering: 2
> Size of a fragment in bytes: 1024
> Number of bytes that can be read or written immediately without blocking: 0
> #fragments, #bytes: 0, 0
> #fragments, #bytes: 1, 1632
> Read 1024 bytes.
> #fragments, #bytes: 2, 2048
> Read 1024 bytes.
> #fragments, #bytes: 1, 1024
> Read 1024 bytes.
> #fragments, #bytes: 0, 0
> #fragments, #bytes: 0, 0
> #fragments, #bytes: 0, 0

How about if you make the following change to the test:

--cut--
    printf("#fragments, #bytes: %d, %d\n", info.fragments, info.bytes);
-    if (info.fragments > 0)
-    {
      ssize_t rlen = read(fd, buf, sizeof(buf));
      if (rlen <= 0)
      {
        perror("read");
        exit(1);
      }
      printf("Read %d bytes.\n", rlen);
-    }
    static struct timespec naptime = { 0, 100000000 };
--cut--

-- 
 http://www.eca.cx
 Audio software for Linux!



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to