• 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
SoundComponentData to AudioStreamBasicDescription
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SoundComponentData to AudioStreamBasicDescription


  • Subject: SoundComponentData to AudioStreamBasicDescription
  • From: Lieven Dekeyser <email@hidden>
  • Date: Wed, 16 Jan 2002 01:55:51 +0100 (CET)

Hi!

I use QuickTime's SoundConverter API to convert sound files to Float32
format. To set the SoundConverter's output format, the structure
SoundComponentData is used. Now I'd like to be able to set the
AudioStreamBasicDescription of my destination AudioUnit to the exact same
format, but It seems to me that SoundComponentData is less specific than
AudioStreamBasicDescription.

does anyone know what mBytesPerPacket, mBytesPerFrame, mChannelsPerFrame
and mBitsPerChannel should be in the AudioStreamBasicDescription with the
output format of the SoundConverter set to:

SoundComponentData outputFormat = {
kExtendedSoundData, // flags
kFloat32Format, // format
2, // numChannels
32, // sampleSize
rate44khz, // sampleRate
0, // sampleCount
0, // buffer
0 // reserved
};

It works perfectly when I copy the converted buffers in the default output
AudioDevice's IOProc with the kAudioDevicePropertyBufferSize set to the
size of the converted buffers, but I'd like to use them in an AudioUnit's
InputCallback, and as there's no BufferSize property for AudioUnits...

thanks,

--Lieven


  • Follow-Ups:
    • Re: SoundComponentData to AudioStreamBasicDescription
      • From: Bill Stewart <email@hidden>
  • Prev by Date: RE: Setting Sample Rates
  • Next by Date: Re: SoundComponentData to AudioStreamBasicDescription
  • Previous by thread: Re: Formats ?
  • Next by thread: Re: SoundComponentData to AudioStreamBasicDescription
  • Index(es):
    • Date
    • Thread