Mercurial > mplayer.hg
changeset 10258:d9371eecb619
-ao alsa9:hw:0,0 fix by Wojtek Kaniewski <wojtekka@bydg.pdi.net>
author | alex |
---|---|
date | Sun, 08 Jun 2003 04:03:59 +0000 |
parents | 14c4e284a702 |
children | b60e89268837 |
files | libao2/ao_alsa1x.c libao2/ao_alsa9.c |
diffstat | 2 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_alsa1x.c Sat Jun 07 17:23:29 2003 +0000 +++ b/libao2/ao_alsa1x.c Sun Jun 08 04:03:59 2003 +0000 @@ -317,8 +317,12 @@ } 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 @@ 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);
--- a/libao2/ao_alsa9.c Sat Jun 07 17:23:29 2003 +0000 +++ b/libao2/ao_alsa9.c Sun Jun 08 04:03:59 2003 +0000 @@ -317,8 +317,12 @@ } 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 @@ 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);