• 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
Getting the Source Names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting the Source Names


  • Subject: Getting the Source Names
  • From: Robert Penland <email@hidden>
  • Date: Thu, 10 Apr 2003 11:12:28 -0700

Can anybody tell me what the proper parameter list is for getting the data
source names using kAudioDevicePropertyDataSourceNameForIDCFString in a
AudioDeviceGetProperty call? What little documentation that I have found
says that the input parameter should be the source ID (which you get with
another call) and the output parameter should be a CFStringRef. The code I
am using is as follows:

CFMutableStringRef theEntryName;
theEntryName = CFStringCreateMutable(NULL,
255);
UInt32 numEntries;
// this finds out the size of the DataSource
ID array
err =
AudioDeviceGetPropertyInfo(theBuiltInID,0,true,kAudioDevicePropertyDataSourc
es,&thePropSize,&isWritable);
numEntries = thePropSize/sizeof(UInt32);
UInt32 *theEntries;
theEntries = (UInt32 *) malloc(thePropSize);
// this gets the array of DataSource ID's
err =
AudioDeviceGetProperty(theBuiltInID,0,true,kAudioDevicePropertyDataSources,&
thePropSize,theEntries);
for(j=0;j < numEntries;j++)
{
err =
AudioDeviceGetProperty(theBuiltInID,0,true,kAudioDevicePropertyDataSourceNam
eForIDCFString,theEntries[j],theEntryName);
}


Everything works and returns values that I would expect up until the
kAudioDevicePropertyDataSourceNameForIDCFString call, where I get a
EXC_BAD_ACCESS error.

I've tried passing pointer to parameters as well, with the same results.

Any ideas.

Thanks,
Rob
_______________________________________________
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: Getting the Source Names
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Sample Code kextunload error
  • Next by Date: Re:Getting the Source Names
  • Previous by thread: Re: Sample Code kextunload error
  • Next by thread: Re: Getting the Source Names
  • Index(es):
    • Date
    • Thread