• 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: AudioQueueNewOutput error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioQueueNewOutput error


  • Subject: Re: AudioQueueNewOutput error
  • From: Brian Whitman <email@hidden>
  • Date: Wed, 30 Apr 2008 10:51:40 -0400


On Apr 30, 2008, at 8:10 AM, Roland Silver wrote:
The fields of ASBDesc are set by initASBDesc():


ASBDesc.mSampleRate = consts.SampleRate; //consts.SampleRate = 44100.0

	ASBDesc.mFormatID = kAudioFormatLinearPCM;

	ASBDesc.mFormatFlags = kAudioFormatFlagsNativeFloatPacked;

	ASBDesc.mBytesPerFrame =

consts.channelsPerFrame * consts.valuesPerChannel * consts.bytesPerValue;

		//mBytesPerFrame = 16

	ASBDesc.mFramesPerPacket = consts.framesPerPacket; //1

	ASBDesc.mChannelsPerFrame = consts.channelsPerFrame; //2

	ASBDesc.mBitsPerChannel =

		consts.valuesPerChannel * consts.bytesPerValue * consts.bitsPerByte;

		//mBitsPerChannel = 64




You're missing mBytesPerPacket (which == mBytesPerFrame for PCM)
And I really don't think you mean to have 64 bits per channel. For a Float type that should be 32 (and then bytesPerFrame should be modified accordingly.) What is consts.valuesPerChannel mean?



_______________________________________________ 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
  • Prev by Date: Re: Property Listener kAudioQueueProperty_CurrentLevelMeterDB
  • Next by Date: Re: AudioQueueNewOutput error
  • Previous by thread: Re: Property Listener kAudioQueueProperty_CurrentLevelMeterDB
  • Next by thread: Re: AudioQueueNewOutput error
  • Index(es):
    • Date
    • Thread