Re: AudioConverterNew (fmt?) on Leopard
Re: AudioConverterNew (fmt?) on Leopard
- Subject: Re: AudioConverterNew (fmt?) on Leopard
- From: Eric Allamanche <email@hidden>
- Date: Fri, 7 Dec 2007 10:17:45 -0800
To what value is AAC_PACKET_FLOATS set to? You should set
fmt.mFramesPerPacket to "0" since this is a codec specific value. The
codecs in Leopard have stricter parameter checking, so this could
explain why it worked in Tiger but doesn't in Leopard anymore.
Eric
On Dec 6, 2007, at 1:20 PM, Jim Heintz wrote:
Hello,
I am receiving a 'fmt?' result from AudioConverterNew when I attempt
to convert from the default stream format on an iMacIntel to
anything...
CAStreamBasicDescription ifmt;
QTGetComponentProperty(sgSoundChannel,
kQTPropertyClass_SGAudioRecordDevice,
kQTSGAudioPropertyID_StreamFormat, sizeof( ifmt), & ifmt, NULL);
ifmt.Print();
// returns :: AudioStreamBasicDescription: 2 ch, 44100 Hz,
'lpcm' (0x00000004) 24-bit little-endian signed integer, unpacked in
4 bytes low-aligned
CAStreamBasicDescription fmt;
fmt.mSampleRate = 0;
fmt.mFormatID = kAudioFormatMPEG4AAC;
fmt.mFormatFlags = 0;
fmt.mBytesPerPacket = 0;
fmt.mFramesPerPacket = AAC_PACKET_FLOATS;
fmt.mBytesPerFrame = 0;
fmt.mChannelsPerFrame = 2;
fmt.mBitsPerChannel = 0;
err = AudioConverterNew(& ifmt, & fmt, &cvtr); --> err == 'fmt?'
This code works fine on Tiger. Has there been a change, or am I
doing something wrong?
-Jim Heintz
_______________________________________________
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
_______________________________________________
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