projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More enum class additions.
[dcpomatic.git]
/
src
/
wx
/
audio_dialog.cc
diff --git
a/src/wx/audio_dialog.cc
b/src/wx/audio_dialog.cc
index 1cb167c950f939a34179e9f48c0ad4b6dd17b9d0..b8c7f7b7343b23af4b08f62361d68dd6747606cd 100644
(file)
--- a/
src/wx/audio_dialog.cc
+++ b/
src/wx/audio_dialog.cc
@@
-30,7
+30,6
@@
#include "lib/job_manager.h"
#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
#include "lib/job_manager.h"
#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
#include <iostream>
using std::cout;
#include <iostream>
using std::cout;
@@
-204,7
+203,7
@@
AudioDialog::try_to_load_analysis ()
_plot->set_analysis (shared_ptr<AudioAnalysis> ());
_analysis.reset ();
_plot->set_analysis (shared_ptr<AudioAnalysis> ());
_analysis.reset ();
-
BOOST_FOREACH (shared_ptr<Job> i,
JobManager::instance()->get()) {
+
for (auto i:
JobManager::instance()->get()) {
if (dynamic_pointer_cast<AnalyseAudioJob>(i)) {
i->cancel ();
}
if (dynamic_pointer_cast<AnalyseAudioJob>(i)) {
i->cancel ();
}
@@
-256,7
+255,7
@@
AudioDialog::try_to_load_analysis ()
mapped = film->mapped_audio_channels ();
}
mapped = film->mapped_audio_channels ();
}
-
BOOST_FOREACH (int i,
mapped) {
+
for (auto i:
mapped) {
if (_channel_checkbox[i]) {
_channel_checkbox[i]->SetValue (true);
_plot->set_channel_visible (i, true);
if (_channel_checkbox[i]) {
_channel_checkbox[i]->SetValue (true);
_plot->set_channel_visible (i, true);
@@
-315,12
+314,12
@@
AudioDialog::channel_clicked (wxCommandEvent& ev)
void
AudioDialog::film_change (ChangeType type, int p)
{
void
AudioDialog::film_change (ChangeType type, int p)
{
- if (type != C
HANGE_TYPE_
DONE) {
+ if (type != C
hangeType::
DONE) {
return;
}
if (p == Film::AUDIO_CHANNELS) {
return;
}
if (p == Film::AUDIO_CHANNELS) {
-
shared_ptr<Film>
film = _film.lock ();
+
auto
film = _film.lock ();
if (film) {
_channels = film->audio_channels ();
try_to_load_analysis ();
if (film) {
_channels = film->audio_channels ();
try_to_load_analysis ();
@@
-331,7
+330,7
@@
AudioDialog::film_change (ChangeType type, int p)
void
AudioDialog::content_change (ChangeType type, int p)
{
void
AudioDialog::content_change (ChangeType type, int p)
{
- if (type != C
HANGE_TYPE_
DONE) {
+ if (type != C
hangeType::
DONE) {
return;
}
return;
}
@@
-376,12
+375,12
@@
AudioDialog::setup_statistics ()
return;
}
return;
}
-
shared_ptr<Film>
film = _film.lock ();
+
auto
film = _film.lock ();
if (!film) {
return;
}
if (!film) {
return;
}
-
pair<AudioAnalysis::PeakTime, int>
const peak = _analysis->overall_sample_peak ();
+
auto
const peak = _analysis->overall_sample_peak ();
float const peak_dB = linear_to_db(peak.first.peak) + _analysis->gain_correction(_playlist);
_sample_peak->SetLabel (
wxString::Format (
float const peak_dB = linear_to_db(peak.first.peak) + _analysis->gain_correction(_playlist);
_sample_peak->SetLabel (
wxString::Format (
@@
-413,7
+412,7
@@
AudioDialog::setup_statistics ()
/* XXX: check whether it's ok to add dB gain to these quantities */
/* XXX: check whether it's ok to add dB gain to these quantities */
- if (static_cast<bool>(_analysis->integrated_loudness
())) {
+ if (static_cast<bool>(_analysis->integrated_loudness())) {
_integrated_loudness->SetLabel (
wxString::Format (
_("Integrated loudness %.2f LUFS"),
_integrated_loudness->SetLabel (
wxString::Format (
_("Integrated loudness %.2f LUFS"),
@@
-422,7
+421,7
@@
AudioDialog::setup_statistics ()
);
}
);
}
- if (static_cast<bool>(_analysis->loudness_range
())) {
+ if (static_cast<bool>(_analysis->loudness_range())) {
_loudness_range->SetLabel (
wxString::Format (
_("Loudness range %.2f LU"),
_loudness_range->SetLabel (
wxString::Format (
_("Loudness range %.2f LU"),
@@
-456,7
+455,7
@@
AudioDialog::set_cursor (optional<DCPTime> time, optional<float> db)
return;
}
return;
}
-
shared_ptr<Film>
film = _film.lock();
+
auto
film = _film.lock();
DCPOMATIC_ASSERT (film);
_cursor->SetLabel (wxString::Format (_("Cursor: %.1fdB at %s"), *db, time->timecode(film->video_frame_rate())));
}
DCPOMATIC_ASSERT (film);
_cursor->SetLabel (wxString::Format (_("Cursor: %.1fdB at %s"), *db, time->timecode(film->video_frame_rate())));
}