Re: Encoding Mono IMA4
Re: Encoding Mono IMA4
- Subject: Re: Encoding Mono IMA4
- From: "tahome izwah" <email@hidden>
- Date: Sat, 29 Jul 2006 18:11:42 +0200
Yes I am having the same problem. For mono IMA in a CAF file I get
[Session started at 2006-07-29 18:07:59 +0200.]
ExtAudioFileSetProperty FAILED! 'fmt?', 1718449215
ExtAudioFileWrite FAILED! -66567 '\377\376\373\371'
AudioFileCreate FAILED! 1685348671 'dta?'
RecordAudioToFile has exited with status 0.
Stereo works fine.
No idea what to do about it, I think this way of setting up sound
files is really weird and clumsy anyway. It would be much easier if
you could just set the parameter that everybody is used to (channels
per frame, sample rate, word length, data format and encoded/plain
PCM) and leave it up to CoreAudio to determine all the missing
pieces...
--th
2006/7/29, Lee Falin <email@hidden>:
No dice, (same fmt? error). The CAFSpec docs state that for IMA4
encoding the FormatFlags should be set to 0. Any other ideas?
Lee
>I guess you need to set
>
> outputFormat.mFormatFlags &= ~kLinearPCMFormatFlagIsNonInterleaved;
>
>for mono files...
>
>HTH,
>Tahome
On 7/29/06, Lee Falin <email@hidden> wrote:
>> I am trying to use the ExtAudioFile Recording Sample to write a
Mono IMA4 file.
>>
>> I am able to write a stereo IMA4 file without any trouble using
these settings:
>>
>> outputFormat.mChannelsPerFrame = 2;
>> outputFormat.mSampleRate = 44100;
>> outputFormat.mFormatID = kAudioFormatAppleIMA4;
>> outputFormat.mFormatFlags = 0;
>> outputFormat.mBitsPerChannel = 0;
>> outputFormat.mBytesPerFrame = 0;
>> outputFormat.mFramesPerPacket = 64;
>> outputFormat.mBytesPerPacket = outputFormat.mChannelsPerFrame * 34;;
>>
>> I then use the kAudioFileCAFType for the file format. As I said, this
>> works great.
>>
>> I have tried changing the channels per frame to 1, which I thought
>> would give me a mono file. Instead it gives me a "fmt?" error. I also
>> tried changing the file type to kAudioFileAIFCType, but that also
>> didn't work. Most of my settings came from the CoreAudio SDK Codec
>> example (which is an IMA4 codec), and from the CAFSpec file which
>> lists the settings for stereo IMA4 encoding.
>>
>> Any help is appreciated.
>>
>> Lee
>>
_______________________________________________
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