| Mac-CoreMIDI documentation | Contained in the Mac-CoreMIDI distribution. |
Mac::CoreMIDI::Port - Encapsulates a CoreMIDI Port
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.
$self->Read()Subclass this function to do processing on read events.
Christian Renz, <crenz @ web42.com>
Copyright 2004-2005 Christian Renz, <crenz @ web42.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| 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__