• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Stuck notes in Rax and Synthtest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Stuck notes in Rax and Synthtest


  • Subject: RE: Stuck notes in Rax and Synthtest
  • From: "Yasir Assam" <email@hidden>
  • Date: Thu, 8 May 2003 18:09:35 +1000

I've just had a look at the AudioUnits docs and I think I might have seen
where this could be done.

Do I need to use the RenderNotify callback mechanism? I.E. I'd request a
notify callback before and after the DLSMusicDevice does its rendering, and
it's in this callback that I lock/unlock mutex. Is this correct?

Also, do I have to lock/unlock mutex for each AU in the AUGraph, or only the
DLSMusicDevice? Specifically, I have a simple graph - the DLSMusicDevice
connected to the default output AU.

Thanks,
Yasir Assam

> -----Original Message-----
> From: email@hidden
> [mailto:email@hidden]On Behalf Of Yasir Assam
> Sent: Thursday, 8 May 2003 5:09 PM
> To: email@hidden
> Subject: RE: Stuck notes in Rax and Synthtest
>
>
> I'm getting stuck notes playing the DLSMusicDevice. It sounds
> like it might
> be same thing.
>
> How can I use a mutex to block my MIDI playback thread while the
> DLSMusicDevice is doing its thing? I've probably not understood
> this right,
> but when you use a mutex both threads need to call pthread_mutex_lock() on
> the same pthread_mutex_t variable don't they? This would mean both my MIDI
> playback code and the DLSMusicDevice would have to use the same
> pthread_mutex_t, and as the DLSMusicDevice code is hidden from me
> I can't do
> this. Have I understood this right?
>
> My question really is, how can I block my MIDI playback thread
> from calling
> MusicDeviceMIDIEvent() whilst the DLSMusicDevice is in a state where it
> *cannot* receive MIDI events?
>
> Thanks,
>
> Yasir Assam
>
>
>
> > -----Original Message-----
> > From: email@hidden
> > [mailto:email@hidden]On Behalf Of Angus F.
> > Hewlett
> > Sent: Wednesday, 7 May 2003 3:47 AM
> > To: Robert Grant
> > Cc: email@hidden
> > Subject: Re: Stuck notes in Rax and Synthtest
> >
> >
> > 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.
> _______________________________________________
> 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.
_______________________________________________
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.

  • Follow-Ups:
    • RE: Stuck notes in Rax and Synthtest
      • From: Chris Rogers <email@hidden>
References: 
 >RE: Stuck notes in Rax and Synthtest (From: "Yasir Assam" <email@hidden>)

  • Prev by Date: RE: Stuck notes in Rax and Synthtest
  • Next by Date: Re: Stuck notes in Rax and Synthtest
  • Previous by thread: Re: Stuck notes in Rax and Synthtest
  • Next by thread: RE: Stuck notes in Rax and Synthtest
  • Index(es):
    • Date
    • Thread