Update of /cvsroot/alsa/alsa-oss/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25512/test
Modified Files:
osstest.c
Log Message:
- a try to let OSS mmap mode work with dmix plugin
- call avail_update in GETIPTR and GETOPTR functions (fixme)
- fixed/enhanced semantics of select_prepare (should work now)
Index: osstest.c
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/test/osstest.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- osstest.c 17 Feb 2004 13:06:57 -0000 1.1
+++ osstest.c 18 Feb 2004 20:17:05 -0000 1.2
@@ -25,6 +25,7 @@
static int bufsize;
static int fragsize;
static char *wbuf, *rbuf;
+static int loop = 40;
static void help(void)
{
@@ -155,13 +156,14 @@
{"rate", 1, NULL, 'r'},
{"channels", 1, NULL, 'c'},
{"frag", 1, NULL, 'F'},
+ {"loop", 1, NULL, 'L'},
{NULL, 0, NULL, 0},
};
morehelp = 0;
while (1) {
int c;
- if ((c = getopt_long(argc, argv, "hD:M:r:c:F:v", long_option, NULL)) <
0)
+ if ((c = getopt_long(argc, argv, "hD:M:r:c:F:L:v", long_option, NULL))
< 0)
break;
switch (c) {
case 'h':
@@ -187,6 +189,9 @@
case 'F':
frag = atoi(optarg);
break;
+ case 'L':
+ loop = atoi(optarg);
+ break;
case 'v':
verbose = 1;
break;
@@ -208,17 +213,18 @@
nfrag = 0;
- for (idx=0; idx<40; idx++) {
+ for (idx=0; idx<loop; idx++) {
struct count_info count;
- int res;
+ int res, maxfd;
FD_ZERO(&writeset);
- FD_SET(fd, &writeset);
+ FD_ZERO(&readset);
+ maxfd = oss_pcm_select_prepare(fd, omode, &readset, &writeset, NULL);
tim.tv_sec = 10;
- tim.tv_usec= 0;
+ tim.tv_usec = 0;
- res = select(fd+1, NULL, &writeset, NULL, &tim);
+ res = select(maxfd + 1, &readset, &writeset, NULL, &tim);
#ifdef VERBOSE
printf("Select returned: %03d\n", res);
fflush(stdout);
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog