POE::Wheel::Audio::MadPOE::Wheel::Audio::Mad is a POE Wheel implementing in-session non-blocking mpeg stream playing. | |
Download |
POE::Wheel::Audio::Mad Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Mark McConnell
- Publisher web site:
- http://search.cpan.org/~mischke/Audio-Mad-0.6/lib/Audio/Mad/Stream.pm
POE::Wheel::Audio::Mad Tags
POE::Wheel::Audio::Mad Description
POE::Wheel::Audio::Mad is a POE Wheel implementing in-session non-blocking mpeg stream playing. POE::Wheel::Audio::Mad is a POE Wheel implementing in-session non-blocking mpeg stream playing.SYNOPSIS use POE; use POE::Wheel::Audio::Mad; POE::Session->create( inline_states => { _start => &am_start, message => &am_message } ); sub am_start { my ($kernel, $heap) = @_; ## you may also specify decoder options, listed below.. $heap->{wheel} = new POE::Wheel::Audio::Mad ( message_event => 'message' ); $kernel->yield( 'decoder_open', { filename => '/path/to/some/stream.mp3', play => 1 }); } sub am_message { my ($kernel, $message) = @_; if ($message->{id} eq 'INPUT_EOF_WARNING') { print "finished..n"; undef $heap->{wheel}; } elsif ($message->{id} eq 'DECODER_FRAME_DATA') { if (defined($message->{data}->{played})) { print "rplayed: $message->{data}->{played}"; } } } $poe_kernel->run(); exit();POE::Wheel::Audio::Mad is an attempt to bring a naitive perl mpeg decoder into a perl session. This module was written to work as a POE Wheel due to it's nature -- it simply playes mpeg streams -- you have to do the job of controlling the player and handling updates. This really isn't your traditional wheel. Requirements: · Perl
POE::Wheel::Audio::Mad Related Software