Re: problem encoding in PCM format
Re: problem encoding in PCM format
- Subject: Re: problem encoding in PCM format
- From: William Stewart <email@hidden>
- Date: Tue, 31 Oct 2006 11:41:25 -0800
what kind of file are you trying to write with the float format?
On 31/10/2006, at 1:52 AM, Sandeep Chandna wrote:
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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