mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 07:43:57 +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";
|
||||
}
|
||||
|
||||
_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;
|
||||
|
|
Loading…
Reference in a new issue