in reply to playing mp3 files with SDL on Win32

You need to build libsdl with mp3 support
  • Comment on Re: playing mp3 files with SDL on Win32

Replies are listed 'Best First'.
Re^2: playing mp3 files with SDL on Win32
by tallulah (Novice) on Nov 30, 2009 at 06:59 UTC
    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 };