• 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: Herbie Robinson <email@hidden>
  • Date: Mon, 1 Aug 2005 03:31:52 -0400

I've been using the AudioConverter (10.3.9 with Quick Time 7) and I have it running for a few file types, but I'm having trouble with

It's working fine on PCM and MP3, but I am having trouble with FormatID 0x76647661 (kAudioFormatVariableDurationDVAudio).

Quicktime kQTSoundDescriptionPropertyID_AudioStreamBasicDescription gives me an ASBD with the sample rate at 48K, format id 0x76647661, bytes per packet of 120K, channels per frame 2 and everything else zeroed.

Quicktime delivers a progression of 120K packets containing 1600 or 1602 samples totaling 8008 samples every 5th buffer; so, that seems to be doing the right thing (aside from the ugliness of having to read the entire video frame to get the audio...).

The catch is that every time I ask for 8008 samples from the AudioConverter, it asks Quicktime for 15 packets, not 5. After a very short period of time, the AudioConverter gives up and returns kAudioConverterErr_InvalidInputSize -- Not surprising, considering it is putting more stuff into its buffer than it is taking out!

I've gone to a good bit of trouble to always call AudioConverterFillComplexBuffer with a number of samples that is the SCM with the frame rate to make sure I don't hit any bugs where the audio converter has to hang onto things between calls and that didn't help.

kQTSoundDescriptionPropertyID_MagicCookie didn't return a magic cookie for this conversion, but probably doesn't need to.

Questions:

Is this supposed to work in 10.3.9?

10.4.1?

Is kQTSoundDescriptionPropertyID_MagicCookie the right thing to use to get a magic cookie for the AudioConverter? The reason i ask is that QT does return a magic cookie for PCM, but the AudioConverter doesn't accept it?


Also, a minor problem I noticed is that

kAudioConverterPropertyCalculateOutputBufferSize

returns no noErr status and a size of zero for a common PCM streams. I got this both using Quicktime I/O and AudioFileReadPackets.

The avoidance it pretty trivial, just treat a size of zero as a if one got an error code, but I suspect this isn't intentional.
--
-*****************************************
** http://www.curbside-recording.com/ **
******************************************
_______________________________________________
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
  • Next by Date: Re: Creating Aggregate Devices programmatically
  • Next by thread: Re: Creating Aggregate Devices programmatically
  • Index(es):
    • Date
    • Thread