• 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: AudioConverter format not supported error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioConverter format not supported error


  • Subject: Re: AudioConverter format not supported error
  • From: "Mark's Studio" <email@hidden>
  • Date: Wed, 13 Aug 2003 20:42:37 +0200

I use this, i have not checked it with all the different formats but it
works with aiff 16bit mono and stereo files.

localFormat.mSampleRate = mFileDescription.mSampleRate;
localFormat.mFormatID = kAudioFormatLinearPCM;
localFormat.mFormatFlags = kAudioFormatFlagIsBigEndian
| kAudioFormatFlagIsFloat;
localFormat.mBytesPerPacket = 4 *
mFileDescription.mChannelsPerFrame;
localFormat.mFramesPerPacket = 1;
localFormat.mBytesPerFrame = 4 *
mFileDescription.mChannelsPerFrame;
localFormat.mChannelsPerFrame =
mFileDescription.mChannelsPerFrame;
localFormat.mBitsPerChannel = 32;

On 13. august 2003, at 20:05PM, Robert Grant wrote:

> I'm delving into the realm of AudioFiles and AudioConverters because
> QuickTime's AIFF support stops short at 48000 Hz and 16 bits.
>
> So I'm trying to build an AudioConverter that'll take a
> non-interleaved 32 bit float stereo buffer and convert it into
> interleaved 16 bit integer stereo.
>
> Trouble is I'm getting a 'fmt?' error but I'm not sure which format is
> causing trouble. Of course my ignorance is a major factor :-)
>
> Here are the two ASBDs:
>
> sampleRate = 44100; // I want to support various sample rates
> bitDepth = 16; // I want to support 24 bits too.
>
> The AIFF format:
> AudioStreamBasicDescription inFormat;
> inFormat.mSampleRate = sampleRate;
> inFormat.mFormatID = kAudioFormatLinearPCM;
> inFormat.mFormatFlags = kLinearPCMFormatFlagIsBigEndian;
> inFormat.mBytesPerPacket = 2 * (bitDepth / 8);
> inFormat.mFramesPerPacket = 1;
> inFormat.mBytesPerFrame = 2 * (bitDepth / 8);
> inFormat.mChannelsPerFrame = 2;
> inFormat.mBitsPerChannel = bitDepth;
>
> The Float format:
> AudioStreamBasicDescription rwFormat;
> rwFormat.mSampleRate = sampleRate;
> rwFormat.mFormatID = kAudioFormatLinearPCM;
> rwFormat.mFormatFlags = kLinearPCMFormatFlagIsNonInterleaved |
> kLinearPCMFormatFlagIsFloat;
> rwFormat.mBytesPerPacket = 4;
> rwFormat.mFramesPerPacket = 1;
> rwFormat.mBytesPerFrame = 4;
> rwFormat.mChannelsPerFrame = 2;
> rwFormat.mBitsPerChannel = 32;
>
>
> Create a new audio converter with these formats gets me a 'fmt?' error.
>
> Thanks,
>
> Robert.
> _______________________________________________
> coreaudio-api mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/coreaudio-api
> Do not post admin requests to the list. They will be ignored.
>
>
Peter Mark

Mark's Recording Studio A/S
Lundeskovsvej 3
2900 Hellerup
Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: AudioConverter format not supported error
      • From: Brad Ford <email@hidden>
References: 
 >AudioConverter format not supported error (From: Robert Grant <email@hidden>)

  • Prev by Date: other AU parameter suggestions
  • Next by Date: Re: AudioConverter format not supported error
  • Previous by thread: AudioConverter format not supported error
  • Next by thread: Re: AudioConverter format not supported error
  • Index(es):
    • Date
    • Thread