This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Audio artifacts from CMSIS/DSP Q15 => float => Q15 conversion

I use CMSIS/DSP library in an audio application. I have issues with the conversions 16 bits PCM (=>) Q15 => float => Q15 (=>) 16 bits PCM (in fact no
real conversion between 16 bits PCM and Q15, as I understand that it is the same thing)

I use:

arm_q15_to_float(buffer_input, inputf32, size);

arm_float_to_q15(inputf32,  buffer_outputA, size);

Going through this chain, without any other DSP function provides the music restitution but adds artifacts in the sound. Some not regular tac - tac - tac possible to hear.

The input signal is a 0dB sweep that explores audible frequencies.

Without    Q15 => float => Q15 conversion: no tac tac

With    Q15 => float => Q15 conversion:  several tac tac over few seconds

Seems frequency dependant: if I send a 440Hz sine: no tac tac

If I lower the input volume: I still have tac tac : looks not like overflows.

Are there some precautions to implement this  Q15 => float => Q15 conversion process  and get rid of those audio artifacts?

I implement on a nucleo stm32F7 board (Cortex M7) an audio application that is intended to get  a USB music stream, apply DSP functions to perform crossover and equalization using biquads, and output the results to several digital outputs (SPDIF in my case).

I'm an hobbyist and may lack knowledge on some element that would be obvious to more
knowledgeable persons.  Help would be much appreciated.

The code of the application is here https://github.com/jmf13/F7USBAudio/blob/master/Src/DSP.c.
I performed my debug tests by commenting all transformations on the signal except the Q15 => float => Q15.

Best regards,

JM