• 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: AUInstrumentBase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AUInstrumentBase


  • Subject: Re: AUInstrumentBase
  • From: philippe wicker <email@hidden>
  • Date: Thu, 9 Mar 2006 09:12:20 +0100


On Mar 9, 2006, at 5:00 AM, James McCartney wrote:


On Mar 5, 2006, at 6:17 AM, philippe wicker wrote:

FindMostQuietNote may return a NULL pointer and then GetAFreeNote crashes. Anyway, I had to change it because my stealing algorithm includes some characteristics that obliged me to manage it at the AU level and not at the group level.

I don't think this is possible. Here's the code:

			if (group->mNoteList[i].NotEmpty()) {
				SynthNote *note = group->mNoteList[i].FindMostQuietNote();
...

If the note list is not empty (it has at least one note on it) then there must exist a most quiet note among those notes.

GetAFreeNote will always return a free note because:
We assume there are a non-zero total number of notes divided among various states.
If there is a note in the free state, just return it.
Otherwise we go through the various playing note states in order of decreasing desirability for stealing.
(fast released, released, released but sustained, released but sostenutoed, sostenutoed, attacked)
If the free list was empty, one of these states must have at least one note in it.
We steal the quietest note from the first non-empty list.

Yes you're right. I made a fast - too fast - reading of the code and misunderstood it. Apologize for that.



--- james mccartney -- apple coreaudio



_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >AUInstrumentBase (From: "Michael A. Thompson" <email@hidden>)
 >Re: AUInstrumentBase (From: philippe wicker <email@hidden>)
 >Re: AUInstrumentBase (From: James McCartney <email@hidden>)

  • Prev by Date: Re: [coreAudio] Detecting corrupted files
  • Next by Date: Re: [coreAudio] Detecting corrupted files
  • Previous by thread: Re: AUInstrumentBase
  • Next by thread: When has playback finished?
  • Index(es):
    • Date
    • Thread