From 5b81966b3eed8d2f0889192f50c509d72d0fc6eb Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Mon, 10 Apr 2000 12:29:29 +0000 Subject: [PATCH] 2000-04-10 Pavel Machek * extfs/audio: Added a way to browse audio CDs conviently --- vfs/ChangeLog | 2 ++ vfs/extfs/audio | 37 +++++++++++++++++++++++++++++++++++++ vfs/extfs/extfs.ini | 3 +++ 3 files changed, 42 insertions(+) create mode 100755 vfs/extfs/audio diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 25a6bab1c..e74c0fa52 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,5 +1,7 @@ 2000-04-10 Pavel Machek + * extfs/audio: Added a way to browse audio CDs conviently + * undelfs.c: use NULLs instead of 0s when you assign to pointers! 2000-04-05 Andrew V. Samoilov diff --git a/vfs/extfs/audio b/vfs/extfs/audio new file mode 100755 index 000000000..228cac6e7 --- /dev/null +++ b/vfs/extfs/audio @@ -0,0 +1,37 @@ +#! /bin/sh +# +# Written by Pavel Machek +# +# (C) 2000 The Free Software Foundation. +# +# FIXME: it would be much nicer to use names like track-01.wav, like cdfs does. +# + +audiofs_list () +{ +cdparanoia -Q -d $1 2>&1 | grep '^[ 0-9][ 0-9][ 0-9]\.' | while true + do + read A B C || break + SIZE=$[44+$B*2352] + echo "-r--r--r-- 4 0 0 $SIZE Jan 1 0:00 track${A}wav" + done +} + +audiofs_copyout () +{ +TRACK=`echo $2 | sed 's/track//' | sed 's/\.wav//'` +cdparanoia -d $1 -v $TRACK $3 +} + +if [ ! -b $2 ] + then + BASE=/dev/cdrom +else + BASE=$2 +fi + +case "$1" in + list) audiofs_list $BASE; exit 0;; + copyout) audiofs_copyout $BASE $3 $4; exit 0;; +esac +exit 1 diff --git a/vfs/extfs/extfs.ini b/vfs/extfs/extfs.ini index 5ffa73b68..4c25c2814 100644 --- a/vfs/extfs/extfs.ini +++ b/vfs/extfs/extfs.ini @@ -48,3 +48,6 @@ debd # apt frontend apt: deba + +# Simple filesystem for audio cdroms. Use /dev/cdrom#audio (or /#audio). +audio