Apple Lossless: working with 16 bit, silence with 24, 32 bit source data
Apple Lossless: working with 16 bit, silence with 24, 32 bit source data
- Subject: Apple Lossless: working with 16 bit, silence with 24, 32 bit source data
- From: Stevo Brock <email@hidden>
- Date: Wed, 31 May 2006 19:50:39 -0700
Several months ago I was able to get LPCM => Apple Lossless (into QT
file) working with 16-bit source data. Now I'm trying to get the
same working with 24 and 32 bit source data and all I get out is
silence. I *believe* I have narrowed the problem down to the Audio
Converter, but the pipeline in my app is pretty complex so perhaps
there's something else I'm missing.
I have 3 source files, at 16, 24, and 32 bits uncompressed LPCM.
Here are the Audio Converter setups for each conversion:
Source: 44100, 'lpcm', 0x0e, 4bpp, 1fpp, 4bpf, 2 channels, 16 bits
Dest: 44100, 'alac', 0x01, 0bpp, 4096fpp, 0bpf, 2 channels, 16 bits
Source: 44100, 'lpcm', 0x0e, 6bpp, 1fpp, 6bpf, 2 channels, 24 bits
Dest: 44100, 'alac', 0x03, 0bpp, 4096fpp, 0bpf, 2 channels, 24 bits
Source: 44100, 'lpcm', 0x0e, 8bpp, 1fpp, 8bpf, 2 channels, 32 bits
Dest: 44100, 'alac', 0x04, 0bpp, 4096fpp, 0bpf, 2 channels, 32 bits
Also, to set up the converter, when selecting 'alac' as the dest
codec, I find the 'alac' component and call
SoundComponentGetInfo(..., siCompressionParams, ...)
and save the data that is returned. Then later in the process, I
find the 'alac' component again and call
SoundComponentSetInfo(..., siCompressionParams, ...) using the data
that was saved previously
SoundComponentSetInfo(..., siCompressionChannels, ...)
SoundComponentSetInfo(..., siCompressionSampleRate, ...)
SoundComponentGetInfo(..., siCompressionParams, ...) and save this data
and then to finish setting up the converter, I call
AudioConverterSetProperty(...,
kAudioConverterCompressionMagicCookie, ...) with the final saved data.
When I look at the first packet of output data, I see for the 16 bit
process, lots of "random" binary data, but for 24 and 32 bit
processes, lots of zeros. Is there something I'm doing wrong or
something I'm missing in getting 24 and 32 bit Apple Lossless data?
-Stevo Brock
Head of Development
Monkey Tools
www.monkey-tools.com
_______________________________________________
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