mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:06:02 +02:00
calculating length of wav file
This commit is contained in:
parent
193857f344
commit
6b240dfd5f
1 changed files with 3 additions and 0 deletions
|
@ -258,6 +258,9 @@ void Sound::interpretAsWav(const QByteArray& inputAudioByteArray, QByteArray& ou
|
||||||
qCDebug(audio) << "Error reading WAV file";
|
qCDebug(audio) << "Error reading WAV file";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_clipLength = (float) (outputAudioByteArraySize / (fileHeader.wave.sampleRate * fileHeader.wave.numChannels * fileHeader.wave.bitsPerSample / 8.0f));
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
qCDebug(audio) << "Could not read wav audio file header.";
|
qCDebug(audio) << "Could not read wav audio file header.";
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue