ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/kgsueme/sound.pl
(Generate patch)

Comparing kgsueme/kgsueme/sound.pl (file contents):
Revision 1.2 by pcg, Thu Jun 12 22:10:05 2003 UTC vs.
Revision 1.3 by pcg, Wed Jul 30 00:32:42 2003 UTC

1package sound; 1package sound;
2
3use KGS::Constants;
2 4
3#my $audioserver = new Audio::Play(0); 5#my $audioserver = new Audio::Play(0);
4my %sound; 6my %sound;
5$SIG{CHLD} = 'IGNORE'; 7$SIG{CHLD} = 'IGNORE';
6 8
9for (map +(KGS::Constants::findfile "KGS/kgsueme/sounds/$_"),
7for (qw(alarm warning move pass ring connect user_unknown gamestart resign)) { 10 qw(alarm warning move pass ring connect user_unknown gamestart resign)) {
8 local $/; 11 local $/;
9 open my $snd, "<", "$::SNDDIR/$_" 12 open my $snd, "<", $_
10 or die "$::SNDDIR/$_: $!"; 13 or die "$_: $!";
11 binmode $snd; 14 binmode $snd;
12 15
13 $sound{$_} = new Audio::Data; 16 $sound{$_} = new Audio::Data;
14 $sound{$_}->Load($snd); 17 $sound{$_}->Load($snd);
15} 18}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines