• 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
PCM "ExtAudioFileWrite" limited to Non-Interleaved?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PCM "ExtAudioFileWrite" limited to Non-Interleaved?


  • Subject: PCM "ExtAudioFileWrite" limited to Non-Interleaved?
  • From: Charles Constant <email@hidden>
  • Date: Sun, 16 Aug 2015 17:42:24 -0700

Hello CoreAudio people,

My app has a bunch of PCM float vectors in memory. I want to write them to disk as a single uncompressed file (CAF, AIFF, or Wave file). The output file on disk should be interleaved. Do I absolutely have to do this interleaving on my end? 

My code to attempt this is currently failing with "fmt?" when I try to set the Client ASBD. I'm pretty sure the flags are correct though [Float, Packed, NonInterleaved], and I filled out the rest of the ASBD for the total number of vectors.

I have two theories:
a) the only PCM support for writing ExtAudioFileWrite is for you to interleave vectors as a single mBuffer?
b) it is supported, but only if you set a valid AudioChannelLayout?

Does anyone know if it's possible?

Thanks,

Charles

PS:
As an aside, here's a snippet of how to create an AudioBufferList in Swift containing more than one mBuffer. Maybe it will save the next guy the pain:

var abl_ptr = AudioBufferList.allocate( maximumBuffers: buffers.count )
defer {
free( abl_ptr.unsafeMutablePointer )
}
for i in 0 ..< buffers.count {
abl_ptr[i] = buffers[i]
}
let abl = abl_ptr.unsafePointer.memory

 _______________________________________________
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

  • Prev by Date: mp3 stream -> uncompressed file??
  • Next by Date: Re: PCM "ExtAudioFileWrite" limited to Non-Interleaved? [Solved]
  • Previous by thread: mp3 stream -> uncompressed file??
  • Next by thread: Re: PCM "ExtAudioFileWrite" limited to Non-Interleaved? [Solved]
  • Index(es):
    • Date
    • Thread