Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.329.272 Times

POE::Component::Audio::Mad::Dispatch 0.3

  Date Added: August 16, 2010  |  Visits: 1.232

POE::Component::Audio::Mad::Dispatch

Report Broken Link
Printer Friendly Version


Product Homepage
Download (101 downloads)



POE::Component::Audio::Mad::Dispatch is a POE::Component::Audio::Mad frontend implementing listener based message dispatch. SYNOPSIS use POE; use POE::Component::Audio::Mad::Dispatch; ## we print some stuff below, and we dont want it ## to get buffered.. so turn on autoflush. $| = 1; ## create our frontend session, which will create a decoder and ## forward its messages to all interested listeners.. create POE::Component::Audio::Mad::Dispatch({ decoder_play_on_open => 1, alias => mad-decoder }); POE::Session->create(inline_states => { _start => &ex_start, mad_decoder_input => &ex_input }); sub ex_start { my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION]; ## add ourself in as a listener, and register for the DECODER_FRAME_DATA and ## IPC_SHUTDOWN_SUCCESS events. The decoder core will then call the ## mad_decoder_input state in the current session when these ## events arrive.. ## this also has the added benefit of keeping a reference to our ## session alive in the event notification list. Our session will ## remain alive as long as we are a registered listener.. $heap->{lid} = $kernel->call(mad-decoder, add_listener, $session, mad_decoder_input, [ DECODER_FRAME_DATA, INPUT_EOF_WARNING ]); ## tell our decoder to start playing a stream.. $kernel->post(mad-decoder, decoder_open, { filename => /path/to/stream.mp3, play => 1 }); } sub ex_input { my ($kernel, $heap, $msg) = @_[KERNEL, HEAP, ARG0]; ## this is called when the decoder has generated an event ## that we have registered for. the message packet is ## contained in ARG0, and is a hashref with two ## fields ->{id} and ->{data}. id specifies the name ## of the event, and data contains a reference to ## the data included in this event.. if ($msg->{id} eq DECODER_FRAME_DATA) { ## we got a message updating us as to player ## progress, the data part of the event will ## contain two values: ->{played} and ->{progress}, ## played is the number of seconds of stream ## played.. print "rplayed: $msg->{data}->{played}" if (defined($msg->{data}->{played})); } elsif ($msg->{id} eq INPUT_EOF_WARNING) { ## we got a message telling us that the ## decoder system has come to the end of ## the current stream, use it as a queue ## to shutdown.. print "nshutting down..n"; $kernel->post(mad-decoder, decoder_shutdown); } else { ## unknown messages should never happen, but ## we could do something interesting with them ## here.. for simplicity, we just ignore it. return; } } ## start this thing.. $poe_kernel->run(); exit(); POE::Component::Audio::Mad::Dispatch implements a multiple dispatch front end component for the POE::Wheel::Audio::Mad mpeg decoder. It receieves status messages from the decoder and dispatches them to other registered "listener" sessions. All of the states listed in POE::Wheel::Audio::Mad(3) under STATES will be defined within this components session. To control the decoder, simply post the appropriate POE::Wheel::Audio::Mad STATE to this session. If you intend to implement a decoder that will be controlled and/or monitored by other POE::Sessions, then this is the module you want to be using. If you wish to implement a decoder through an IPC bridge, you want POE::Component::Audio::Mad::Handle..

Requirements: No special requirements
Platforms: Linux
Keyword: Data Decoder Frame Frontend Input Libraries Listener Message Poe Poecomponentaudiomaddispatch Programming Session
Users rating: 0/10

License: Freeware Size: 22.53 KB
USER REVIEWS
More Reviews or Write Review


POE::COMPONENT::AUDIO::MAD::DISPATCH RELATED
Utilities  -  Pipemeter 1.1.3
Pipemeter is a command line utility that displays the speed and, if possible, progress, of data moving from its input to its output..
18.43 KB  
Libraries  -  Pod::Dsr 1.02
Pod::Dsr is a Perl module Convert POD data to formatted DSR input SYNOPSIS use Pod::Dsr; my $parser = Pod::Dsr->new (release => $VERSION, section => 8); # Read POD from STDIN and write to STDOUT. $parser->parse_from_filehandle; # Read...
102.4 KB  
Compression Tools  -  ComprLib Data Manipulation Library b20
ComprLib is a library providing a flexible and easy to use interface for encoding and decoding of data, independent of the input and output sources. New codecs able to encode/decode Arithmetic to LZSS have been ported.
3.81 MB  
Libraries  -  pod2man 5.6.2
pod2man is a Perl module that can convert POD data to formatted *roff input. SYNOPSIS pod2man [--section=manext] [--release=version] [--center=string] [--date=string] [--fixed=font] [--fixedbold=font] [--fixeditalic=font]...
6 MB  
Text Management  -  Design mini-lanugage 1.0
This script uses Python's superb text handling capability to parse and build the data structure from the input text.
 
Communication  -  Speech Spectrogram 1.0
Takes a vector containing audio data samples as an input, computes short-time Fourier transform (STFT) and plots the STFT power spectrum trajectories across time.http://www.downloadplex.com/index.php?a=admin&b=programs&os=Scripts&add
2.87 MB  
Science  -  MacCRO X 1
An oscilloscope and spectrum analyser, capable of analysing data captured from sound input devices.
64.81 KB  
Programming  -  jplaintext 0.3
jplaintext is a Java library to deal with data from plain text input. Plain text files are still around and sometimes a Java program wants to process data from plain text source. Reading this data into POJO could be lead to lot of...
40.96 KB  
Site Security Tools  -  django-frontendadmin 0.4
django-frontendadmin is a set of template tags to allow an easy and unobtrusive way to edit model-data in the frontend of your page. Example project This package provides an easy example project, a weblog with comments. Here...
10.24 KB  
Utilities  -  Dylan Code Collection 1.7
A collection of useful libraries written in the Dylan programming language. The intent of this project is to provide easily accessible libraries for people developing applications using Functional Developer and/or Gwydion Dylan.
673.63 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB