Re: Stuck notes in Rax and Synthtest
Re: Stuck notes in Rax and Synthtest
- Subject: Re: Stuck notes in Rax and Synthtest
- From: "Angus F. Hewlett" <email@hidden>
- Date: Tue, 06 May 2003 18:46:47 +0100
It's OK, found it - was threading-related. Needed to put a mutex to pause
delivery of MIDI events to my plug's buffer while Render() was doing its
thing.
At 01:41 PM 5/6/2003 -0400, Robert Grant wrote:
>
Hi Angus,
>
>
I wouldn't put it past Rax to cock up some of the MIDI message
>
handling. I've just taken a look and this is the loop for passing
>
messages to the music device:
>
>
for ( j = 0; j < list->numPackets; ++j) {
>
Byte* msg = inPacket->data;
>
do {
>
if ((msg[0] & 0xF) == m_channel) {
>
MusicDeviceMIDIEvent(unit, msg[0],
>
msg[1], msg[2], 0);
>
if (msg[0] >> 4 == 0x09 && msg[2] > 0) noteOn = TRUE;
>
}
>
} while(msg = NextMIDIEvent(inPacket, msg));
>
>
inPacket = MIDIPacketNext(inPacket);
>
}
>
>
This is probably very wrong but this code is called in the MIDIReadProc
>
thread.
>
>
Robert.
>
>
>
On Tuesday, May 6, 2003, at 11:22 AM, Angus F. Hewlett wrote:
>
>
> Hi all,
>
>
>
> Am seeing a problem in these AU hosts relating to my MIDI handling
>
> routines.
>
>
>
> In Rax and Synthtest, we are seeing frequent, easily-reproducible stuck
>
> notes when played from a MIDI keyboard. The MIDI data handling
>
> routines in
>
> my code look to be OK, so I'm wondering if it might be threading
>
> related.
>
> Are there any special precautions I need to take in the MIDI routines
>
> for a
>
> MusicDevice?
>
>
>
> Regards,
>
> Angus.
>
> =======================================================
>
> Angus F. Hewlett, Technical Director
>
> FXpansion Audio UK Ltd - http://www.fxpansion.com
>
> =======================================================
>
> _______________________________________________
>
> 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.
>
>
=======================================================
Angus F. Hewlett, Technical Director
FXpansion Audio UK Ltd -
http://www.fxpansion.com
=======================================================
_______________________________________________
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.