diff options
Diffstat (limited to 'libs/appleutility/CoreAudio/AudioCodecs/ACPublic/ACCodec.cpp')
-rw-r--r-- | libs/appleutility/CoreAudio/AudioCodecs/ACPublic/ACCodec.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/libs/appleutility/CoreAudio/AudioCodecs/ACPublic/ACCodec.cpp b/libs/appleutility/CoreAudio/AudioCodecs/ACPublic/ACCodec.cpp index 512f93842a..19cc0cd3da 100644 --- a/libs/appleutility/CoreAudio/AudioCodecs/ACPublic/ACCodec.cpp +++ b/libs/appleutility/CoreAudio/AudioCodecs/ACPublic/ACCodec.cpp @@ -2,14 +2,14 @@ File: ACCodec.cpp Abstract: ACCodec.h Version: 1.1 - + Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. - + In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in this original Apple software (the @@ -25,13 +25,13 @@ implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. - + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS @@ -40,9 +40,9 @@ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + Copyright (C) 2014 Apple Inc. All Rights Reserved. - + */ //============================================================================= // Includes @@ -83,18 +83,18 @@ ACCodec::~ACCodec() OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCodec *inThis) { OSStatus theError = kAudioCodecNoError; - + try { switch (inParameters->what) { // these selectors don't use the object pointer - + case kComponentOpenSelect: case kComponentCloseSelect: theError = ComponentBase::ComponentEntryDispatch(inParameters, inThis); break; - + case kComponentCanDoSelect: { switch (GetSelectorForCanDo(inParameters)) @@ -115,7 +115,7 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo } } break; - + default: // these selectors use the object pointer if(inThis != NULL) @@ -125,16 +125,16 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo case kComponentVersionSelect: theError = inThis->Version(); break; - + case kAudioCodecGetPropertyInfoSelect: { PARAM(AudioCodecPropertyID, inPropertyID, 0, 3); PARAM(UInt32 *, outSize, 1, 3); PARAM(Boolean *, outWritable, 2, 3); - + UInt32 theSize = 0; Boolean isWritable = false; - + inThis->GetPropertyInfo(inPropertyID, theSize, isWritable); if(outSize != NULL) { @@ -146,13 +146,13 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo } } break; - + case kAudioCodecGetPropertySelect: { PARAM(AudioCodecPropertyID, inPropertyID, 0, 3); PARAM(UInt32 *, ioPropertyDataSize, 1, 3); PARAM(void *, outPropertyData, 2, 3); - + if((ioPropertyDataSize != NULL) && (outPropertyData != NULL)) { inThis->GetProperty(inPropertyID, *ioPropertyDataSize, outPropertyData); @@ -163,13 +163,13 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo } } break; - + case kAudioCodecSetPropertySelect: { PARAM(AudioCodecPropertyID, inPropertyID, 0, 3); PARAM(UInt32, inPropertyDataSize, 1, 3); PARAM(const void *, inPropertyData, 2, 3); - + if(inPropertyData != NULL) { inThis->SetProperty(inPropertyID, inPropertyDataSize, inPropertyData); @@ -180,31 +180,31 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo } } break; - + case kAudioCodecInitializeSelect: { PARAM(const AudioStreamBasicDescription *, inInputFormat, 0, 4); PARAM(const AudioStreamBasicDescription *, inOutputFormat, 1, 4); PARAM(const void *, inMagicCookie, 2, 4); PARAM(UInt32, inMagicCookieByteSize, 3, 4); - + inThis->Initialize(inInputFormat, inOutputFormat, inMagicCookie, inMagicCookieByteSize); } break; - + case kAudioCodecUninitializeSelect: { inThis->Uninitialize(); } break; - + case kAudioCodecAppendInputDataSelect: { PARAM(const void *, inInputData, 0, 4); PARAM(UInt32 *, ioInputDataByteSize, 1, 4); PARAM(UInt32 *, ioNumberPackets, 2, 4); PARAM(const AudioStreamPacketDescription *, inPacketDescription, 3, 4); - + if((inInputData != NULL) && (ioInputDataByteSize != NULL)) { if(ioNumberPackets != NULL) @@ -223,7 +223,7 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo } } break; - + case kAudioCodecProduceOutputDataSelect: { PARAM(void *, outOutputData, 0, 5); @@ -231,7 +231,7 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo PARAM(UInt32 *, ioNumberPackets, 2, 5); PARAM(AudioStreamPacketDescription *, outPacketDescription, 3, 5); PARAM(UInt32 *, outStatus, 4, 5); - + if((outOutputData != NULL) && (ioOutputDataByteSize != NULL) && (ioNumberPackets != NULL) && (outStatus != NULL)) { *outStatus = inThis->ProduceOutputPackets(outOutputData, *ioOutputDataByteSize, *ioNumberPackets, outPacketDescription); @@ -246,7 +246,7 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo } } break; - + #if AC_NON_INTERLEAVED_SUPPORT case kAudioCodecAppendInputBufferListSelect: { @@ -254,7 +254,7 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo PARAM(UInt32 *, ioNumberPackets, 1, 4); PARAM(const AudioStreamPacketDescription *, inPacketDescription, 2, 4); PARAM(UInt32 *, outBytesConsumed, 3, 4); - + if((inBufferList != NULL) && (outBytesConsumed != NULL)) { if(ioNumberPackets != NULL) @@ -273,14 +273,14 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo } } break; - + case kAudioCodecProduceOutputBufferListSelect: { PARAM(AudioBufferList *, ioBufferList, 0, 4); PARAM(UInt32 *, ioNumberPackets, 1, 4); PARAM(AudioStreamPacketDescription *, outPacketDescription, 2, 4); PARAM(UInt32 *, outStatus, 3, 4); - + if((ioBufferList != NULL) && (ioNumberPackets != NULL) && (outStatus != NULL)) { *outStatus = inThis->ProduceOutputBufferList(ioBufferList, *ioNumberPackets, outPacketDescription); @@ -296,13 +296,13 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo } break; #endif // AC_NON_INTERLEAVED_SUPPORT - + case kAudioCodecResetSelect: { inThis->Reset(); } break; - + default: theError = badComponentSelector; break; @@ -323,7 +323,7 @@ OSStatus ACCodec::ComponentEntryDispatch(ComponentParameters *inParameters, ACCo { theError = kAudioCodecUnspecifiedError; } - + return theError; } #endif // !CA_USE_AUDIO_PLUGIN_ONLY && !TARGET_OS_IPHONE |