.wav files being played too fast


Hi! I new to JUCE and relatively new to C++ so I tried to make a drum machine. Everything works well (not perfect but I’m still working on it :wink: ), my problem is with playing .wav files (that does not seem to happen with .mp3 file for example). Some samples play normally but some play very fast. Any idea why that is happening?

My sample rate is 44100, I’m working on Windows 10 and my project is an audio application (not plugin), if that wake any difference…

Here is a link to the project on Github:



Hello !

I think you have used some files that don’t have a sample rate of 44100 Hz. I have not seen any resampling function in your code, which means that such WAV files are going to be read at the wrong speed.

Have a look maybe for the ResamplingAudioSource and the LagrangeInterpolation classes to find a quick workaround.


Hi Thanks for the quick reply!
That makes sense I’ll try that out.