44 #include "AUScopeElement.h"
48 class AUInputElement :
public AUIOElement {
52 AUInputElement(AUBase *audioUnit);
54 virtual ~AUInputElement() { }
58 virtual OSStatus SetStreamFormat(
const CAStreamBasicDescription &desc);
60 virtual bool NeedsBufferSpace()
const {
return IsCallback(); }
63 void SetConnection(
const AudioUnitConnection &conn);
65 void SetInputCallback(AURenderCallback proc,
void *refCon);
68 bool IsActive()
const {
return mInputType != kNoInput; }
70 bool IsCallback()
const {
return mInputType == kFromCallback; }
72 bool HasConnection()
const {
return mInputType == kFromConnection; }
75 OSStatus PullInput( AudioUnitRenderActionFlags & ioActionFlags,
76 const AudioTimeStamp & inTimeStamp,
77 AudioUnitElement inElement,
78 UInt32 inNumberFrames);
81 OSStatus PullInputWithBufferList( AudioUnitRenderActionFlags & ioActionFlags,
82 const AudioTimeStamp & inTimeStamp,
83 AudioUnitElement inElement,
85 AudioBufferList * inBufferList);
90 enum EInputType { kNoInput, kFromConnection, kFromCallback };
93 EInputType mInputType;
97 AURenderCallback mInputProc;
99 void * mInputProcRefCon;
103 AudioUnitConnection mConnection;
105 AudioUnitRenderProc mConnRenderProc;
107 void * mConnInstanceStorage;
111 #endif // __AUInput_h__