Audio::aKodePlayerA simple Perl interface to the aKode audio library | |
Download |
Audio::aKodePlayer Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Petr Pajas
- Publisher web site:
- http://search.cpan.org/~pajas/
Audio::aKodePlayer Tags
Audio::aKodePlayer Description
A simple Perl interface to the aKode audio library Audio::aKodePlayer is a Perl module that provides a simple interface to the aKode::Player class from the C++ aKode library. aKode is a simple audio-decoding frame-work that provides a uniform interface to decode the most common audio-formats such as WAV, MP3, Ogg/Vorbis, Ogg/FLAC, etc. It also has a direct playback option for a number of audio-outputs, such as OSS, Alsa, SunOS/Solaris audio, Jack, and Polyp (recommended for network transparent audio).SYNOPSIS use Audio::aKodePlayer; my $player = Audio::aKodePlayer->new(); $player->open('auto'); # automatically selected output sink $player->load( 'my_audio.ogg' ); # any format supported by aKode $player->play(); $player->seek(10*1000) if $player->seekable; # seek 10 seconds from the beginning while (!$player->eof) { print "Playback position: ".($player->position()/1000)." seconds of ".($player->length()/1000)."\n"; sleep 1; } ... $player->pause(); $player->resume(); $player->setVolume(0.75); print "Current volume is at ".($player->volume()*100)."%\n"; ... $player->wait; # idle until the playback stops $player->stop; # stop playback $player->unload; # release resources related to the media $player->close; # release resources related to the the output sink Requirements: · Perl
Audio::aKodePlayer Related Software