Hello everyone, thank you for taking the time to read my post and offering assistance!
I am currently engaged in an experiment where I play a pre-generated single-tone sound, specifically at 500 Hz, through a speaker, and simultaneously record a dual-channel audio sound file using the Bela mini board. However, upon inspecting the recorded signal, I've observed that it doesn't precisely match the 500 Hz frequency. As illustrated in the figure, the peaks of the sine wave exhibit slight shifts over time. This leads me to consider whether the discrepancy is attributed to clock drift between the playing device and the Bela board, given that their clocks may not be synchronized. Consequently, I am contemplating the idea of playing the sound and recording the echo both on the Bela board to address this issue.
I am currently able to utilize the code from \example Audio/sample-loader/render.cpp for the .wav file playback and \example Audio/record-audio/render.cpp for echo recording. I am seeking guidance on integrating these functionalities to achieve my objective. Can this integration be accomplished on the Bela mini board, and if so, are there potential implications for the sample rate or other indices? Any assistance or hints provided would be highly appreciated.
Best regards,
Laser