• 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
AudioConverterNew() failure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioConverterNew() failure


  • Subject: AudioConverterNew() failure
  • From: "Andreas Falkenhahn" <email@hidden>
  • Date: Sun, 26 Aug 2007 13:08:02 +0200

Hi,

could someone please tell me why AudioConverterNew() fails with these inputs?
It returns 'fmt?' but I really don't see the problem here. I can successfully convert
any 8-bit encoded data (mono & interleaved stereo) with the audio converter, but
as soon as I skip to 16-bits encodings the audio converter cannot be created!?

// this is the output format
asbd.mFormatID = kAudioFormatLinearPCM;
asbd.mFormatFlags = kAudioFormatFlagsNativeFloatPacked | kAudioFormatFlagIsNonInterleaved;
asbd.mChannelsPerFrame = 2;
asbd.mSampleRate = 44100;
asbd.mBitsPerChannel = 32;
asbd.mFramesPerPacket = 1;
asbd.mBytesPerFrame = sizeof(Float32);
asbd.mBytesPerPacket = sizeof(Float32);

// this is the input format (16 bits, mono; but 16 bit interleaved stereo doesn't work either)
desc.mFormatID = kAudioFormatLinearPCM;
desc.mFormatFlags = 0;
desc.mChannelsPerFrame = 1;
desc.mSampleRate = 13964;
desc.mBitsPerChannel = 16;
desc.mFramesPerPacket = 1;
desc.mBytesPerFrame = 2;
desc.mBytesPerPacket = 2;

res = AudioConverterNew(&desc, &asbd, &converter);

res will be 'fmt?' and converter will be NULL. Why?

Tks

Andreas

 _______________________________________________
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: AudioConverterNew() failure
      • From: William Stewart <email@hidden>
    • Re: AudioConverterNew() failure
      • From: "Andreas Falkenhahn" <email@hidden>
  • Prev by Date: Re: Playing multiple sounds
  • Next by Date: Re: AudioConverterNew() failure
  • Previous by thread: Re: Playing multiple sounds
  • Next by thread: Re: AudioConverterNew() failure
  • Index(es):
    • Date
    • Thread