Update of /cvsroot/alsa/alsa-lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv23405/test
Modified Files: .cvsignore omixer.c Log Message: added snd_hctl_ctl() function ordinary mixer: - revised Ordinary Mixer I/O type - sndo_mixer_open() take PCMs rather than strings to pass the real relationship - an initial version of toplevel alisp script more alisp development: - renamed a* functions to A* functions (acall -> Acall etc.) - many improvements (unset*, exfun, Acall pcm_info, Asnderr, Asyserr) Index: .cvsignore =================================================================== RCS file: /cvsroot/alsa/alsa-lib/test/.cvsignore,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- .cvsignore 4 Mar 2000 15:50:15 -0000 1.10 +++ .cvsignore 9 Sep 2003 19:24:40 -0000 1.11 @@ -15,3 +15,4 @@ loopback rawmidi midiloop +omixer Index: omixer.c =================================================================== RCS file: /cvsroot/alsa/alsa-lib/test/omixer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- omixer.c 3 Sep 2003 19:25:09 -0000 1.1 +++ omixer.c 9 Sep 2003 19:24:40 -0000 1.2 @@ -13,8 +13,8 @@ printf( "Usage: omixer [OPTION]...\n" "-h,--help help\n" -"-P,--pname playback device\n" -"-C,--cname capture device\n" +"-P,--pname playback PCM device\n" +"-C,--cname capture PCM device\n" "\n"); } @@ -29,6 +29,7 @@ }; int err, morehelp; char *pname = "default", *cname = "default"; + snd_pcm_t *phandle = NULL, *chandle = NULL; sndo_mixer_t *handle; morehelp = 0; @@ -54,11 +55,31 @@ return 0; } - err = sndo_mixer_open(&handle, pname, cname, NULL); + if (strcmp(pname, "-")) { + err = snd_pcm_open(&phandle, pname, SND_PCM_STREAM_PLAYBACK, 0); + if (err < 0) { + fprintf(stderr, "Playback PCM open error: %s\n", snd_strerror(err)); + return EXIT_FAILURE; + } + } + + if (strcmp(cname, "-")) { + err = snd_pcm_open(&chandle, cname, SND_PCM_STREAM_CAPTURE, 0); + if (err < 0) { + if (phandle) + snd_pcm_close(phandle); + fprintf(stderr, "Capture PCM open error: %s\n", snd_strerror(err)); + return EXIT_FAILURE; + } + } + + err = sndo_mixer_open(&handle, phandle, chandle, NULL); if (err < 0) { fprintf(stderr, "mixer open error: %s\n", snd_strerror(err)); return EXIT_FAILURE; } sndo_mixer_close(handle); + snd_pcm_close(chandle); + snd_pcm_close(phandle); return EXIT_SUCCESS; } ------------------------------------------------------- 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