Changeset 1847

Show
Ignore:
Timestamp:
06/14/06 02:30:40
Author:
miyagawa
Message:

Added Makefile, move sound files to sound/

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • thinkpad-saber/trunk/thinkpad-saber.pl

    r1846 r1847  
    44 
    55use strict; 
     6use Cwd; 
    67use Win32API::File qw(:ALL); 
    78use Win32::Sound; 
     
    2526} 
    2627 
     28my $cwd = cwd; 
    2729$threshold ||= 3.0; 
     30 
     31warn "Ready. Waiting for your shake!\n"; 
    2832 
    2933sub get_pos { 
     
    7781} 
    7882 
     83my %par_tmp; 
     84 
    7985sub play_sound { 
    8086    my $volume = shift; 
     
    8490    warn "playing $filename in $volume" if $debug; 
    8591    Win32::Sound::Volume($volume); 
    86     Win32::Sound::Play($filename, SND_ASYNC); 
     92    Win32::Sound::Play(File::Spec->catfile($cwd, "sound", $filename), SND_ASYNC); 
    8793} 
    8894