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

Clock Sources


  • Subject: Clock Sources
  • From: Jeremy Sagan <email@hidden>
  • Date: Fri, 14 Jul 2006 14:45:18 -0400

I am trying to get Clock Sources to show up in a popup menu. Everything works until I call AudioDeviceGetproperty with kAudioDevicePropertyClockSourceNameForIDCFString. At that time the array of data in clockSources gets trashed and the error returned is "!siz". The memory trashing makes no sense considering it is the input for the audiovaluetranslation. Also I cannot figure out what is wrong with my sizes here.

Any help appreciated!

Here is my code:

audioErr = AudioDeviceGetPropertyInfo(theID , 0 /*MasterChannel */,
true, kAudioDevicePropertyClockSources, &outputSize, &isWriteable);
if (audioErr == noErr)
clockSources = (UInt32 *) NewPtr (outputSize);
if (clockSources)
{
long numOfClockSources, index;

audioErr = AudioDeviceGetProperty(theID, 0,
true, kAudioDevicePropertyClockSources, &outputSize, clockSources);
if (audioErr == noErr)
{
numOfClockSources = outputSize / sizeof(UInt32);
SetControlMaximum(thePopup, numOfClockSources + 1);
for (index = 0; index < numOfClockSources; index++)
{
AudioValueTranslation avt;
CFStringRef outStringRef = NULL;

avt.mInputData = &clockSources[index];
avt.mInputDataSize = sizeof(UInt32);
avt.mOutputData = &outStringRef;
avt.mOutputDataSize = sizeof(outStringRef);
outputSize = sizeof(avt);
audioErr = AudioDeviceGetProperty(theID, 0,
true, kAudioDevicePropertyClockSourceNameForIDCFString, &outputSize, clockSources); //returns a !siz error and trashes clocksources
...
}
}
}


Jeremy Sagan
Sagan Technology
www.sagantech.biz



_______________________________________________
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: Clock Sources
      • From: "B.J. Buchalter" <email@hidden>
  • Prev by Date: Re: N-M processing again (sorry)
  • Next by Date: Re: Clock Sources
  • Previous by thread: AUMixer3dTest UI
  • Next by thread: Re: Clock Sources
  • Index(es):
    • Date
    • Thread