summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1ae1ef5)
Aplay makes too long pause between the sound files, so I have decided
to precompute joined files using sox(1).
20 files changed:
return if $self->{muted};
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 mute { shift->{muted} = 1; }
sub winner {
my ($self, $car_id) = @_;
sub winner {
my ($self, $car_id) = @_;
- $self->_play('winner', $car_id, 'winner');
+ $self->_play('winner', $car_id);
}
sub box {
my ($self, $car_id) = @_;
}
sub box {
my ($self, $car_id) = @_;
- $self->_play('box', $car_id, 'box');
+ $self->_play('box', $car_id);
--- /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
+
+