15 AudioUnitPropertyID inID,
void *pProperty,
const UInt32
size,
16 AudioUnitScope inScope, AudioUnitElement inElement)
19 auto result = AudioUnitGetProperty(unit, inID, inScope, inElement,
21 assert(newSize <=
size);
26 AudioUnitPropertyID inID,
const size_t minSize,
27 void *&pObject,
size_t &
size,
28 AudioUnitScope inScope, AudioUnitElement inElement)
34 auto result = AudioUnitGetPropertyInfo(unit, inID, inScope, inElement,
40 auto newSize = std::max<size_t>(minSize, dataSize);
41 auto pObj = ::operator
new(newSize);
42 auto cleanup =
finally([&]{
45 ::operator
delete(pObj);
51 AudioUnitGetProperty(unit, inID, inScope, inElement, pObj, &dataSize);
64 AudioUnitPropertyID inID,
const void *pProperty, UInt32
size,
65 AudioUnitScope inScope, AudioUnitElement inElement)
67 return AudioUnitSetProperty(unit, inID, inScope, inElement,
OSStatus SetPropertyPtr(AudioUnit unit, AudioUnitPropertyID inID, const void *pProperty, UInt32 size, AudioUnitScope inScope, AudioUnitElement inElement)
Type-erased function to set an AudioUnit property.
OSStatus GetVariableSizePropertyPtr(AudioUnit unit, AudioUnitPropertyID inID, size_t minSize, void *&pObject, size_t &size, AudioUnitScope inScope, AudioUnitElement inElement)
Type-erased function to get an AudioUnit property of variable size.
OSStatus GetFixedSizePropertyPtr(AudioUnit unit, AudioUnitPropertyID inID, void *pProperty, UInt32 size, AudioUnitScope inScope, AudioUnitElement inElement)
Type-erased function to get an AudioUnit property of fixed size.