calculating length of wav file

This commit is contained in:
ericrius1 2016-02-08 12:34:46 -08:00
parent 193857f344
commit 6b240dfd5f

View file

@ -258,6 +258,9 @@ void Sound::interpretAsWav(const QByteArray& inputAudioByteArray, QByteArray& ou
qCDebug(audio) << "Error reading WAV file";
}
_clipLength = (float) (outputAudioByteArraySize / (fileHeader.wave.sampleRate * fileHeader.wave.numChannels * fileHeader.wave.bitsPerSample / 8.0f));
} else {
qCDebug(audio) << "Could not read wav audio file header.";
return;