Mac::CoreMIDI::Port - Encapsulates a CoreMIDI Port


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

Index


Code Index:

NAME

Top

Mac::CoreMIDI::Port - Encapsulates a CoreMIDI Port

CONSTRUCTORS

Top

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

Creates a new input port for the given client.

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

Creates a new output port for the given client.

METHODS

Top

$self->Read()

Subclass this function to do processing on read events.

SEE ALSO

Top

Mac::CoreMIDI

AUTHOR

Top

Christian Renz, <crenz @ web42.com>

COPYRIGHT AND LICENSE

Top


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

package Mac::CoreMIDI::Port;

use 5.006;
use strict;
use warnings;

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

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

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

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

    return $self;
}

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

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

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

    return $self;
}

sub _DESTROY {
    _destroy(shift);
}

sub Read {
    # nothing happens here right now
}

1;

__END__