Marco wrote:
Hi

I am programming a toolset for analysing wav-files with FFT. The programm works fine, except that the results are crap. I made some testfiles (4khz and 440Hz) but in the end i see just crap (it does not show me a peak 440Hz). I believe that my decoding and splitting is wrong, so i'd like you to tell me whether it is right. I want to do 2 FT-analyzes per channel (fftlyzer[analyze][channel]). fftlyzer is a class I made for analyzing the sound. (It is doing the FT-analyse when it's internal buffer is full, stores the result and resets the buffer afterwards.)
Here is a snippet of my code.

I think you are missing to handle more then one channel and your add function is totally borked as data_size is most likely in bytes and you iterate over a buffer pointer that is int16. So most likely you are over reading the buffer. My advice is that you first make sure that the data you get is ok, that by writing the raw buffer to disc and then play it with some nice program that can handle raw audio. (ffmpeg, sox, audacity).

MvH
Benjamin Larsson

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to