#include <AudioUnitChain.h>
Public Member Functions | |
| AudioUnitChain () | |
| ~AudioUnitChain () | |
| void | pullData (SoundChunk &) | 
| void | play () | 
| void | stop () | 
| bool | setChainFormat (unsigned sampleRate, unsigned channels) | 
| unsigned | sampleRate () const | 
| unsigned | channelCount () const | 
| bool | isChainEmpty () const | 
| unsigned | length () const | 
| AudioUnit | unitAtIndex (unsigned index) | 
| unsigned | indexOfUnit (AudioUnit) const | 
| bool | insertUnit (AudioUnit, unsigned index) | 
| bool | appendUnit (AudioUnit) | 
| bool | removeUnit (unsigned index) | 
| bool | moveUnit (unsigned src, unsigned tgt) | 
| bool | dismantleChain () | 
| void | setBypasses (bool) | 
| bool | isBypassing () const | 
| void | setExpectingSilence (bool) | 
| bool | isExpectingSilence () const | 
| void | resetAllUnits () | 
Static Public Attributes | |
| static const unsigned | NoUnit = numeric_limits<unsigned>::max() | 
Private Types | |
| typedef std::list< AudioUnit > | UnitChain | 
Private Member Functions | |
| void | pullDataFromUnitChain () | 
| void | getDataForRenderCallback (AudioBufferList &buffs, AudioUnitRenderActionFlags &flags, UInt32 bus, UInt32 frames) | 
| void | setTailForAudioUnit (AudioUnit ci, unsigned int newTailFrames) | 
| unsigned int | maxTail () | 
Static Private Member Functions | |
| static OSStatus | coreAudioRenderCallback (void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData) | 
| static void | audioUnitPropertyChanged (void *inRefCon, AudioUnit ci, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement) | 
Private Attributes | |
| SoundChunk | _inBuffer | 
| SoundChunk | _outBuffer | 
| AudioTimeStamp | _coreAudioTimeStamp | 
| UnitChain | _unitChain | 
| bool | _doesBypass | 
| bool | _expectSilence | 
| unsigned | _tailSinceSilence | 
| unsigned | _outSampleRate | 
| unsigned | _outChannelCount | 
| AudioBufferList * | _audioBuffList | 
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 AudioUnitChainStream  | 
  
      
  | 
  
| 
 ~AudioUnitChain  | 
  
      
  | 
  
| 
 appendUnit 
 
  | 
  
      
  | 
  ||||||||||||||||||||||||
| 
 audioUnitPropertyChanged This is the audio unit property listener for this chain. 
  | 
  
      
  | 
  
| 
 channelCount 
  | 
  
      
  | 
  ||||||||||||||||||||||||||||
| 
 coreAudioRenderCallback The callback that is inserted at the front of the audio unit chain to provide stream data. Delegates to getDataForRenderCallback() 
 
  | 
  
      
  | 
  
| 
 dismantleChain Detaches all audio units in the chain from each other. 
  | 
  
      
  | 
  ||||||||||||||||||||
| 
 getDataForRenderCallback Supplies the actual audio data to the front of the audio unit chain. 
 
  | 
  
      
  | 
  
| 
 indexOfAudioUnit Returns the index of the audio unit passed, or if the unit is not part of the chain returns AudioUnitChain::NoUnit. 
 
  | 
  
      
  | 
  ||||||||||||
| 
 insertUnit Attempts to insert unit into the chain at the requested index. 
 
  | 
  
      
  | 
  
| 
 isBypassing 
  | 
  
      
  | 
  
| 
 isChainEmpty 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 length 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  ||||||||||||
| 
 moveUnit Moves the audio unit at the index src, to the index tgt. 
 
  | 
  
      
  | 
  
| 
 play  | 
  
      
  | 
  
| 
 pullData This method delegates all the work to private the private method pullDataFromUnitChain() 
 
  | 
  
      
  | 
  
| 
 pullDataFromUnit This method prepares the core audio types, and calls AudioUnitRender. It updates private state variables and handles any action flags that the audio units return. 
  | 
  
      
  | 
  
| 
 removeUnit Removes the audio unit from the chain, and restores chain integrity. 
 
  | 
  
      
  | 
  
| 
 resetUnits Resets all the audio units in the chain.  | 
  
      
  | 
  
| 
 sampleRate 
  | 
  
      
  | 
  
| 
 setBypasses Sets whether the audio unit chain should be bypassed or not. 
  | 
  
      
  | 
  ||||||||||||
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  ||||||||||||
| 
 
  | 
  
      
  | 
  
| 
 stop  | 
  
      
  | 
  
| 
 unitAtIndex 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
 1.4.4