diff options
author | Markus Rechberger <mrechberger@gmail.com> | 2006-03-13 05:41:17 +0100 |
---|---|---|
committer | Markus Rechberger <mrechberger@gmail.com> | 2006-03-13 05:41:17 +0100 |
commit | e07574e1290ffc63432bc2b06a7677abc365de2d (patch) | |
tree | 3a86be2b5d09b0241e330b6f1a04dbe98d6f24b7 /v4l/scripts/usbaudio_setup.sh | |
parent | 4f947824c3825aae87faac1d61c600b69fdb5fd2 (diff) | |
download | mediapointer-dvb-s2-e07574e1290ffc63432bc2b06a7677abc365de2d.tar.gz mediapointer-dvb-s2-e07574e1290ffc63432bc2b06a7677abc365de2d.tar.bz2 |
small usbaudio_setup.sh change to support dsp0
From: Markus Rechberger <mrechberger@gmail.com>
small usbaudio_setup.sh change to support dsp0
Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Diffstat (limited to 'v4l/scripts/usbaudio_setup.sh')
-rwxr-xr-x | v4l/scripts/usbaudio_setup.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/v4l/scripts/usbaudio_setup.sh b/v4l/scripts/usbaudio_setup.sh index 33b15e56b..66fdd23df 100755 --- a/v4l/scripts/usbaudio_setup.sh +++ b/v4l/scripts/usbaudio_setup.sh @@ -49,7 +49,7 @@ int main(int argc, char **argv){ if(fd>=0){ info=malloc(sizeof(struct mixer_info)); ioctl(fd,SOUND_MIXER_INFO,info); - printf("%c \"%s %s\"\n",(argv[1][strlen(argv[1])-1]=='p')?'0':argv[1][strlen(argv[1])-1],info->name,info->id); + printf("%c \"%s %s\"\n",(argv[1][strlen(argv[1])-1]=='p')?'0':(argv[1][strlen(argv[1])-1]+1),info->name,info->id); free(info); close(fd); } else { @@ -86,20 +86,20 @@ Press any key to continue... " 13 60 ls /dev/dsp* | while read a; do ./ossid $a; done | xargs dialog --menu "Choose your TV Audio source:" 12 60 5 2>/tmp/em2880_source.$$ ls /dev/dsp* | while read a; do ./ossid $a; done | xargs dialog --menu "Choose your output soundcard device:" 12 60 5 2>/tmp/em2880_dst.$$ -source=`egrep '^[0-9]' /tmp/em2880_source.$$` -dst=`egrep '^[0-9]' /tmp/em2880_dst.$$` +source=`egrep '^[0-9p]' /tmp/em2880_source.$$` +dst=`egrep '^[0-9p]' /tmp/em2880_dst.$$` echo "playing $source to $dst"; if [ "$source" = "0" ]; then device="/dev/dsp" else - device="/dev/dsp$source" + device="/dev/dsp`expr $source - 1`" fi if [ "$dst" = "0" ]; then device2="/dev/dsp" else - device2="/dev/dsp$source" + device2="/dev/dsp`expr $source - 1`" fi clear echo "Using command: sox -r 48000 -w -c 2 -t ossdsp $device -t ossdsp $device2" |