Mac::CoreMIDI::Endpoint - Encapsulates a CoreMIDI Endpoint


Mac-CoreMIDI documentation Contained in the Mac-CoreMIDI distribution.

Index


Code Index:

NAME

Top

Mac::CoreMIDI::Endpoint - Encapsulates a CoreMIDI Endpoint

CONSTRUCTORS

Top

my $ep = Mac::CoreMIDI::Endpoint-new_source(name => '...', client => $client)

Creates a new source endpoint for the given client.

my $ep = Mac::CoreMIDI::Endpoint-new_destination(name => '...', client => $client)

Creates a new destination endpoint for the given client.

METHODS

Top

my $ent = $ep->GetParent()

Returns parent entity for this endpoint.

$self->Read()

Subclass this function to do processing on read events.

SEE ALSO

Top

Mac::CoreMIDI, Mac::CoreMIDI::Client

AUTHOR

Top

Christian Renz, <crenz @ web42.com>

COPYRIGHT AND LICENSE

Top


Mac-CoreMIDI documentation Contained in the Mac-CoreMIDI distribution.

package Mac::CoreMIDI::Endpoint;

use 5.006;
use strict;
use warnings;

use base qw(Mac::CoreMIDI::Object);
our $VERSION = '0.04';

sub new_destination {
    my $class = shift;
    my %args = @_;

    return undef unless ref($args{client});
    $args{name} ||= 'Mac::CoreMIDI::Endpoint (Destination)';

    my $self = _new_destination($class, $args{client}, $args{name});

    return $self;
}

sub new_source {
    my $class = shift;
    my %args = @_;

    return undef unless ref($args{client});
    $args{name} ||= 'Mac::CoreMIDI::Endpoint (Source)';

    my $self = _new_source($class, $args{client}, $args{name});

    return $self;
}

sub _DESTROY {
    _destroy(shift);
}

sub Read {
    # subclass to use this function
}

1;

__END__