diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-04-09 23:02:09 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-09 23:02:09 +0200 |
| commit | d857562046c3b3e83c5f7ef9788a2863db4cc1ca (patch) | |
| tree | e23fde06c3adcc065f9b440d8965d22e63348fc0 /src/lib | |
| parent | b7c358b504ac50cae5630d52f0ba6370bef220c2 (diff) | |
White space: cinema_sound_processor.{cc,h}
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/cinema_sound_processor.cc | 44 | ||||
| -rw-r--r-- | src/lib/cinema_sound_processor.h | 20 |
2 files changed, 32 insertions, 32 deletions
diff --git a/src/lib/cinema_sound_processor.cc b/src/lib/cinema_sound_processor.cc index 434fdd1cf..2ddbb9086 100644 --- a/src/lib/cinema_sound_processor.cc +++ b/src/lib/cinema_sound_processor.cc @@ -42,12 +42,12 @@ vector<unique_ptr<const CinemaSoundProcessor>> CinemaSoundProcessor::_cinema_sou /** @param i Our id. * @param n User-visible name. */ -CinemaSoundProcessor::CinemaSoundProcessor (string i, string n, float knee, float below, float above) - : _id (i) - , _name (n) - , _knee (knee) - , _below (below) - , _above (above) +CinemaSoundProcessor::CinemaSoundProcessor(string i, string n, float knee, float below, float above) + : _id(i) + , _name(n) + , _knee(knee) + , _below(below) + , _above(above) { } @@ -55,11 +55,11 @@ CinemaSoundProcessor::CinemaSoundProcessor (string i, string n, float knee, floa /** @return All available sound processors */ vector<CinemaSoundProcessor const *> -CinemaSoundProcessor::all () +CinemaSoundProcessor::all() { vector<CinemaSoundProcessor const *> raw; for (auto& processor: _cinema_sound_processors) { - raw.push_back (processor.get()); + raw.push_back(processor.get()); } return raw; } @@ -69,11 +69,11 @@ CinemaSoundProcessor::all () * methods are used. */ void -CinemaSoundProcessor::setup_cinema_sound_processors () +CinemaSoundProcessor::setup_cinema_sound_processors() { - _cinema_sound_processors.push_back (unique_ptr<CinemaSoundProcessor>(new DolbyCP750)); - _cinema_sound_processors.push_back (unique_ptr<CinemaSoundProcessor>(new USL)); - _cinema_sound_processors.push_back (unique_ptr<CinemaSoundProcessor>(new DatasatAP2x)); + _cinema_sound_processors.push_back(unique_ptr<CinemaSoundProcessor>(new DolbyCP750)); + _cinema_sound_processors.push_back(unique_ptr<CinemaSoundProcessor>(new USL)); + _cinema_sound_processors.push_back(unique_ptr<CinemaSoundProcessor>(new DatasatAP2x)); } @@ -81,14 +81,14 @@ CinemaSoundProcessor::setup_cinema_sound_processors () * @return Corresponding sound processor, or 0. */ CinemaSoundProcessor const * -CinemaSoundProcessor::from_id (string id) +CinemaSoundProcessor::from_id(string id) { - auto i = _cinema_sound_processors.begin (); + auto i = _cinema_sound_processors.begin(); while (i != _cinema_sound_processors.end() && (*i)->id() != id) { ++i; } - if (i == _cinema_sound_processors.end ()) { + if (i == _cinema_sound_processors.end()) { return nullptr; } @@ -100,36 +100,36 @@ CinemaSoundProcessor::from_id (string id) * @return Corresponding sound processor. */ CinemaSoundProcessor const * -CinemaSoundProcessor::from_index (int i) +CinemaSoundProcessor::from_index(int i) { - DCPOMATIC_ASSERT (i >= 0 && i < int(_cinema_sound_processors.size())); + DCPOMATIC_ASSERT(i >= 0 && i < int(_cinema_sound_processors.size())); return _cinema_sound_processors[i].get(); } float -CinemaSoundProcessor::db_for_fader_change (float from, float to) const +CinemaSoundProcessor::db_for_fader_change(float from, float to) const { float db = 0; if (from < to) { if (from <= _knee) { - float const t = min (to, _knee); + float const t = min(to, _knee); db += (t - from) * _below; } if (to > 4) { - float const t = max (from, _knee); + float const t = max(from, _knee); db += (to - t) * _above; } } else { if (from >= _knee) { - float const t = max (to, _knee); + float const t = max(to, _knee); db -= (from - t) * _above; } if (to < _knee) { - float const t = min (from, _knee); + float const t = min(from, _knee); db -= (t - to) * _below; } } diff --git a/src/lib/cinema_sound_processor.h b/src/lib/cinema_sound_processor.h index 3ccaa5c9b..411a70366 100644 --- a/src/lib/cinema_sound_processor.h +++ b/src/lib/cinema_sound_processor.h @@ -43,28 +43,28 @@ class CinemaSoundProcessor { public: - CinemaSoundProcessor (std::string i, std::string n, float knee, float below, float above); - virtual ~CinemaSoundProcessor () {} + CinemaSoundProcessor(std::string i, std::string n, float knee, float below, float above); + virtual ~CinemaSoundProcessor() {} - CinemaSoundProcessor (CinemaSoundProcessor const&) = delete; + CinemaSoundProcessor(CinemaSoundProcessor const&) = delete; CinemaSoundProcessor& operator=(CinemaSoundProcessor const&) = delete; - float db_for_fader_change (float from, float to) const; + float db_for_fader_change(float from, float to) const; /** @return id for our use */ - std::string id () const { + std::string id() const { return _id; } /** @return user-visible name for this sound processor */ - std::string name () const { + std::string name() const { return _name; } - static std::vector<CinemaSoundProcessor const *> all (); - static void setup_cinema_sound_processors (); - static CinemaSoundProcessor const * from_id (std::string id); - static CinemaSoundProcessor const * from_index (int); + static std::vector<CinemaSoundProcessor const *> all(); + static void setup_cinema_sound_processors(); + static CinemaSoundProcessor const * from_id(std::string id); + static CinemaSoundProcessor const * from_index(int); private: /** id for our use */ |
