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

Re: SoundComponentData to AudioStreamBasicDescription


  • Subject: Re: SoundComponentData to AudioStreamBasicDescription
  • From: Bill Stewart <email@hidden>
  • Date: Tue, 15 Jan 2002 18:09:07 -0800

Why not use the AudioConverter - at least if you're just doing OS X that is
a better alternative..

There's an example of how to do int->float conversion using the
AudioConverter in /Developer/Examples/CoreAudio/DefaultOutput

Bill

on 15/1/02 4:55 PM, Lieven Dekeyser wrote:

> 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
> _______________________________________________
> 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.


mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"We'll talk about it later...."
"When?"
"In a future life when we're both cats"
__________________________________________________________________________


  • Follow-Ups:
    • Re: SoundComponentData to AudioStreamBasicDescription
      • From: Lieven Dekeyser <email@hidden>
References: 
 >SoundComponentData to AudioStreamBasicDescription (From: Lieven Dekeyser <email@hidden>)

  • Prev by Date: SoundComponentData to AudioStreamBasicDescription
  • Next by Date: Re: Setting Sample Rates
  • Previous by thread: SoundComponentData to AudioStreamBasicDescription
  • Next by thread: Re: SoundComponentData to AudioStreamBasicDescription
  • Index(es):
    • Date
    • Thread