diff options
| -rw-r--r-- | src/lib/audio_delay.cc | 30 | ||||
| -rw-r--r-- | src/lib/audio_delay.h | 6 | ||||
| -rw-r--r-- | src/lib/audio_point.cc | 10 | ||||
| -rw-r--r-- | src/lib/audio_point.h | 12 | ||||
| -rw-r--r-- | src/lib/rng.cc | 6 | ||||
| -rw-r--r-- | src/lib/rng.h | 4 | ||||
| -rw-r--r-- | test/atmos_test.cc | 30 |
7 files changed, 49 insertions, 49 deletions
diff --git a/src/lib/audio_delay.cc b/src/lib/audio_delay.cc index d06d9e730..2329b3679 100644 --- a/src/lib/audio_delay.cc +++ b/src/lib/audio_delay.cc @@ -30,18 +30,18 @@ using std::make_shared; using std::shared_ptr; -AudioDelay::AudioDelay (int samples) - : _samples (samples) +AudioDelay::AudioDelay(int samples) + : _samples(samples) { } shared_ptr<AudioBuffers> -AudioDelay::run (shared_ptr<const AudioBuffers> in) +AudioDelay::run(shared_ptr<const AudioBuffers> in) { /* You can't call this with varying channel counts */ - DCPOMATIC_ASSERT (!_tail || in->channels() == _tail->channels()); + DCPOMATIC_ASSERT(!_tail || in->channels() == _tail->channels()); auto out = make_shared<AudioBuffers>(in->channels(), in->frames()); @@ -49,37 +49,37 @@ AudioDelay::run (shared_ptr<const AudioBuffers> in) if (!_tail) { /* No tail; use silence */ - out->make_silent (0, _samples); + out->make_silent(0, _samples); } else { /* Copy tail */ - out->copy_from (_tail.get(), _samples, 0, 0); + out->copy_from(_tail.get(), _samples, 0, 0); } /* Copy in to out */ - out->copy_from (in.get(), in->frames() - _samples, 0, _samples); + out->copy_from(in.get(), in->frames() - _samples, 0, _samples); /* Keep tail */ if (!_tail) { _tail = make_shared<AudioBuffers>(in->channels(), _samples); } - _tail->copy_from (in.get(), _samples, in->frames() - _samples, 0); + _tail->copy_from(in.get(), _samples, in->frames() - _samples, 0); } else { /* First part of the tail into the output */ if (_tail) { - out->copy_from (_tail.get(), out->frames(), 0, 0); + out->copy_from(_tail.get(), out->frames(), 0, 0); } else { - out->make_silent (); + out->make_silent(); _tail = make_shared<AudioBuffers>(out->channels(), _samples); - _tail->make_silent (); + _tail->make_silent(); } /* Shuffle the tail down */ - _tail->move (_tail->frames() - out->frames(), out->frames(), 0); + _tail->move(_tail->frames() - out->frames(), out->frames(), 0); /* Copy input into the tail */ - _tail->copy_from (in.get(), in->frames(), 0, _tail->frames() - in->frames()); + _tail->copy_from(in.get(), in->frames(), 0, _tail->frames() - in->frames()); } return out; @@ -87,7 +87,7 @@ AudioDelay::run (shared_ptr<const AudioBuffers> in) void -AudioDelay::flush () +AudioDelay::flush() { - _tail.reset (); + _tail.reset(); } diff --git a/src/lib/audio_delay.h b/src/lib/audio_delay.h index 5f3f89a65..b0266f54c 100644 --- a/src/lib/audio_delay.h +++ b/src/lib/audio_delay.h @@ -31,9 +31,9 @@ class AudioBuffers; class AudioDelay { public: - explicit AudioDelay (int samples); - std::shared_ptr<AudioBuffers> run (std::shared_ptr<const AudioBuffers> in); - void flush (); + explicit AudioDelay(int samples); + std::shared_ptr<AudioBuffers> run(std::shared_ptr<const AudioBuffers> in); + void flush(); private: std::shared_ptr<AudioBuffers> _tail; diff --git a/src/lib/audio_point.cc b/src/lib/audio_point.cc index efd342dd1..a5243bdce 100644 --- a/src/lib/audio_point.cc +++ b/src/lib/audio_point.cc @@ -30,7 +30,7 @@ LIBDCP_ENABLE_WARNINGS using std::string; -AudioPoint::AudioPoint () +AudioPoint::AudioPoint() { for (int i = 0; i < COUNT; ++i) { _data[i] = 0; @@ -38,14 +38,14 @@ AudioPoint::AudioPoint () } -AudioPoint::AudioPoint (cxml::ConstNodePtr node) +AudioPoint::AudioPoint(cxml::ConstNodePtr node) { _data[PEAK] = node->number_child<float>("Peak"); _data[RMS] = node->number_child<float>("RMS"); } -AudioPoint::AudioPoint (AudioPoint const & other) +AudioPoint::AudioPoint(AudioPoint const & other) { for (int i = 0; i < COUNT; ++i) { _data[i] = other._data[i]; @@ -54,7 +54,7 @@ AudioPoint::AudioPoint (AudioPoint const & other) AudioPoint & -AudioPoint::operator= (AudioPoint const & other) +AudioPoint::operator=(AudioPoint const & other) { if (this == &other) { return *this; @@ -69,7 +69,7 @@ AudioPoint::operator= (AudioPoint const & other) void -AudioPoint::as_xml (xmlpp::Element* parent) const +AudioPoint::as_xml(xmlpp::Element* parent) const { cxml::add_text_child(parent, "Peak", fmt::to_string(_data[PEAK])); cxml::add_text_child(parent, "RMS", fmt::to_string(_data[RMS])); diff --git a/src/lib/audio_point.h b/src/lib/audio_point.h index e7c232728..49646a8dc 100644 --- a/src/lib/audio_point.h +++ b/src/lib/audio_point.h @@ -40,14 +40,14 @@ public: COUNT }; - AudioPoint (); - explicit AudioPoint (cxml::ConstNodePtr node); - AudioPoint (AudioPoint const &); - AudioPoint& operator= (AudioPoint const &); + AudioPoint(); + explicit AudioPoint(cxml::ConstNodePtr node); + AudioPoint(AudioPoint const &); + AudioPoint& operator=(AudioPoint const &); - void as_xml (xmlpp::Element *) const; + void as_xml(xmlpp::Element *) const; - inline float& operator[] (int t) { + inline float& operator[](int t) { return _data[t]; } diff --git a/src/lib/rng.cc b/src/lib/rng.cc index 4d82cf721..b26776168 100644 --- a/src/lib/rng.cc +++ b/src/lib/rng.cc @@ -26,14 +26,14 @@ using namespace dcpomatic; -RNG::RNG (int32_t seed) - : _state (static_cast<uint32_t>(seed)) +RNG::RNG(int32_t seed) + : _state(static_cast<uint32_t>(seed)) { } -int32_t RNG::get () +int32_t RNG::get() { uint32_t const b = ((_state >> 0) ^ (_state >> 1) ^ (_state >> 2) ^ (_state >> 7)); _state = (_state >> 1) | (b << 23); diff --git a/src/lib/rng.h b/src/lib/rng.h index e3dc0c50d..d03988e7c 100644 --- a/src/lib/rng.h +++ b/src/lib/rng.h @@ -31,9 +31,9 @@ namespace dcpomatic { class RNG { public: - RNG (int32_t seed); + RNG(int32_t seed); - int32_t get (); + int32_t get(); private: uint32_t _state; diff --git a/test/atmos_test.cc b/test/atmos_test.cc index ef7449f20..33a427321 100644 --- a/test/atmos_test.cc +++ b/test/atmos_test.cc @@ -41,7 +41,7 @@ using std::vector; using boost::optional; -BOOST_AUTO_TEST_CASE (atmos_passthrough_test) +BOOST_AUTO_TEST_CASE(atmos_passthrough_test) { Cleanup cl; @@ -51,16 +51,16 @@ BOOST_AUTO_TEST_CASE (atmos_passthrough_test) &cl ); - make_and_verify_dcp (film, {dcp::VerificationNote::Code::MISSING_CPL_METADATA}); + make_and_verify_dcp(film, {dcp::VerificationNote::Code::MISSING_CPL_METADATA}); auto ref = TestPaths::private_data() / "atmos_asset.mxf"; - BOOST_REQUIRE (mxf_atmos_files_same(ref, dcp_file(film, "atmos"), true)); + BOOST_REQUIRE(mxf_atmos_files_same(ref, dcp_file(film, "atmos"), true)); - cl.run (); + cl.run(); } -BOOST_AUTO_TEST_CASE (atmos_encrypted_passthrough_test) +BOOST_AUTO_TEST_CASE(atmos_encrypted_passthrough_test) { Cleanup cl; @@ -68,11 +68,11 @@ BOOST_AUTO_TEST_CASE (atmos_encrypted_passthrough_test) auto content = content_factory(TestPaths::private_data() / "atmos_asset.mxf"); auto film = new_test_film("atmos_encrypted_passthrough_test", content, &cl); - film->set_encrypted (true); - film->_key = dcp::Key ("4fac12927eb122af1c2781aa91f3a4cc"); - make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); + film->set_encrypted(true); + film->_key = dcp::Key("4fac12927eb122af1c2781aa91f3a4cc"); + make_and_verify_dcp(film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); - BOOST_REQUIRE (!mxf_atmos_files_same(ref, dcp_file(film, "atmos"))); + BOOST_REQUIRE(!mxf_atmos_files_same(ref, dcp_file(film, "atmos"))); auto signer = Config::instance()->signer_chain(); BOOST_REQUIRE(signer->valid()); @@ -81,17 +81,17 @@ BOOST_AUTO_TEST_CASE (atmos_encrypted_passthrough_test) auto const kdm = decrypted_kdm.encrypt(signer, Config::instance()->decryption_chain()->leaf(), {}, dcp::Formulation::MODIFIED_TRANSITIONAL_1, false, {}); auto content2 = make_shared<DCPContent>(film->dir(film->dcp_name())); - content2->add_kdm (kdm); + content2->add_kdm(kdm); auto film2 = new_test_film("atmos_encrypted_passthrough_test2", {content2}, &cl); - make_and_verify_dcp (film2, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); + make_and_verify_dcp(film2, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); - BOOST_CHECK (mxf_atmos_files_same(ref, dcp_file(film2, "atmos"), true)); + BOOST_CHECK(mxf_atmos_files_same(ref, dcp_file(film2, "atmos"), true)); - cl.run (); + cl.run(); } -BOOST_AUTO_TEST_CASE (atmos_trim_test) +BOOST_AUTO_TEST_CASE(atmos_trim_test) { Cleanup cl; @@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE (atmos_trim_test) content[0]->set_trim_start(film, dcpomatic::ContentTime::from_seconds(1)); /* Just check that the encode runs; I'm not sure how to test the MXF */ - make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); + make_and_verify_dcp(film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); cl.run(); } |
