• 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: Indexed Audio Unit Parameter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indexed Audio Unit Parameter


  • Subject: Re: Indexed Audio Unit Parameter
  • From: Chris Johnson <email@hidden>
  • Date: Sun, 13 Apr 2008 12:04:49 -0400


On Apr 13, 2008, at 2:42 AM, Chad Wagner wrote:

I'm having a problem with audio unit parameters whose "unit" is set to kAudioUnitParameterUnit_Indexed. Everything works when the indexed values start at 0 and I provide an array of value strings. But one of my indexed parameters has no value strings, which causes a bus error in auval, and another indexed parameter starts at 1 rather than 0, but auval seems to be looking for an extra value string as if they started at 0 (i.e. my range is 1 to 3, I provide an array with 3 strings, but auval is looking for a 4th). In all cases, changing the unit to generic makes the problem go away, as does leaving it as indexed but starting at 0 and providing an array of value strings...

e.g. one of the parameters is a MIDI channel, which should be an integer from 1 to 16. I don't want it to start at 0, and it seems absurd to have to specify an array of strings "1" to "16". Is there a better way?

I have a similar Indexed parameter in Classic Channel and I've just looked up what it was doing- turns out my range is 1 to 3 and I'm supplying static const int variables for the values, and static CFStringRef for the names in the popup... and in GetParameterValueStrings, it's making the array of value strings you mention. Then in GetParameterInfo I am supplying the const variables to mark what number means what selection, and my minValue is the const equal to one (as is kDefaultValue_ParamOne)...


This is puzzling me- I'm trying to figure out if I took the string labels out, would it break. It certainly appears that apart from the labels, I'm setting the range as 1 to 3 with default value as one and auval does not complain... perhaps it's odd, but if supplying an array of strings "1" to "16" makes the parameter handling more bulletproof, why not? It's useful to know that if you try to use indexed parameters (with no associated string array) that aren't from zero, there's a problem- thanks.

	Chris Johnson
	airwindows
_______________________________________________
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


  • Follow-Ups:
    • Re: Indexed Audio Unit Parameter
      • From: Chad Wagner <email@hidden>
References: 
 >Indexed Audio Unit Parameter (From: Chad Wagner <email@hidden>)

  • Prev by Date: Re: AUGraph Problem
  • Next by Date: Re: Indexed Audio Unit Parameter
  • Previous by thread: Indexed Audio Unit Parameter
  • Next by thread: Re: Indexed Audio Unit Parameter
  • Index(es):
    • Date
    • Thread