• 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: how do I change bitsperchannel value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do I change bitsperchannel value


  • Subject: Re: how do I change bitsperchannel value
  • From: Doug Wyatt <email@hidden>
  • Date: Fri, 7 Jul 2006 13:23:22 -0700

On Jul 7, 2006, at 09:42 , apple question wrote:
How do I change the bitsperchannel value for the audio data? i.e, the original LPCM data is 32bits per channel, I want to convert the data to 16bits per channel. Create Audio Converter will fail if I have different bitsperchannel value for input and output data formats. Thanks.

What are the full AudioStreamBasicDescriptions?

One or both are probably incorrect.

For 16-bit big-endian signed integer, the ASBD should be:
mFormatID = kAudioFormatLinearPCM;
mFormatFlags = kLinearPCMFormatFlagIsBigEndian | kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked;
mBytesPerPacket = mBytesPerFrame = nchannels * 2; // 16 bits -> 2 bytes
mFramesPerPacket = 1;
mChannelsPerFrame = nchannels;
mBitsPerChannel = 16;


--
Doug Wyatt
Core Audio, Apple

_______________________________________________
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: how do I change bitsperchannel value
      • From: "apple question" <email@hidden>
References: 
 >how do I change bitsperchannel value (From: "apple question" <email@hidden>)

  • Prev by Date: Re: Question about HALRunLoop thread
  • Next by Date: Re: Not Setting Format results in multichannel playback success
  • Previous by thread: how do I change bitsperchannel value
  • Next by thread: Re: how do I change bitsperchannel value
  • Index(es):
    • Date
    • Thread