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
a049f651
Commit
a049f651
authored
Nov 03, 2019
by
Jean-Baptiste Mardelle
Browse files
Ensure audio mixer works on fps >= 50
parent
e3bc6af8
Pipeline
#9922
passed with stage
in 13 minutes and 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/audiomixer/mixerwidget.cpp
View file @
a049f651
...
...
@@ -86,7 +86,7 @@ void MixerWidget::property_changed( mlt_service , MixerWidget *widget, char *nam
int
pos
=
mlt_properties_get_int
(
filter_props
,
"_position"
);
if
(
!
widget
->
m_levels
.
contains
(
pos
))
{
widget
->
m_levels
[
pos
]
=
{
IEC_Scale
(
mlt_properties_get_double
(
filter_props
,
"_audio_level.0"
)),
IEC_Scale
(
mlt_properties_get_double
(
filter_props
,
"_audio_level.1"
))};
if
(
widget
->
m_levels
.
size
()
>
50
)
{
if
(
widget
->
m_levels
.
size
()
>
widget
->
m_maxLevels
)
{
widget
->
m_levels
.
erase
(
widget
->
m_levels
.
begin
());
}
}
...
...
@@ -105,6 +105,7 @@ MixerWidget::MixerWidget(int tid, std::shared_ptr<Mlt::Tractor> service, const Q
,
m_lastVolume
(
0
)
,
m_listener
(
nullptr
)
,
m_recording
(
false
)
,
m_maxLevels
(
qMax
(
30
,
(
int
)(
service
->
get_fps
()
*
1.5
)))
{
buildUI
(
service
.
get
(),
trackTag
);
}
...
...
@@ -121,6 +122,7 @@ MixerWidget::MixerWidget(int tid, Mlt::Tractor *service, const QString &trackTag
,
m_lastVolume
(
0
)
,
m_listener
(
nullptr
)
,
m_recording
(
false
)
,
m_maxLevels
(
qMax
(
30
,
(
int
)(
service
->
get_fps
()
*
1.5
)))
{
buildUI
(
service
,
trackTag
);
}
...
...
src/audiomixer/mixerwidget.hpp
View file @
a049f651
...
...
@@ -88,6 +88,7 @@ protected:
QSpinBox
*
m_balanceSpin
;
QDial
*
m_balanceDial
;
QDoubleSpinBox
*
m_volumeSpin
;
int
m_maxLevels
;
private:
std
::
shared_ptr
<
AudioLevelWidget
>
m_audioMeterWidget
;
...
...
Write
Preview
Supports
Markdown
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