Win32::Sound is already part of ActivePerl.  It is *also* part of the 
ActiveState repo if you are using ActivePerl 818 or later (but
you don't need to install it; you should already have it).

 

Cheers,

-Jan

 

From: perl-win32-users-boun...@listserv.activestate.com 
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Phillip Richcreek
Sent: Tuesday, December 30, 2008 12:54 PM
To: perl-win32-users@listserv.activestate.com
Subject: Play .wav file win32::sound?

 

I want to make a clicking sound -- something similar to a clock tick or 
metronome tick -- within a perl program. The code will accept a "number of 
beats per minute" value, then play the .wav on each "beat".

use Time::HiRes qw(usleep);
use Win32::Sound;
$microseconds = 500_000;  # 120 beats/minute
while(1)
{
  usleep($microseconds);
  Play("beat.wav");
}

I've been unable to locate Win32::Sound using ppm search.

ppm> rep
Repositories:
[1] ActiveState Package Repository
[2] AS-BETA
[3] AS-BETA2
[4] LOCAL
[5] CPAN
[6] ActiveState PPM2 Repository
[7] UWINN

Does someone know where I can find Win32::Sound?

TIA,

Phil 

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to