No Matches
Processing the Audio Data

In the audio processing phase, we need to pick up the audio inputs, process them through our algorithm, and then write them to the audio outputs. In this part of the programming guide, we will use frame processing exclusively. You may easily extract and transfer this code into your block or buffer processing functions as you like; the reasons for focusing on frames here are:

  1. frames are easy to think about - just one sample from each channel at a time
  2. block processing ususally depends on some factor about the plugin's algorithms that may change from one plugin to the next
  3. buffer (or block) procssing is just a for( ) loop that iterates over frames (samples from each channel) so the code is fundamentally the same.

The processAudioFrame function will handle the audio processing by frame. It's sole function argument is a data structure that contains all the information we need to process a buffer of audio. Note that this also includes information from the host about the DAW session including BPM and time-signature information. See Frame, Buffer and Sub-Block Processing for information you can use to convert this code to block or buffer procssing.