• 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: AVAudioFormat Standard format with Core Audio AudioGraph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AVAudioFormat Standard format with Core Audio AudioGraph


  • Subject: Re: AVAudioFormat Standard format with Core Audio AudioGraph
  • From: John Joyce <email@hidden>
  • Date: Tue, 27 Jan 2015 15:42:08 +0900

AVAudioFormat is a pretty simple class and very convenient.

"Standard Format” is what they want you to use going forward, which is from the docs:
deinterleaved native-endian float (AVAudioPCMFormatFloat32)

Use either 

initStandardFormatWithSampleRate:channelLayout:

or 

initStandardFormatWithSampleRate:channels:

The initWithCommonFormat:… methods provide for using a few other common presets.
Otherwise you’d need the dictionary approach.

To get an ASBD just call the method streamDescription 
Other details can be retrieved as easily.

You can also create an AVAudioFormat object from an ASBD.

initWithStreamDescription:

Then it’s very easy to introspect it.

In this way, it’s really easy to add this to your code.


On Jan 10, 2015, at 12:38 AM, Robert Carroll <email@hidden> wrote:

Hi,

At the tail end of WWDC 2014 session 501, Doug Wyatt mentions in passing that these new classes can be integrated into existing core audio code. Has anyone found any examples/ documentation on how to accomplish this?

iOS 8 has broken the audio output of my audiograph code. I assume its has something to do with the deprecated audiosampletype and audiounitsampletype. On Mac OS I’ve changed these references to Float 32 and everything works as expected. For iOS 7 and earlier float 32 resulted in dangerous full volume white noise output. I found that Sint 32 worked, but apparently not for iOS8.

The developer session states that there is now a common audio format between OS X and iOS, so hopefully Float 32 with the same flags I’m using for Mac will solve the iOS 8 problem, but will require more branching code to continue to support iOS 6 - 7.

thanks,

rob


Robert Carroll
RSM Records
Toronto
http://www.rsmrecords.com


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: 
 >AVAudioFormat Standard format with Core Audio AudioGraph (From: Robert Carroll <email@hidden>)

  • Prev by Date: Re: Sub Categories For Company Audio Units
  • Next by Date: newbie asking what's OK to do on realtime audio thread
  • Previous by thread: Re: AVAudioFormat Standard format with Core Audio AudioGraph
  • Next by thread: Re: AVAudioFormat Standard format with Core Audio AudioGraph
  • Index(es):
    • Date
    • Thread