Query the number of channels of the I2S input
AudioInI2S.channels();
Current number of channels of the I2S interface. This is always return 2, as I2S is configured for stereo
// setup the I2S audio input for 44.1 kHz with 32-bits per sample
if (!AudioInI2S.begin(44100, 32)) {
Serial.println("Failed to initialize I2S input!");
while (1); // do nothing
}
Serial.print(“sample rate = “);
Serial.println(AudioInI2S.sampleRate()); // prints out the sample rate used in begin(...)
Serial.print(“bit per sample = “);
Serial.println(AudioInI2S.bitsPerSample()); // prints out the bits per sample rate used in begin(...)
Serial.print(“channels = “);
Serial.println(AudioInI2S.channels()); // prints out 2, I2S always has 2 channels