Audio-Daemon
view release on metacpan or search on metacpan
use Audio::Daemon::MPG123;
use Audio::Daemon::Xmms;
use Audio::Daemon::Shout;
or for the single client interface:
use Audio::Daemon::Client;
=head1 DESCRIPTION
Audio::Daemon is a udp service providing a single udp interface around various
other modules, like Xmms, Audio::Play::MPG123 and libshout (for icecast streaming).
=head1 AUTHOR
Jay Jacobs jayj@cpan.org
=head1 SEE ALSO
Audio::Daemon::MPG123
Audio::Daemon::Xmms
Audio::Daemon::Shout
Daemon/Client.pm view on Meta::CPAN
=head1 METHODS
I tried to stay as close the Audio::Play::MPG123 methods as possible with a few exceptions noted below.
=over 4
=item add [list of urls]
Needs to have arguments (array or array ref) of urls to load on the server. If you're calling an mp3
file it obviously needs access by the server, not the client. It can be simple filenames, or urls
including http: urls for streaming to the server. If there are tracks already in the playlist on the server
these will be tacked on to the end of the list. If random mode is on, it will re-randomize the entire list
when it is finished adding (see the random feature).
=item del [list of index numbers]
Takes either the index number of tracks to remove or the keyword "all" to clear out the tracks. If the
player is currently playing a track you removed it will internally call "next" to move the next track. If
you remove all tracks, it will cease to play until you add tracks back in.
=item stop
Daemon/Shout.pm view on Meta::CPAN
$self->{state} = {random => 0, repeat => 0, state => 0};
$self->connect;
return $self;
}
sub connect {
my $self = shift;
my $config = $self->{Pass};
my %params;
# can also set 'lame' parameter,
# checked for to see if we downsample when streaming.
foreach my $p (qw/ip port mount password icy_compat aim icq irc
dumpfile name url genre description bitrate ispublic/) {
if (defined $self->{Pass}{$p}) {
$self->debug("Setting $p to \"".$config->{$p}."\"");
$params{$p} = $config->{$p};
}
}
my $server = new Shout(%params);
if (! defined $server) {
$self->crit("Failed to initialize Should object: $!");
( run in 0.252 second using v1.01-cache-2.11-cpan-4d50c553e7e )