Commit 4954716b authored by Julius Künzel's avatar Julius Künzel Committed by Jean-Baptiste Mardelle
Browse files

mlt7: replace deprecated mlt_sample_calculator()

Related to #991
parent 5bceffdc
......@@ -90,7 +90,7 @@ bool AudioThumbJob::computeWithMlt()
}
QScopedPointer<Mlt::Frame> mltFrame(audioProducer->get_frame());
if ((mltFrame != nullptr) && mltFrame->is_valid() && (mltFrame->get_int("test_audio") == 0)) {
int samples = mlt_sample_calculator(float(framesPerSecond), m_frequency, z);
int samples = mlt_audio_calculate_frame_samples(float(framesPerSecond), m_frequency, z);
mltFrame->get_audio(audioFormat, m_frequency, m_channels, samples);
for (int channel = 0; channel < m_channels; ++channel) {
double lev = mltFrame->get_double(keys.at(channel).toUtf8().constData());
......
......@@ -113,7 +113,7 @@ AudioEnvelope::AudioSummary AudioEnvelope::loadAndNormalizeEnvelope() const
for (size_t i = 0; i < max; ++i) {
std::unique_ptr<Mlt::Frame> frame(m_producer->get_frame(int(i)));
qint64 position = mlt_frame_get_position(frame->get_frame());
int samples = mlt_sample_calculator(float(m_producer->get_fps()), samplingRate, position);
int samples = mlt_audio_calculate_frame_samples(float(m_producer->get_fps()), samplingRate, position);
auto *data = static_cast<qint16 *>(frame->get_audio(format_s16, samplingRate, channels, samples));
summary.audioAmplitudes[i] = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment