#define MEASURE_CODEC_PERFORMANCE // uncomment this line to measure internal codec performance, comment the line to measure TGA analog input circuitry performance.
BAAudioControlWM8731codecControl;
AudioInputI2Si2sIn;
AudioOutputI2Si2sOut;
AudioEffectRmsMeasurermsModule;
// Audio Connections
AudioConnectionpatchInL(i2sIn,0,rmsModule,0);// route the input to the delay
AudioConnectionpatchInR(i2sIn,1,rmsModule,1);// route the input to the delay
AudioConnectionpatchOutL(rmsModule,0,i2sOut,0);// connect the cab filter to the output.
AudioConnectionpatchOutR(rmsModule,0,i2sOut,1);// connect the cab filter to the output.
voidsetup(){
delay(5);// wait a few ms to make sure the GTA Pro is fully powered up
AudioMemory(48);
// If the codec was already powered up (due to reboot) power itd own first
codecControl.disable();
delay(100);
codecControl.enable();
delay(100);
#if defined(MEASURE_CODEC_PERFORMANCE)
// Measure TGA board performance with input unplugged, and 0 gain. Please set