diff --git a/app/render/audioparams.cpp b/app/render/audioparams.cpp index 90ab792d9..9fb1ec2e1 100644 --- a/app/render/audioparams.cpp +++ b/app/render/audioparams.cpp @@ -49,11 +49,11 @@ const QVector AudioParams::kSupportedChannelLayouts = { AV_CH_LAYOUT_7POINT1 }; -int AudioParams::time_to_bytes(const double &time) const +qint64 AudioParams::time_to_bytes(const double &time) const { Q_ASSERT(is_valid()); - return time_to_samples(time) * channel_count() * bytes_per_sample_per_channel(); + return qint64(time_to_samples(time)) * channel_count() * bytes_per_sample_per_channel(); } bool AudioParams::operator==(const AudioParams &other) const @@ -68,7 +68,7 @@ bool AudioParams::operator!=(const AudioParams &other) const return !(*this == other); } -int AudioParams::time_to_bytes(const rational &time) const +qint64 AudioParams::time_to_bytes(const rational &time) const { return time_to_bytes(time.toDouble()); } diff --git a/app/render/audioparams.h b/app/render/audioparams.h index 56028a579..521218e0e 100644 --- a/app/render/audioparams.h +++ b/app/render/audioparams.h @@ -64,8 +64,8 @@ public: return format_; } - int time_to_bytes(const double& time) const; - int time_to_bytes(const rational& time) const; + qint64 time_to_bytes(const double& time) const; + qint64 time_to_bytes(const rational& time) const; int time_to_samples(const double& time) const; int time_to_samples(const rational& time) const; int samples_to_bytes(const int& samples) const;