in reply to Re: playing mp3 files with SDL on Win32
in thread playing mp3 files with SDL on Win32
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 };
|
|---|