Re: Calculating size for MIDIPacketListAdd
Re: Calculating size for MIDIPacketListAdd
- Subject: Re: Calculating size for MIDIPacketListAdd
- From: Craig Bakalian <email@hidden>
- Date: Thu, 19 Sep 2002 05:24:37 -0400
Hi Robert,
public void execute(MIDIInputPort port, MIDIEndpoint dest,
MIDIPacketList list){
for(int i = 0; i < list.numPackets(); i++){
MIDIPacket packet = list.getPacket(i);
processMIDIEvent(port, dest, packet.getData(),
(packet.getTimeStamp() - startTime), list);
}
}
Is similar to what you are doing. Just use numPackets(); in a set
statement. It is getting them back out that is the trick, unless I
don't know something I should. Do you know of a more simple way that
creating a thread, or using a timer? I mean, in java.sound.midi you
just add them to a track, add the track to a sequence, set the sequence
to a sequencer and bam.
On Thursday, September 19, 2002, at 01:01 AM,
email@hidden wrote:
>
Date: Wed, 18 Sep 2002 21:50:49 -0400
>
Subject: Calculating size for MIDIPacketListAdd
>
From: email@hidden
>
To: CoreAudio API <email@hidden>
>
>
I'm trying to add a packet to a MIDIPacketList but the function needs
>
to know
>
the length of the packet list to which I'm trying to add.
>
>
Why can't the add function figure this out for itself (the calculation
>
doesn't look easy)?
>
>
And if it can't - what is the calculation?
>
>
Finally can/should I even be trying to modify the PacketList that came
>
into my read proc? I know it's const but the examples cast it away :-)
>
>
Would it be better to create my own packet list and copy the data into
>
there? But then
>
there's no nice dispose function to throw it away...
>
>
Thanks for any help - and hey we haven't had enough MIDI questions on
>
this list :-)
>
>
Robert.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.