Skip to content
Permalink
Browse files

Fix sound key length

For sound files that were not exactly n seconds long, the
last part would get cut off and not included in timeline length
calculations.
  • Loading branch information...
scribblemaniac committed Oct 14, 2018
1 parent 6471882 commit 4f7b4bb8244114c43e3742a6c1a2602ef0d41d5a
Showing with 2 additions and 1 deletion.
  1. +2 −1 core_lib/src/structure/soundclip.cpp
@@ -19,6 +19,7 @@ GNU General Public License for more details.

#include <QFile>
#include <QMediaPlayer>
#include <QtMath>
#include "soundplayer.h"

SoundClip::SoundClip()
@@ -121,5 +122,5 @@ void SoundClip::setDuration(const int64_t& duration)

void SoundClip::updateLength(int fps)
{
setLength(mDuration * fps / 1000.0);
setLength(qCeil(mDuration * fps / 1000.0));
}

0 comments on commit 4f7b4bb

Please sign in to comment.
You can’t perform that action at this time.