AnsweredAssumed Answered

Digital Audio Effects - Wave file issue

Question asked by dice on Aug 12, 2013
Latest reply on Apr 5, 2015 by doudou
dear all. I hope this finds you well. I am trying to implement digital audio effects on a development board featuring a STM32F407ZG processor. I have never used it before but I managed to build the driver for the audio codec, the usb and 512KB SRAM looking at the firmware examples provided by ST. so far, so good ... and it gets better ... I can read a wave file from the usb and play the actual PCM raw data (2 channels, 48kHz sample rate, 16-bit per sample). the DMA controller transfers the data from the memory to the audio codec (just like the Audio playback and recording using the STM32F4DISCOVERY - AN3997): two buffer are read from the wave file so while the DMA controller transfer buffer1, I can work on buffer2 and vice versa. now, the PCM raw data from the wave file are 16-bit samples, 2's-complement signed integers, ranging from -32768 to 32767. I normalize this range between -1 and 1 as I wish to do some filtering but simply converting the samples and then converting them back to the 2's-complement signed integer range thus playing back the resulting audio data and I get a noisy signal. I can still hear the audio but it's noisy. Is there something I have missed? Thank you!