Re: problem encoding in PCM format
Re: problem encoding in PCM format
- Subject: Re: problem encoding in PCM format
- From: "Sandeep Chandna" <email@hidden>
- Date: Wed, 1 Nov 2006 10:17:34 +0530
I am writing in a .mov file . QTPro does the encoding properly with the same settings and generates the expected output.
On 01/11/06, William Stewart <email@hidden> wrote:
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
>
> 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
________________________________________________________________________
__
--
Sandeep Chandna
98183-59325
_______________________________________________
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