• 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
AudioConverter problems...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioConverter problems...


  • Subject: AudioConverter problems...
  • From: email@hidden
  • Date: Wed, 16 Oct 2002 16:24:41 +0100

Hello,

I've started using the AudioConverter to translate between formats. I'm
getting the kAudioConverterErr_FormatNotSupported error using the code
below. This code doesn't error when done in reverse.

Any ideas? Thanks!

// now fill out the source description
sourceFormat.mSampleRate = 44100.0;
sourceFormat.mFormatID = kAudioFormatLinearPCM;
sourceFormat.mFormatFlags = kAudioFormatFlagIsBigEndian &
kAudioFormatFlagIsFloat;
sourceFormat.mBytesPerPacket = 4;
sourceFormat.mFramesPerPacket = 1;
sourceFormat.mBytesPerFrame = 8;
sourceFormat.mChannelsPerFrame = 2;
sourceFormat.mBitsPerChannel = 32;
// fill out our destination description
destinationFormat.mSampleRate = 44100.0;
destinationFormat.mFormatID = kAudioFormatLinearPCM;
destinationFormat.mFormatFlags =
kLinearPCMFormatFlagIsSignedInteger;
destinationFormat.mBytesPerPacket = 4;
destinationFormat.mFramesPerPacket = 1;
destinationFormat.mBytesPerFrame = 4;
destinationFormat.mChannelsPerFrame = 2;
destinationFormat.mBitsPerChannel = 16;

// make the audio converter
theResult = AudioConverterNew(&sourceFormat, &destinationFormat,
&audioConverter);
_______________________________________________
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.

References: 
 >Re: [OT] Bitmaps for controls (From: Urs Heckmann <email@hidden>)

  • Prev by Date: Re: HostCallback_GetBeatAndTempo howto?
  • Next by Date: Re: AudioConverter problems...
  • Previous by thread: Re: [OT] Bitmaps for controls
  • Next by thread: Re: [slightly OT] Bitmaps for controls
  • Index(es):
    • Date
    • Thread