aboutsummaryrefslogtreecommitdiffstats
path: root/audio/ripit/files/patch-aa
blob: 6d4e646f7f635fecb3cb4d8a16d4d13121058094 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- ripit.pl.orig   Fri Apr 21 12:11:23 2000
+++ ripit.pl    Fri Apr 21 12:16:20 2000
@@ -26,12 +26,12 @@
 # User configurable variables
 #
 
-$cddev         = "/dev/cdrom";     # CD Audio device
-$outputdir     = "/dosc/cdrip/";   # Where the MP3s should go
+$cddev         = "/dev/rcd0c";     # CD Audio device
+$outputdir     = "/home/mp3/";     # Where the MP3s should go
 $bitrate   = 160;          # Bitrate for MP3s
 $encoder   = 1;            # 0 - Bladeenc, 1 - Lame
 $encopt        = "";           # options for mp3 encoder
-$cdripper  = 0;            # 0 - cdparanoia, 1 - cdda2wav
+$cdripper  = 2;            # 0 - cdparanoia, 1 - cdda2wav, 2 - tosha
 $cdopt     = "";           # options for cdaudio ripper
 
 $use_underscore = 0;   # Use _ instead of spaces in filenames (1 yes, 0 no)
@@ -340,12 +340,18 @@
          die "cdparanoia failed on $tracklist[$_ - 1]";
       }
     }
-    else {
+    elsif ($cdripper == 1) {
       if (system("cdda2wav -D $cddev -Q -H $cdopt -t $riptrackno \"$riptrackname.rip\"")) {
          &printflush(RIPLOG,"cdda2wav failed on $tracklist[$_ - 1]\n");
          die "cdda2wav failed on $tracklist[$_ - 1]";
       }
     }
+    else {
+      if (system("tosha -d $cddev -f wav -t $riptrackno -o \"$riptrackname.rip\"")) {
+         &printflush(RIPLOG,"tosha failed on $tracklist[$_ - 1]\n");
+         die "tosha failed on $tracklist[$_ - 1]";
+      }
+    } 
 
     # Rename rip file to a wav for encoder
     rename "$riptrackname.rip","$riptrackname.wav";
@@ -380,7 +386,7 @@
     print "\nMP3 Encoding track ".$ncount." of ".($#seltrack + 1)."\n";
     &printflush(RIPLOG,"Encoding $tracklist[$_ - 1]...\n");
 
-    # Keep looping until the file appears, ie wait for cdparanoia
+    # Keep looping until the file appears, ie wait for cdripper
     # timeout after 30 minutes
     $x=0;
     while( ! -r "$riptrackname.wav" ){