| Mac-CoreMIDI documentation | Contained in the Mac-CoreMIDI distribution. |
Mac::CoreMIDI::Entity - Encapsulates a CoreMIDI Entity
my $dev = $self->GetParent()Returns parent device for this entity.
my @src = $self->GetSources()Returns a list of source endpoints for this entity.
my $n = $self->GetNumberOfSources()Returns the number of sources.
my $src = $self->GetSource($i)Returns the $i'th source (starting from 0).
my @dest = $self->GetDestinations()Returns a list of destination endpoints for this entity.
my $n = $self->GetNumberOfDestinations()Returns the number of destinations.
my $dest = $self->GetDestination($i)Returns the $i'th destination (starting from 0).
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::Entity; use 5.006; use strict; use warnings; use base qw(Mac::CoreMIDI::Object); our $VERSION = '0.03'; sub GetSources { my ($self) = @_; my $numSources = $self->GetNumberOfSources(); my @sources = map { $self->GetSource($_) } 0..$numSources-1; return @sources; } sub GetDestinations { my ($self) = @_; my $numDestinations = $self->GetNumberOfDestinations(); my @destination = map { $self->GetDestination($_) } 0..$numDestinations-1; return @destination; } 1; __END__