[Mplayer-cvslog] CVS: main/libao2 ao_alsa9.c,1.40,1.41
Attila Kinali CVS
attila at mplayerhq.hu
Sat Jan 10 10:10:55 CET 2004
- Previous message: [Mplayer-cvslog] CVS: main/Gui/mplayer/gtk menu.c,1.29,1.30
- Next message: [Mplayer-cvslog] CVS: main/libvo Makefile, 1.41, 1.42 vo_fbdev.c, 1.88, 1.89 vo_fbdev2.c, 1.3, 1.4 vo_mga.c, 1.36, 1.37
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libao2
In directory mail:/scsi/2/tmp/cvs-serv27407
Modified Files:
ao_alsa9.c
Log Message:
use -mixer with alsa9
patch by Roland Kuhn <rkuhn at e18.physik.tu-muenchen.de>
Index: ao_alsa9.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_alsa9.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- ao_alsa9.c 4 Oct 2003 17:28:58 -0000 1.40
+++ ao_alsa9.c 10 Jan 2004 09:10:52 -0000 1.41
@@ -18,6 +18,7 @@
#include <sys/poll.h>
#include "../config.h"
+#include "../mixer.h"
#if HAVE_SYS_ASOUNDLIB_H
#include <sys/asoundlib.h>
@@ -96,13 +97,28 @@
snd_mixer_elem_t *elem;
snd_mixer_selem_id_t *sid;
- const char *mix_name = "PCM";
- char *card = "default";
+ static const char *mix_name = NULL;
+ static char *card = NULL;
long pmin, pmax;
long get_vol, set_vol;
float calc_vol, diff, f_multi;
+ if(mix_name == NULL){
+ if(mixer_device) {
+ card = strdup(mixer_device);
+ mix_name = strchr(card, '/');
+ if(mix_name) {
+ *mix_name++ = 0;
+ } else {
+ mix_name = "PCM";
+ }
+ } else {
+ mix_name = "PCM";
+ card = "default";
+ }
+ }
+
if(ao_data.format == AFMT_AC3)
return CONTROL_TRUE;
- Previous message: [Mplayer-cvslog] CVS: main/Gui/mplayer/gtk menu.c,1.29,1.30
- Next message: [Mplayer-cvslog] CVS: main/libvo Makefile, 1.41, 1.42 vo_fbdev.c, 1.88, 1.89 vo_fbdev2.c, 1.3, 1.4 vo_mga.c, 1.36, 1.37
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list