• 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: ExtAudioFile format conversion (iPhone OS)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ExtAudioFile format conversion (iPhone OS)


  • Subject: Re: ExtAudioFile format conversion (iPhone OS)
  • From: William Stewart <email@hidden>
  • Date: Mon, 9 Feb 2009 10:31:22 -0800

560226676 is !dat

which is an audio format unsupported error as well - have you memset the convertedStreamDesc to 0 first?

On Feb 8, 2009, at 6:39 AM, Chris Adamson wrote:

I'm working on understanding just what I can do with Audio Conversion Services on the iPhone, so I took an Audio Queue Services app that records the user in 44.1 KHz and tried to add a method to use an extended audio file to convert formats.

My conversion routine is heavily based on the UseExtAF class in the ConvertFile example in the CoreAudio SDK, and I'm trying to convert to Apple Lossless, which I thought would work because I can use 44.1 KHz Lossless as an ASBD for recording, and it works great.

What I'm seeing is that when I try to fill out the ASBD for the output:

	convertedStreamDesc.mSampleRate = 44100.0;
	convertedStreamDesc.mFormatID = kAudioFormatAppleLossless;
	convertedStreamDesc.mChannelsPerFrame = 1;

// try to fill out this asbd
UInt32 convertedStreamDescSize = sizeof (convertedStreamDesc);
conversionErr =
AudioFormatGetProperty(kAudioFormatProperty_FormatInfo, // inProperrtyId
0, // inSpecifierSize
NULL, // inSpecifier
&convertedStreamDescSize, // ioPropertyDataSize
&convertedStreamDesc); // outPropertyData
if (conversionErr != noErr) {
[self failTo: @"AudioFormatGetProperty" withOSStatus: conversionErr];
return;
}


I fail at to get the property, with kAudioDeviceUnsupportedFormatError:
Error in AudioFormatGetProperty: Error Domain=NSOSStatusErrorDomain Code=560226676 "Operation could not be completed. (OSStatus error 560226676.)"


Is there something else I need to do to set up the ASBD? When I used lossless for recording, I only set these three parameters (formatter, channels, sample rate) and it was fine. Or am I just doing it wrong?

Thanks in advance for any suggestions.

--Chris

_______________________________________________
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: ExtAudioFile format conversion (iPhone OS)
      • From: Chris Adamson <email@hidden>
References: 
 >ExtAudioFile format conversion (iPhone OS) (From: Chris Adamson <email@hidden>)

  • Prev by Date: Re: iPhone feedback problem
  • Next by Date: Re: Sound from scratch
  • Previous by thread: ExtAudioFile format conversion (iPhone OS)
  • Next by thread: Re: ExtAudioFile format conversion (iPhone OS)
  • Index(es):
    • Date
    • Thread