Superclasses :
AUElement
Subclasses :
AUOutputElement, AUInputElement
Header : AUScopeElement
class AUIOElement : public AUElement
This is a superclass for elements with scope kAudioUnitScope_Input and kAudioUnitScope_Output.
This kind of element maintains the buffers for audio input and output in addition to the parameters.
Methods
Buffers
void AllocateBuffer(UInt32 inFramesToAllocate = 0);
Allocates space for the audio buffers.
void CopyBufferContentsTo(AudioBufferList &abl) const;
Calls the same named method in AUBufferList on mIOBuffer.
void CopyBufferListTo(AudioBufferList &abl) const;
Calls the same named method in AUBufferList on mIOBuffer.
void DeallocateBuffer();
Frees space for the audio buffers.
AudioBufferList& GetBufferList();
Calls the same named method in AUBufferList on mIOBuffer.
void InvalidateBufferList();
Calls the same named method in AUBufferList on mIOBuffer.
virtual bool NeedsBufferSpace() const = 0;
Pure virtual function overridden by the subclasses.
AudioBufferList& PrepareBuffer(UInt32 nFrames);
Sets the buffer formats in the AUBufferList to the desired format and partitions the already
allocated buffer memory accordingly.
AudioBufferList& PrepareNullBuffer(UInt32 nFrames);
Calls the same named method in AUBufferList on mIOBuffer.
AudioBufferList& SetBufferList(AudioBufferList &abl);
Calls the same named method in AUBufferList on mIOBuffer.
void UseExternalBuffer(const AudioUnitExternalBuffer &buf);
Calls the same named method in AUBufferList on mIOBuffer.
Constructor
AUIOElement(AUBase *audioUnit);
Format
const CAStreamBasicDescription &GetStreamFormat();
Return a stream description for this element.
bool IsInterleaved();
Return whether the buffers are in interleaved format.
UInt32 NumberChannels();
Returns the number of channels in the stream format.
UInt32 NumberInterleavedChannels();
Returns the number of interleaved channels in the stream format.
virtual OSStatus SetStreamFormat(const CAStreamBasicDescription &desc);
Calls the same named method in AUBufferList on mIOBuffer.
Other
virtual UInt32 GetAudioChannelLayout (
AudioChannelLayout* outMapPtr,
Boolean& outWritable
);
float* GetChannelData(int ch);
virtual UInt32 GetChannelLayoutTags (AudioChannelLayoutTag *outLayoutTagsPtr);
virtual OSStatus RemoveAudioChannelLayout ();
virtual OSStatus SetAudioChannelLayout (const AudioChannelLayout &inData);
void SetBuffer(
UInt32 index,
AudioBuffer& ab
);
Data
Other
|
protected instance variable
|
AUBufferList mIOBuffer;
The buffer list.
|
protected instance variable
|
CAStreamBasicDescription mStreamFormat;
The stream format description.