replicate the remove-all-trailing whitespace commit(s) in master
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
File: MatrixMixerVolumes.cpp
|
||||
Abstract: MatrixMixerVolumes.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.
|
||||
|
||||
|
||||
*/
|
||||
#include "MatrixMixerVolumes.h"
|
||||
#include "CAXException.h"
|
||||
@@ -59,9 +59,9 @@ OSStatus PrintBuses (FILE* file, const char* str, AudioUnit au, AudioUnitScope i
|
||||
UInt32 busCount;
|
||||
UInt32 theSize = sizeof(busCount);
|
||||
|
||||
ca_require_noerr (result = AudioUnitGetProperty (au, kAudioUnitProperty_ElementCount,
|
||||
ca_require_noerr (result = AudioUnitGetProperty (au, kAudioUnitProperty_ElementCount,
|
||||
inScope, 0, &busCount, &theSize), home);
|
||||
|
||||
|
||||
fprintf (file, "\t%s Elements:\n\t\t", str);
|
||||
for (UInt32 i = 0; i < busCount; ++i) {
|
||||
Float32 val;
|
||||
@@ -83,16 +83,16 @@ void PrintMatrixMixerVolumes (FILE* file, AudioUnit au)
|
||||
UInt32 theSize = sizeof(UInt32) * 2;
|
||||
Float32 *theVols = NULL;
|
||||
OSStatus result;
|
||||
|
||||
// this call will fail if the unit is NOT initialized as it would present an incomplete state
|
||||
ca_require_noerr (result = AudioUnitGetProperty (au, kAudioUnitProperty_MatrixDimensions,
|
||||
|
||||
// this call will fail if the unit is NOT initialized as it would present an incomplete state
|
||||
ca_require_noerr (result = AudioUnitGetProperty (au, kAudioUnitProperty_MatrixDimensions,
|
||||
kAudioUnitScope_Global, 0, dims, &theSize), home);
|
||||
|
||||
theSize = ((dims[0] + 1) * (dims[1] + 1)) * sizeof(Float32);
|
||||
|
||||
|
||||
theVols = static_cast<Float32*> (malloc (theSize));
|
||||
|
||||
ca_require_noerr (result = AudioUnitGetProperty (au, kAudioUnitProperty_MatrixLevels,
|
||||
|
||||
ca_require_noerr (result = AudioUnitGetProperty (au, kAudioUnitProperty_MatrixLevels,
|
||||
kAudioUnitScope_Global, 0, theVols, &theSize), home);
|
||||
|
||||
home:
|
||||
@@ -101,9 +101,9 @@ home:
|
||||
free(theVols);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
theSize /= sizeof(Float32);
|
||||
|
||||
|
||||
unsigned int inputs = dims[0];
|
||||
unsigned int outputs = dims[1];
|
||||
|
||||
@@ -114,7 +114,7 @@ home:
|
||||
for (unsigned int i = 0; i < (inputs + 1); ++i) {
|
||||
if (i < inputs) {
|
||||
fprintf (file, "\t%.3f ", theVols[(i + 1) * (outputs + 1) - 1]);
|
||||
|
||||
|
||||
for (unsigned int j = 0; j < outputs; ++j)
|
||||
fprintf (file, "(%.3f) ", theVols[(i * (outputs + 1)) + j]);
|
||||
} else {
|
||||
@@ -141,7 +141,7 @@ OSStatus NumberChannels (AudioUnit au,
|
||||
AudioStreamBasicDescription desc;
|
||||
UInt32 dataSize = sizeof (AudioStreamBasicDescription);
|
||||
OSStatus result = AudioUnitGetProperty (au, kAudioUnitProperty_StreamFormat,
|
||||
inScope, inEl,
|
||||
inScope, inEl,
|
||||
&desc, &dataSize);
|
||||
if (!result)
|
||||
outChans = desc.mChannelsPerFrame;
|
||||
|
||||
Reference in New Issue
Block a user