Audio-LADSPA

 view release on metacpan or  search on metacpan

Network/Network.pm  view on Meta::CPAN

    my $plugin;
    if (@_ == 1) {
	$plugin = shift;
        unless (ref ($plugin)) {
	    $plugin = $plugin->new($self->{sample_rate});
	}
    }
    else {
	$plugin = Audio::LADSPA->plugin(@_)->new($self->{sample_rate});
    }
    $plugin->set_monitor($self);    # register callbacks.
    return $plugin;
}

sub graph {
    return $_[0]->{graph};
}

sub add_plugin {
    my ($self) = shift;
    my $plugin = $self->_make_plugin(@_);

Network/Network.pm  view on Meta::CPAN

 my $plugin = $network->add_plugin( EXPR );

Adds a $plugin to the $network. All unconnected ports will be connected to new C<Audio::LADSPA::Buffer>s.
Control buffers will be initalized with the correct default value for the port.

EXPR can be an Audio::LADSPA::Plugin object, an Audio::LADSPA::Plugin classname or any
expression supported by L<< Audio::LADSPA->plugin()|Audio::LADSPA/plugin >>.

Any $plugin added to a $network will have its monitor set to that $network. This
means that a $plugin cannot be in more than 1 Audio::LADSPA::Network at any given time, and that
all callbacks from the $plugin are handled by the $network. 

See also L<Audio::LADSPA::Plugin/SETTING CALLBACKS>.

=head2 has_plugin

 if ($network->has_plugin($plugin)) {
     # something interesting...
 }

Check if a given $plugin object exists in the $network. $plugin must be an Audio::LADSPA::Plugin object.

Plugin/Plugin.pod  view on Meta::CPAN

=head2 deactivate

 $plugin->deactivate();

Signal that the plugin can stop. Calling C<deactivate()> and then 
C<activate()> should reset the plugin. 

=head1 SETTING CALLBACKS

To ease the creation of 'container' objects for C<Audio::LADSPA::Plugin>s, you can register a
'monitor' object (usually, the container itself) that will recieve callbacks whenever certain
methods are called on the plugin.

Note that the monitor object should be kept in scope by the container; the reference counting
for the $monitor object is NOT increased by calling C<< $plugin->set_monitor($monitor) >>. 
This is intentional; it allows the container to be the monitor, while still being DESTROYED 
when going out of scope (this means you don't have to worry when the container is 
the monitor; the Perl garbage collector will work as you would expect it to). See 
L<Audio::LADSPA::Network> for a (as of yet buggy) implementation.

=head2 set_monitor



( run in 1.198 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )