• 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
problem encoding in PCM format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem encoding in PCM format


  • Subject: problem encoding in PCM format
  • From: "Sandeep Chandna" <email@hidden>
  • Date: Tue, 31 Oct 2006 15:22:00 +0530

While encoding in PCM format I am facing problems in some configurations

-> 32 bit, little endian, floating point
I set the outputASBD as follows:


asbd.mFormatID = kAudioFormatLinearPCM;
asbd.mSampleRate = 32000.0; 
asbd.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagIsPacked;
asbd.mBytesPerPacket = 8;
asbd.mFramesPerPacket = 1; // For PCM, frames per packet is always 1
asbd.mBytesPerFrame = 8; // for PCM, frames per packet and bytes per packet are equivalent
asbd.mChannelsPerFrame = 2;
asbd.mBitsPerChannel = 32;
asbd.mReserved = 0;


After the encoding completes, QTPro says that the file format is : 32 bit integer (big endian) and plays
some junk sound.


Similarly when I use the following:

asbd.mFormatID = kAudioFormatLinearPCM;
asbd.mSampleRate = 32000.0; 
asbd.mFormatFlags = kAudioFormatFlagIsSignedInteger| kAudioFormatFlagIsPacked | kAudioFormatFlagIsBigEndian;
asbd.mBytesPerPacket = 4;
asbd.mFramesPerPacket = 1; // For PCM, frames per packet is always 1
asbd.mBytesPerFrame = 4; // for PCM, frames per packet and bytes per packet are equivalent
asbd.mChannelsPerFrame = 2;
asbd.mBitsPerChannel = 16;
asbd.mReserved = 0;

In this case encoding works fine (file plays in QTPro).
 
But If I remove the kAudioFormatFlagIsBigEndian from the FormatFlags above, leaving rest of the settings same the encoded file in QTPro shows the format as : 16 bit integer (big endian)
and plays some junk sound again.

If I do an export using QTpro to these formats the encoding happens properly with these settings, can someone
suggest what could possibly be going wrong ?

Also, other formats like IMA,Apple lossless are encoded properly. Problem is just with some PCMs

Thanks
Sandeep

 _______________________________________________
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: problem encoding in PCM format
      • From: William Stewart <email@hidden>
  • Prev by Date: auval problems (channels)
  • Next by Date: Problem in encoding with AAC
  • Previous by thread: Re: auval problems (channels)
  • Next by thread: Re: problem encoding in PCM format
  • Index(es):
    • Date
    • Thread