diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-02-27 22:26:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-02-27 22:26:57 +0100 |
| commit | bcc4e2f7dc4cd5658e199ddacb7202b00ec72cf1 (patch) | |
| tree | 70a6d59908b1d1391e2f9ecd2c8bd17890b3bbc5 /test | |
| parent | a2ceaa313a2b8ba28516c935f7f8b82d69957b77 (diff) | |
Add and use dB/linear conversion functions.
Diffstat (limited to 'test')
| -rw-r--r-- | test/torture_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/torture_test.cc b/test/torture_test.cc index 10d343268..8bd541ad2 100644 --- a/test/torture_test.cc +++ b/test/torture_test.cc @@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE (torture_test1) staircase->set_position (film, DCPTime::from_frames (2000, film->audio_frame_rate())); staircase->set_trim_start (ContentTime::from_frames (12, 48000)); staircase->set_trim_end (ContentTime::from_frames (35, 48000)); - staircase->audio->set_gain (20 * log10(2)); + staircase->audio->set_gain (linear_to_db(6)); /* And again at an offset of 50000 samples, trimmed both start and end, with a gain of 6dB */ staircase = content_factory("test/data/staircase.wav").front (); @@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE (torture_test1) staircase->set_position (film, DCPTime::from_frames(50000, film->audio_frame_rate())); staircase->set_trim_start (ContentTime::from_frames (12, 48000)); staircase->set_trim_end (ContentTime::from_frames (35, 48000)); - staircase->audio->set_gain (20 * log10(2)); + staircase->audio->set_gain (linear_to_db(6)); /* 1s of red at 5s in */ shared_ptr<Content> red = content_factory("test/data/flat_red.png").front (); |
