zsiciarz / aquila

Aquila is a digital signal processing library for C++11.
http://aquila-dsp.org
MIT License
462 stars 112 forks source link

Bug while reading .wav file #65

Open ISilviu opened 5 years ago

ISilviu commented 5 years ago

Hi, I'm using the Aquila library for a personal project and I was trying to load some .wav files in order to feed them to a neural network.

The problem is that the Aquila::WaveFile constructor takes a very long time and it doesn't read the .wav file properly. More explicitly, Aquila::WaveFile yields a total number of 1283469498 samples, while, if we read the same file with another library, that one yields a total number of 19584 samples. Certainly, something went wrong.

This link contains the .wav file.

I'm using Visual Studio 2017 and Windows 10 x64.

Could you help me solve this problem?

Thanks in advance.

cailtin commented 3 years ago

I going to check this, I been loading wav files with no issues. I got the file so let me see what is the problem.

Thanks

cailtin commented 3 years ago

RIFF format file, can you transform this to a plain PCM file (pcm) ?

sox input.wav [-b BITS] [-r SAMPLERATE] [-c #CHANELS] -t raw output.pcm

The issue is that this file is a windows format file and this library is expecting a PCM formatted (yes this has PCM but in blocks and it has its own structure, which is not handled by this library)