AUIOElement

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


AllocateBuffer

public nonvirtual method


 void AllocateBuffer(UInt32 inFramesToAllocate = 0);

Allocates space for the audio buffers.



CopyBufferContentsTo

public nonvirtual method


 void CopyBufferContentsTo(AudioBufferList &abl) const;

Calls the same named method in AUBufferList on mIOBuffer.



CopyBufferListTo

public nonvirtual method


 void CopyBufferListTo(AudioBufferList &abl) const;

Calls the same named method in AUBufferList on mIOBuffer.



DeallocateBuffer

public nonvirtual method


 void DeallocateBuffer();

Frees space for the audio buffers.



GetBufferList

public nonvirtual method


 AudioBufferList& GetBufferList();

Calls the same named method in AUBufferList on mIOBuffer.



InvalidateBufferList

public nonvirtual method


 void InvalidateBufferList();

Calls the same named method in AUBufferList on mIOBuffer.



NeedsBufferSpace

public virtual method


 virtual bool NeedsBufferSpace() const = 0;

Pure virtual function overridden by the subclasses.



PrepareBuffer

public nonvirtual method


 AudioBufferList& PrepareBuffer(UInt32 nFrames);

Sets the buffer formats in the AUBufferList to the desired format and partitions the already allocated buffer memory accordingly.



PrepareNullBuffer

public nonvirtual method


 AudioBufferList& PrepareNullBuffer(UInt32 nFrames);

Calls the same named method in AUBufferList on mIOBuffer.



SetBufferList

public nonvirtual method


 AudioBufferList& SetBufferList(AudioBufferList &abl);

Calls the same named method in AUBufferList on mIOBuffer.



UseExternalBuffer

public nonvirtual method


 void UseExternalBuffer(const AudioUnitExternalBuffer &buf);

Calls the same named method in AUBufferList on mIOBuffer.



Constructor


AUIOElement

public constructor


 AUIOElement(AUBase *audioUnit);



Format


GetStreamFormat

public nonvirtual method


 const CAStreamBasicDescription &GetStreamFormat();

Return a stream description for this element.



IsInterleaved

public nonvirtual method


 bool IsInterleaved();

Return whether the buffers are in interleaved format.



NumberChannels

public nonvirtual method


 UInt32 NumberChannels();

Returns the number of channels in the stream format.



NumberInterleavedChannels

public nonvirtual method


 UInt32 NumberInterleavedChannels();

Returns the number of interleaved channels in the stream format.



SetStreamFormat

public virtual method


 virtual OSStatus SetStreamFormat(const CAStreamBasicDescription &desc);

Calls the same named method in AUBufferList on mIOBuffer.



Other


GetAudioChannelLayout

public virtual method


 virtual UInt32 GetAudioChannelLayout (
          AudioChannelLayout*             outMapPtr,
          Boolean&                        outWritable
    );



GetChannelData

public nonvirtual method


 float* GetChannelData(int ch);



GetChannelMapTags

public virtual method


 virtual UInt32 GetChannelLayoutTags (AudioChannelLayoutTag *outLayoutTagsPtr);



RemoveAudioChannelLayout

public virtual method


 virtual OSStatus RemoveAudioChannelLayout ();



SetAudioChannelLayout

public virtual method


 virtual OSStatus SetAudioChannelLayout (const AudioChannelLayout &inData);



SetBuffer

public nonvirtual method


 void SetBuffer(
          UInt32                          index,
          AudioBuffer&                    ab
    );



Data


Other


mIOBuffer

protected instance variable


 AUBufferList mIOBuffer;

The buffer list.



mStreamFormat

protected instance variable


 CAStreamBasicDescription mStreamFormat;

The stream format description.