return if $self->{muted};
- @names = map { $self->{data_dir} . '/' . $_ . '.wav' } @names;
- system (join(' ', 'aplay', @names). ' &');
+ system 'aplay', $self->{data_dir} . '/' . join('-', @names) . '.wav';
}
sub mute { shift->{muted} = 1; }
sub winner {
my ($self, $car_id) = @_;
- $self->_play('winner', $car_id, 'winner');
+ $self->_play('winner', $car_id);
}
sub box {
my ($self, $car_id) = @_;
- $self->_play('box', $car_id, 'box');
+ $self->_play('box', $car_id);
}
sub best_lap {
--- /dev/null
+#!/bin/bash
+
+for n in `seq 0 5`
+do
+ sox {box,$n,box}.wav box-$n.wav
+done
+
+for n in `seq 0 5`
+do
+ sox {bestlap,$n}.wav bestlap-$n.wav
+done
+
+for n in `seq 0 5`
+do
+ sox {winner,$n,winner}.wav winner-$n.wav
+done
+
+