PageRenderTime 32ms CodeModel.GetById 26ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/examples/SDLx/music.pl

http://github.com/PerlGameDev/SDL
Perl | 7 lines | 7 code | 0 blank | 0 comment | 1 complexity | f84df890cf03b16d9f71b3d0c43a525b MD5 | raw file
1use SDL;
2use SDLx::Music;
3$music = SDLx::Music->new;
4$music->data( sam => "test/data/sample.wav" );
5$sam = $music->data("sam");
6$music->play($sam);
7while ( $music->playing ) { print "playing\n" }