• 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: Deprecated AudioStream functions...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deprecated AudioStream functions...


  • Subject: Re: Deprecated AudioStream functions...
  • From: John Allsup <email@hidden>
  • Date: Fri, 06 Jan 2012 18:21:35 +0000

Hi,

Thanks for your reply.

I'd worked the bit below from the sample code.  That gets an array of device ID's.

What I want to do is to change the sample format of a device's output (or input).  I guessed that one uses the AudioStream*Property family of functions, but these are now deprecated.  What do you use to get the sample format of an output device?  (And how do you get a list of available formats and choose from it?)

Thanks,

John

On 06/01/12 14:54, Daniel Tapie wrote:
Hi John,

This is what you need to call instead: a combination of AudioObjectGetPropertyDataSize and AudioObjectGetPropertyData.

    UInt32 propsize;
    AudioObjectPropertyAddress aopa;
    aopa.mSelector = kAudioHardwarePropertyDevices;
    aopa.mScope = kAudioObjectPropertyScopeGlobal;
    aopa.mElement = kAudioObjectPropertyElementMaster;
    verify_noerr(AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &aopa, 0, NULL, &propsize));

    

int nDevices = propsize / sizeof(AudioDeviceID);
AudioDeviceID *devids = new AudioDeviceID[nDevices];
    verify_noerr(AudioObjectGetPropertyData(kAudioObjectSystemObject, &aopa, 0, NULL, &propsize, devids));


Hope this helps !

Best regards,


Daniel Tapie


On 6 Jan 2012, at 15:36, John Allsup wrote:

Hi All,

Just rejoined this list after a long time doing things not involving
CoreAudio.

I note in Snow Leopard that the AudioStreamGetProperty function and
friends are deprecated.  What is the new way of dealing with audio devices?

I am trying to write a simple utility that changes a devices output bit
depth (since Snow Leopard has this nice way of defaulting my USB
monitors interface to 8bit when 16bit is available).  Can anybody
suggest the correct way of going about this?

Thanks,

John


_______________________________________________
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




 _______________________________________________
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

 _______________________________________________
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: Deprecated AudioStream functions...
      • From: Dave Fernandes <email@hidden>
References: 
 >Deprecated AudioStream functions... (From: John Allsup <email@hidden>)
 >Re: Deprecated AudioStream functions... (From: Daniel Tapie <email@hidden>)

  • Prev by Date: Re: Deprecated AudioStream functions...
  • Next by Date: Re: Deprecated AudioStream functions...
  • Previous by thread: Re: Deprecated AudioStream functions...
  • Next by thread: Re: Deprecated AudioStream functions...
  • Index(es):
    • Date
    • Thread