- verbose("Running flac\n");
- $status = system('flac', '-o', "../$artist/$outfile.flac-tmp",
- '--delete-input-file', '-V', '--cuesheet',
- 'cue', '--no-padding', '--best',
- map({ ('-T', $_) } @tags),
- 'wav');
- if (WIFEXITED($status)) {
- if (($status = WEXITSTATUS($status)) != 0) {
- die("flac exited with status $status");
+ verbose("Running flac\n");
+ $status = system('flac', '-o', "$outfile.flac-tmp",
+ '--delete-input-file', '-V', '--no-padding', '--best',
+ map({ ('-T', $_) }
+ @lartist,
+ grep({ $_ !~ /^ARTIST=/ } @tags),
+ bork_tags($things{$tracknum})),
+ sprintf('track%02d.cdda.wav', $tracknum));
+ if (WIFEXITED($status)) {
+ if (($status = WEXITSTATUS($status)) != 0) {
+ die("flac exited with status $status");
+ }
+ } elsif (WIFSIGNALED($status)) {
+ die("flac killed with signal ", WTERMSIG($status));
+ } elsif (WIFSTOPPED($status)) {
+ die("flac stopped with signal ", WSTOPSIG($status));
+ } else {
+ die("Major horkage on system(flac): \$? = $? \$! = $!");