-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
AUMIDIEffectBase.cpp
53 lines (40 loc) · 1.57 KB
/
AUMIDIEffectBase.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*!
@file AudioUnitSDK/AUMIDIEffectBase.cpp
@copyright © 2000-2021 Apple Inc. All rights reserved.
*/
#include <AudioUnitSDK/AUMIDIEffectBase.h>
namespace ausdk {
AUMIDIEffectBase::AUMIDIEffectBase(AudioComponentInstance inInstance, bool inProcessesInPlace)
: AUEffectBase(inInstance, inProcessesInPlace), AUMIDIBase(*static_cast<AUBase*>(this))
{
}
OSStatus AUMIDIEffectBase::GetPropertyInfo(AudioUnitPropertyID inID, AudioUnitScope inScope,
AudioUnitElement inElement, UInt32& outDataSize, bool& outWritable)
{
OSStatus result =
AUEffectBase::GetPropertyInfo(inID, inScope, inElement, outDataSize, outWritable);
if (result == kAudioUnitErr_InvalidProperty) {
result =
AUMIDIBase::DelegateGetPropertyInfo(inID, inScope, inElement, outDataSize, outWritable);
}
return result;
}
OSStatus AUMIDIEffectBase::GetProperty(
AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, void* outData)
{
OSStatus result = AUEffectBase::GetProperty(inID, inScope, inElement, outData);
if (result == kAudioUnitErr_InvalidProperty) {
result = AUMIDIBase::DelegateGetProperty(inID, inScope, inElement, outData);
}
return result;
}
OSStatus AUMIDIEffectBase::SetProperty(AudioUnitPropertyID inID, AudioUnitScope inScope,
AudioUnitElement inElement, const void* inData, UInt32 inDataSize)
{
OSStatus result = AUEffectBase::SetProperty(inID, inScope, inElement, inData, inDataSize);
if (result == kAudioUnitErr_InvalidProperty) {
result = AUMIDIBase::DelegateSetProperty(inID, inScope, inElement, inData, inDataSize);
}
return result;
}
} // namespace ausdk