ADC Home > Reference Library > Technical Q&As > Audio > Carbon >
Not Recommended Document
Important: The information in this document is Not Recommended and should not be used for new development.
Current information on this Reference Library topic can be found here:
Technical Q&A SND14
Recording Compressed Sounds
|
Q I can only record sounds compressed by 'MAC3' and
'MAC6. Why can't I record sounds compressed by
'ima4' or 'ulaw'?
A The Sound Input Manager doesn't do the
compression when you record: the sound input driver does, and
the Apple input drivers don't know how to do any compression except
for MACE (furthermore, the MACE compression they use isn't the
component one, it's a version that is built into the driver).
The reason for this is that you can call SPBRecord
at interrupt time, but components can't be opened at interrupt time,
so the sound input driver can't use the Component Manager to access
compression codes. Therefore, the driver's compression options are
limited to those implemented in the driver.
You can use the siCompressionAvailable
selector with SPBGetDeviceInfo to find
out which compressions are supported by a particular driver.
Note:
QuickTime can record with any available compression format
because it compresses the sound after it has been recorded:
it does not rely on the driver to do the compression for it.
You can use this technique yourself by using Sound Manager 3.2.1
(or later) and the SoundConverter routines to convert each
input buffer as you record it (or the whole sound once it
has been recorded).
[Apr 12 1998]
|