| Mac-CoreMIDI documentation | Contained in the Mac-CoreMIDI distribution. |
Mac::CoreMIDI::Client - Encapsulates a CoreMIDI Client
use Mac::CoreMIDI;
my $c = MyClient->new(name => 'My Perl MIDI Application');
Mac::CoreMIDI::RunLoopRun();
package MyClient;
use base qw(Mac::CoreMIDI::Client);
sub Update {
# do something here
}
my $client = Mac::CoreMIDI::Client-new(name => '...')>Creates a new client object.
$client->CreateDestination($name, $callback)Creates a destination object for this client.
$self->Update()Is called by Mac OS X when CoreMIDI devices are updated.
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::Client; use 5.006; use strict; use warnings; use base qw(Mac::CoreMIDI::Object); our $VERSION = '0.03'; sub new { my $class = shift; my %args = @_; $args{name} ||= 'Mac::CoreMIDI::Client'; my $self = _new($class, $args{name}, $args{callback}); return $self; } sub _DESTROY { _destroy(shift); } 1; __END__