• 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: Getting 'fmt?' error returns from AudioConverterNew ()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting 'fmt?' error returns from AudioConverterNew ()


  • Subject: Re: Getting 'fmt?' error returns from AudioConverterNew ()
  • From: "Kyle Sluder" <email@hidden>
  • Date: Mon, 5 Nov 2007 14:43:42 +0000

You're setting mFormatID to "aac " instead of 'aac '?  It compiles
because sizeof(int) == sizeof(char[4]).

--Kyle Sluder

On 11/5/07, Daniel Stenning <email@hidden> wrote:
> I am experimenting with using the CoreAudio audio converter to convert an
> aac stream to PCM. With the following settings I am getting 'fmt?' return
> errors.
>
>
> Anyone know what i'm doing wrong ?
>
> AudioStreamBasicDescription  ASIn;
> AudioStreamBasicDescription  ASOut;
>
>
>  ASIn.mBitsPerChannel = 0;
>  ASIn.mBytesPerFrame = 0;
>  ASIn.mBytesPerPacket = 0;
>  ASIn.mChannelsPerFrame= 1;
>  ASIn.mFormatFlags = kMP4Audio_AAC_LC_ObjectType;
>  ASIn.mFormatID = "aac ";
>  ASIn.mFramesPerPacket = 1024;
>  ASIn.mSampleRate = 44100;
>
>  ASOut.mBitsPerChannel = 16;
>  ASOut.mBytesPerFrame = 2;
>  ASOut.mBytesPerPacket =  1024;
>  ASOut.mChannelsPerFrame = 2;
>  ASOut.mFormatFlags = 3; // for float, big endian
>  ASOut.mFormatID = 'lpcm';
>  ASOut.mFramesPerPacket = 512;
>  ASOut.mSampleRate = 44100;
>
>
> AudioConverterRef conv;
>
>  UInt32 err = AudioConverterNew ( &ASIn, &ASOut, &conv );
>
> Regards,
>
> Dan
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users 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.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Getting 'fmt?' error returns from AudioConverterNew () (From: Daniel Stenning <email@hidden>)

  • Prev by Date: [OT] Radar and Data loss
  • Next by Date: RE: [OT] Radar and Data loss
  • Previous by thread: Getting 'fmt?' error returns from AudioConverterNew ()
  • Next by thread: Re: Getting 'fmt?' error returns from AudioConverterNew ()
  • Index(es):
    • Date
    • Thread