Search code examples
c++irrklang

irrKlang sound has wrong play length


I try to play a wav file which has a length of 27 seconds, but getPlayLength() returns 143 ms.

This is my code:

auto m_pSoundEngine = irrklang::createIrrKlangDevice();    
auto m_pSound = m_pSoundEngine->play2D("G:\\SomeAbsolutePath\\3_Tenor.wav", true, false, true);
m_pSound->getPlayLength();    //returns 143 (ms)
m_pSound->getPlaybackSpeed(); //returns 1.0

This is the sound file:

enter image description here

What am I doing wrong? The sound itself is an export from Cubase, and VLC plays it correctly.


Solution

  • Turns out my .wav files are 32 bit.

    irrKlang v1.6.0 only supports bitdepths of up to 24bit.