X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=SCX%2FSound.pm;h=5d50bfb78a3e50336aa2ab1a77a9dda35b30a2a9;hb=8f29704c1e17195a4e195872ed518dd6d2f0dd62;hp=9a7180abb4a107489e1d1855fc95177eb5a0e0b0;hpb=1ae1ef53e1bc6383b599782616b656a25094a7e6;p=slotcarman.git diff --git a/SCX/Sound.pm b/SCX/Sound.pm index 9a7180a..5d50bfb 100644 --- a/SCX/Sound.pm +++ b/SCX/Sound.pm @@ -22,8 +22,7 @@ sub _play { 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; } @@ -35,13 +34,13 @@ sub filled { shift->_play('filled'); } 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 {