| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi All,
I want to know how to pro grammatically change the export settings for Sound.
I have seen code like this for video but do not know how I can do the same with audio.
I want to be able to change the output sampling frequency and number of channels while exporting to uncompressed WAV file.
Any help will be very much appreciated
MovieExportComponent movieExporter = NULL;
QTAtomContainer exportSettings = NULL;
QTAtom videAtom = 0,sptlAtom = 0;
SCSpatialSettings spatialSetting;
OSErr err = noErr;
// Open the AVI 'spit' component
err = OpenADefaultComponent(MovieExportType, kQTFileTypeAVI, &movieExporter);
if (err || !movieExporter) goto bail;
// Get the default settings
err = MovieExportGetSettingsAsAtomContainer(movieExporter, &exportSettings);
if (err) goto bail;
// Find the 'vide' Atom which contains the spatial settings
videAtom = QTFindChildByID(exportSettings, kParentAtomIsContainer,
kQTSettingsVideo,
1, NULL);
if (0 == videAtom) { err = cannotFindAtomErr; goto bail; }
// Find the 'sptl' Atom - Spatial Settings
sptlAtom = QTFindChildByID(exportSettings, videAtom,
scSpatialSettingsType,
1, NULL);
if (0 == sptlAtom) { err = cannotFindAtomErr; goto bail; }
// Set up our settings
spatialSetting.codecType = EndianU32_NtoB(kIndeo4CodecType); // or kWindowsRawCodecType
spatialSetting.codec = 0;
spatialSetting.depth = EndianU16_NtoB(24);
spatialSetting.spatialQuality
= EndianU32_NtoB(codecLosslessQuality);
OpenADefaultComponent(MovieExportType, kQTFileTypeWave, xAudioMovieExportComponent);
MovieExportGetSettingsAsAtomContainer(*xAudioMovieExportComponent, &xExportSettings);
xSoundAtom = QTFindChildByID(xExportSettings, kParentAtomIsContainer,kQTSettingsSound,
1, NULL);
and then ....................... Donnnnnnnnnnnnooo/anita
_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-API mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quicktime-api/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.