• 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: canonical audio format on mac osx 10.8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: canonical audio format on mac osx 10.8


  • Subject: Re: canonical audio format on mac osx 10.8
  • From: Chris Adamson <email@hidden>
  • Date: Thu, 01 Nov 2012 14:08:54 -0400

If mBitsPerChannel == 32, and mChannelsPerFrame = 2, then I think mBytesPerFrame should be 8. Same for mBytesPerPacket.

-Chris

On Nov 1, 2012, at 1:34 PM, Joel Reymont <email@hidden> wrote:

> I keep getting the 'fmt?' error from the following code on the Mac.
>
> What am I doing wrong?
>
>    Thanks, Joel
>
> P.S. I'm actually getting 4096 x 2 (channels) samples at a time over
> the network but that's another story.
>
> ---
> OSStatus OpenAudioFile(ExtAudioFileRef& file)
> {
>  AudioStreamBasicDescription desc{};
>
>  desc.mSampleRate = 131072;
>  desc.mFormatID = kAudioFormatLinearPCM;
>  desc.mFormatFlags = kAudioFormatFlagIsFloat
>    | kAudioFormatFlagsNativeEndian
>    | kAudioFormatFlagIsPacked
>    | kAudioFormatFlagIsNonInterleaved;
>  desc.mBytesPerPacket = 4;
>  desc.mFramesPerPacket = 1;
>  desc.mBitsPerChannel = 32;
>  desc.mBytesPerFrame = 4;
>  desc.mChannelsPerFrame = 2;
>
>  AudioChannelLayout layout{};
>  layout.mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelBitmap;
>  layout.mChannelBitmap = kAudioChannelBit_Left | kAudioChannelBit_Right;
>  // layout.mNumberChannelDescriptions = 0;
>
>  //FillOutASBDForLPCM(desc, 131072, 2, 32, 32, true, false, true);
>  CFStringRef ref;
>  ref = CFStringCreateWithCString(kCFAllocatorDefault,
>                                  "/tmp/lanxi.caff",
>                                  kCFStringEncodingUTF8);
>  CFURLRef destinationURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,
>                                                          ref,
>                                                          kCFURLPOSIXPathStyle,
>                                                          false);
>  return ExtAudioFileCreateWithURL(destinationURL,
>                                   kAudioFileCAFType,
>                                   &desc,
>                                   &layout,
>                                   kAudioFileFlags_EraseFile,
>                                   &file);
>  //ExtAudioFileWrite(file, mNumberFrames, inBL);
> }
>
> --------------------------------------------------------------------------
> for hire: mac osx device driver ninja. kernel, usb and coreaudio drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
> _______________________________________________
> 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: canonical audio format on mac osx 10.8
      • From: Joel Reymont <email@hidden>
    • Re: canonical audio format on mac osx 10.8
      • From: Joel Reymont <email@hidden>
References: 
 >canonical audio format on mac osx 10.8 (From: Joel Reymont <email@hidden>)

  • Prev by Date: canonical audio format on mac osx 10.8
  • Next by Date: RemoteIO and AAC recording
  • Previous by thread: canonical audio format on mac osx 10.8
  • Next by thread: Re: canonical audio format on mac osx 10.8
  • Index(es):
    • Date
    • Thread