• 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: newBe Question about buffers...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newBe Question about buffers...


  • Subject: Re: newBe Question about buffers...
  • From: R <email@hidden>
  • Date: Sat, 29 Dec 2012 23:25:07 -0700

Let me ask this a different way…

Listed below is the Canonical ASBD for streams between audio units in OSX.

How can I have 32 bits per channel and also have 4 bytes per frame/packet?  I would think there would be 8 bytes per frame for 2channel audio.

mSampleRate	Float64	44100
mFormatID	UInt32	1819304813
mFormatFlags	UInt32	41
mBytesPerPacket	UInt32	4
mFramesPerPacket	UInt32	1
mBytesPerFrame	UInt32	4
mChannelsPerFrame	UInt32	2
mBitsPerChannel	UInt32	32
mReserved	UInt32	0





On Dec 29, 2012, at 7:31 PM, R wrote:

>
> This question will be basic to most, but it has been bothering me for awhile.  It has to do with buffers and floats.
>
> I want to size a buffer.
>
> The ASBD of the stream I'm dealing with is a follows:
>
> - Linear PCM
> - mFormatFlags=41, kAudioFormatFlagIsFloat, IsPacked, IsNoninterleaved
> - 2 channels per frame
> - 4 bytes per frame
>
> Since the stream in nonInterleaved, I will need to have a mBuffers[0] and mBuffers[1] in by BufferList struct
>
> I assume that I have 2 bytes for each channel (4 bytes per frame / 2)
>
> Here is my question:
>
> For kAudioFormatFlagIsSignedInteger, I size each buffer for an UInt16 (2 bytes = 16 bits)
>
> But, for kAudioFormtFlagIsFloat, there is no such thing as a Float16.  I have to size each channel for a Float32 (32 bits of space).
>
> Here is my question, is the data value for each channel taking up only 16 bits of float data, but I have to size the buffer for Float32 and just assume wasted space?
>
> Thanks for your help and patience -- Ron
>
> å
>


 _______________________________________________
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: newBe Question about buffers...
      • From: Ishay Tubi <email@hidden>
References: 
 >newBe Question about buffers... (From: R <email@hidden>)

  • Prev by Date: Re: AUSampler kAudioUnitProperty_ClassInfo error -43 on iOS
  • Next by Date: Re: newBe Question about buffers...
  • Previous by thread: newBe Question about buffers...
  • Next by thread: Re: newBe Question about buffers...
  • Index(es):
    • Date
    • Thread