Converting to LPCM 32bit
Converting to LPCM 32bit
- Subject: Converting to LPCM 32bit
- From: "Sandeep Chandna" <email@hidden>
- Date: Thu, 4 Jan 2007 12:57:33 +0530
Hi,
I am converting audio to LPCM 32bit format using the AudioStreamBasicDescription. For two cases it encodes fine (32 bit, float, big endian and 32bit, integer, big endian) but for other two cases (32 bit, float, little endian and 32bit, integer, little endian) it encodes blank audio.
My ASBD looks like this:
asbd.mFormatID = kAudioFormatLinearPCM
asbd.mSampleRate = sampleRate;
asbd.mFormatFlags = kAudioFormatFlagIsPacked | kAudioFormatFlagIsFloat ; // 32bit, float, little-endian - NOT WORKING
/* and other cases as follows:
asbd.mFormatFlags = kAudioFormatFlagIsPacked | kAudioFormatFlagIsSignedInteger; // 32bit, integer, little-endian - NOT WORKING
asbd.mFormatFlags = kAudioFormatFlagIsPacked | kAudioFormatFlagIsFloat | kAudioFormatFlagIsBigEndian ; // 32bit, float, big-endian - WORKING
asbd.mFormatFlags = kAudioFormatFlagIsPacked | kAudioFormatFlagIsBigEndian | kAudioFormatFlagIsSignedInteger; // 32bit, integer, big-endian - WORKING
*/
asbd.mBytesPerPacket = 4
asbd.mFramesPerPacket
= 1;
asbd.mBytesPerFrame = 4
asbd.mChannelsPerFrame = 1
asbd.mBitsPerChannel = 32
asbd.mReserved = 0;
Moreover, when I open the faulty encoded files in quicktime and see Movie Info, it shows '32 bit Float (Big endian)', '32 bit Integer (Big endian)' . Am I setting the formatFlags properly? how do i encode LPCM little endian ?
Also, Using the above formatFlags, I am able to encode in 8bit, little endian formats . The problem is only in 32 and 24 bits.
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