Update of /cvsroot/alsa/alsa-oss/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18663

Modified Files:
        .cvsignore osstest.c 
Log Message:
Set format to S16_LE, fixed trigger

Index: .cvsignore
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/test/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore  12 Feb 2004 18:52:20 -0000      1.3
+++ .cvsignore  26 Feb 2004 15:34:50 -0000      1.4
@@ -5,5 +5,5 @@
 *.lo
 *.la
 testaoss
-mmap_test
+osstest
 lmixer

Index: osstest.c
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/test/osstest.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- osstest.c   19 Feb 2004 16:02:21 -0000      1.3
+++ osstest.c   26 Feb 2004 15:34:50 -0000      1.4
@@ -14,6 +14,7 @@
 //static char data[500000];
 static int verbose;
 static char *device = "/dev/dsp";
+static int format = AFMT_S16_LE;
 static int rate = 48000;
 static int channels = 2;
 static int omode = O_RDWR;
@@ -47,6 +48,12 @@
 {
        int caps;
 
+       if (oss_pcm_ioctl(fd, SNDCTL_DSP_SETFMT, &format) < 0) {
+               perror("SNDCTL_DSP_SETFMT\n");
+               exit(EXIT_FAILURE);
+       }
+       printf("Format set to %d\n", format);
+
        if (oss_pcm_ioctl(fd, SNDCTL_DSP_SPEED, &rate) < 0) {
                perror("SNDCTL_DSP_SPEED\n");
                exit(EXIT_FAILURE);
@@ -127,6 +134,7 @@
 {
        int tmp;
 
+       tmp = 0;
        if (oss_pcm_ioctl(fd, SNDCTL_DSP_SETTRIGGER, &tmp) < 0) {
                perror("SNDCTL_DSP_SETTRIGGER");
                exit(EXIT_FAILURE);



-------------------------------------------------------
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

Reply via email to