Update of /cvsroot/alsa/alsa-lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv13407/test

Modified Files:
        Makefile.am control.c pcm.c 
Added Files:
        omixer.c 
Log Message:
added snd_user_file() function
alisp extensions
  - added nth, include, path commands
  - added auto-exec functionality
  - added helpers for C<->lisp interoperability


--- NEW FILE: omixer.c ---
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sched.h>
#include <errno.h>
#include <getopt.h>
#include "../include/mixer_ordinary.h"
#include <sys/time.h>
#include <math.h>

static void help(void)
{
        printf(
"Usage: omixer [OPTION]...\n"
"-h,--help      help\n"
"-P,--pname     playback device\n"
"-C,--cname     capture device\n"
"\n");
}

int main(int argc, char *argv[])
{
        struct option long_option[] =
        {
                {"help", 0, NULL, 'h'},
                {"pname", 1, NULL, 'P'},
                {"cname", 1, NULL, 'C'},
                {NULL, 0, NULL, 0},
        };
        int err, morehelp;
        char *pname = "default", *cname = "default";
        sndo_mixer_t *handle;

        morehelp = 0;
        while (1) {
                int c;
                if ((c = getopt_long(argc, argv, "hP:C:", long_option, NULL)) < 0)
                        break;
                switch (c) {
                case 'h':
                        morehelp++;
                        break;
                case 'P':
                        pname = strdup(optarg);
                        break;
                case 'C':
                        cname = strdup(optarg);
                        break;
                }
        }

        if (morehelp) {
                help();
                return 0;
        }

        err = sndo_mixer_open(&handle, pname, cname, NULL);
        if (err < 0) {
                fprintf(stderr, "mixer open error: %s\n", snd_strerror(err));
                return EXIT_FAILURE;
        }
        sndo_mixer_close(handle);
        return EXIT_SUCCESS;
}

Index: Makefile.am
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/test/Makefile.am,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Makefile.am 19 Feb 2003 21:25:59 -0000      1.23
+++ Makefile.am 3 Sep 2003 19:25:09 -0000       1.24
@@ -1,6 +1,6 @@
 check_PROGRAMS=control pcm latency seq \
               playmidi1 timer rawmidi midiloop \
-              code
+              omixer code
 
 control_LDADD=../src/libasound.la
 pcm_LDADD=../src/libasound.la
@@ -10,6 +10,7 @@
 timer_LDADD=../src/libasound.la
 rawmidi_LDADD=../src/libasound.la
 midiloop_LDADD=../src/libasound.la
+omixer_LDADD=../src/libasound.la
 code_CFLAGS=-Wall -pipe -g -O2
 
 INCLUDES=-I$(top_srcdir)/include

Index: control.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/test/control.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- control.c   7 Sep 2001 09:24:30 -0000       1.11
+++ control.c   3 Sep 2003 19:25:09 -0000       1.12
@@ -100,5 +100,7 @@
                }
                snd_ctl_close(handle);
        }
+       
+       snd_config_update_free_global();
        return 0;
 }

Index: pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/test/pcm.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- pcm.c       15 May 2003 09:10:36 -0000      1.25
+++ pcm.c       3 Sep 2003 19:25:09 -0000       1.26
@@ -691,7 +691,7 @@
 {
        int k;
        printf(
-"Usage: latency [OPTION]... [FILE]...\n"
+"Usage: pcm [OPTION]... [FILE]...\n"
 "-h,--help     help\n"
 "-D,--device   playback device\n"
 "-r,--rate     stream rate in Hz\n"



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to