i have just installed Win32::MediaPlayer (the easy way) from http://www.bribes.org/perl/ppmdir.html
it can play sound MP3 / WMA / WAV / MIDI file on Win32 platforms
i have tried successfully an example from the docs:
use Win32::MediaPlayer;
$winmm = new Win32::MediaPlayer; # new an object
$winmm->load('./misty.mp3'); # Load music file disk, or an URL
$winmm->play; # Play the music
$winmm->volume(100); # Set volume after playing
$winmm->seek('00:00'); # seek to
#$winmm->pause; # Pause music playing
#$winmm->resume; # Resume music playing
print 'Total Length : '.$winmm->length(1),$/; # Show total time.
while(1) {
sleep 1;
print 'Now Position: '.$winmm->pos(1)."\r"; # Show now time
};
|