Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
4954716b
Commit
4954716b
authored
Apr 16, 2021
by
Julius Künzel
Committed by
Jean-Baptiste Mardelle
Apr 18, 2021
Browse files
mlt7: replace deprecated mlt_sample_calculator()
Related to
#991
parent
5bceffdc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/jobs/audiothumbjob.cpp
View file @
4954716b
...
...
@@ -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
_calculat
or
(
float
(
framesPerSecond
),
m_frequency
,
z
);
int
samples
=
mlt_
audio
_calculat
e_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
());
...
...
src/lib/audio/audioEnvelope.cpp
View file @
4954716b
...
...
@@ -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
_calculat
or
(
float
(
m_producer
->
get_fps
()),
samplingRate
,
position
);
int
samples
=
mlt_
audio
_calculat
e_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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment