summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-06-08 04:03:59 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-06-08 04:03:59 +0000
commitca78cf2743dbe654d6700589760f1d97e11a5654 (patch)
tree920faaf8c64700eb18f4ab28cbf4404d5a120c89 /libao2
parentb4545e0ba88613b068f12ee4f3105912de90d211 (diff)
downloadmpv-ca78cf2743dbe654d6700589760f1d97e11a5654.tar.bz2
mpv-ca78cf2743dbe654d6700589760f1d97e11a5654.tar.xz
-ao alsa9:hw:0,0 fix by Wojtek Kaniewski <wojtekka@bydg.pdi.net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10259 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_alsa1x.c10
-rw-r--r--libao2/ao_alsa9.c10
2 files changed, 14 insertions, 6 deletions
diff --git a/libao2/ao_alsa1x.c b/libao2/ao_alsa1x.c
index b2e54b48f5..a20e6ce3fe 100644
--- a/libao2/ao_alsa1x.c
+++ b/libao2/ao_alsa1x.c
@@ -317,8 +317,12 @@ static int init(int rate_hz, int channels, int format, int flags)
}
else if (strcmp(*(token_str+i3), "hw") == 0) {
if ((i3 < i2-1) && (strcmp(*(token_str+i3+1), "noblock") != 0) && (strcmp(*(token_str+i3+1), "mmap") != 0)) {
+ char *tmp;
+
alsa_device = alloca(ALSA_DEVICE_SIZE);
snprintf(alsa_device, ALSA_DEVICE_SIZE, "hw:%s", *(token_str+(i3+1)));
+ if ((tmp = strrchr(alsa_device, '.')) && isdigit(*(tmp+1)))
+ *tmp = ',';
device_set = 1;
}
else {
@@ -421,9 +425,9 @@ static int init(int rate_hz, int channels, int format, int flags)
printf("alsa-help: available options are:\n");
printf(" mmap: sets mmap-mode\n");
printf(" noblock: sets noblock-mode\n");
- printf(" device-name: sets device name\n");
- printf(" example -ao alsa9:mmap:noblock:hw:0,3 sets noblock-mode,\n");
- printf(" mmap-mode and the device-name as first card third device\n");
+ printf(" device-name: sets device name (change comma to point)\n");
+ printf(" example -ao alsa9:mmap:noblock:hw:0.3 sets noblock-mode,\n");
+ printf(" mmap-mode and the device-name as first card fourth device\n");
return(0);
} else {
printf("alsa-init: soundcard set to %s\n", alsa_device);
diff --git a/libao2/ao_alsa9.c b/libao2/ao_alsa9.c
index b2e54b48f5..a20e6ce3fe 100644
--- a/libao2/ao_alsa9.c
+++ b/libao2/ao_alsa9.c
@@ -317,8 +317,12 @@ static int init(int rate_hz, int channels, int format, int flags)
}
else if (strcmp(*(token_str+i3), "hw") == 0) {
if ((i3 < i2-1) && (strcmp(*(token_str+i3+1), "noblock") != 0) && (strcmp(*(token_str+i3+1), "mmap") != 0)) {
+ char *tmp;
+
alsa_device = alloca(ALSA_DEVICE_SIZE);
snprintf(alsa_device, ALSA_DEVICE_SIZE, "hw:%s", *(token_str+(i3+1)));
+ if ((tmp = strrchr(alsa_device, '.')) && isdigit(*(tmp+1)))
+ *tmp = ',';
device_set = 1;
}
else {
@@ -421,9 +425,9 @@ static int init(int rate_hz, int channels, int format, int flags)
printf("alsa-help: available options are:\n");
printf(" mmap: sets mmap-mode\n");
printf(" noblock: sets noblock-mode\n");
- printf(" device-name: sets device name\n");
- printf(" example -ao alsa9:mmap:noblock:hw:0,3 sets noblock-mode,\n");
- printf(" mmap-mode and the device-name as first card third device\n");
+ printf(" device-name: sets device name (change comma to point)\n");
+ printf(" example -ao alsa9:mmap:noblock:hw:0.3 sets noblock-mode,\n");
+ printf(" mmap-mode and the device-name as first card fourth device\n");
return(0);
} else {
printf("alsa-init: soundcard set to %s\n", alsa_device);