MEMS Microphone (SPH0645LM4H) Library Problem

MarkT:
This looks suspicious to me:

  // setup the I2S audio input for the sample rate with 32-bits per sample

if (!AudioInI2S.begin(sampleRate, 32)) {



If you admit the samples are 24 bit, it might do a better job...

No, this line just justifies if its in correct bitrate or not, gives warning and stops the code if its not 32 bps

there are several libraries connected to main code which arranges the sample and its bitrate

audioin or audioini2s could be correct file to fix this issue, but I m unable to analyze

AmplitudeAnalyzer.cpp (1.66 KB)

AmplitudeAnalyzer.h (1.26 KB)

ArduinoSound.h (1.06 KB)

AudioAnalyzer.cpp (888 Bytes)

AudioAnalyzer.h (1.08 KB)

AudioIn.cpp (1.17 KB)

AudioIn.h (1.48 KB)

AudioInI2S.cpp (2.09 KB)

AudioInI2S.h (1.39 KB)

AudioOut.cpp (2.85 KB)

AudioOut.h (1.84 KB)

AudioOutI2S.cpp (3.3 KB)

AudioOutI2S.h (1.4 KB)

FFTAnalyzer.cpp (4.41 KB)

FFTAnalyzer.h (1.43 KB)

SDWaveFile.cpp (4.66 KB)

SDWaveFile.h (1.65 KB)

SoundFile.h (1.18 KB)