X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_content.cc;h=a252e4b5afae12c01c0f216afa2089144fa275cd;hb=14cccb179fff7bbbf422e13f9d2e3264239c93c7;hp=e66b8b998ded170d9ec2d56df47417c278c653b7;hpb=73654117144c6de0ec4efe39ddc88485df546cc9;p=dcpomatic.git diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc index e66b8b998..a252e4b5a 100644 --- a/src/lib/audio_content.cc +++ b/src/lib/audio_content.cc @@ -135,9 +135,9 @@ AudioContent::set_delay (int d) string AudioContent::technical_summary () const { - string s = "audio :"; + string s = "audio: "; BOOST_FOREACH (AudioStreamPtr i, streams ()) { - s += String::compose ("stream channels %1 rate %2", i->channels(), i->frame_rate()); + s += String::compose ("stream channels %1 rate %2 ", i->channels(), i->frame_rate()); } return s; @@ -250,14 +250,14 @@ AudioContent::processing_description () const } if (not_resampled && resampled) { - return String::compose (_("Some audio will be resampled to %1kHz"), resampled_frame_rate ()); + return String::compose (_("Some audio will be resampled to %1Hz"), resampled_frame_rate ()); } if (!not_resampled && resampled) { if (same) { - return String::compose (_("Audio will be resampled from %1kHz to %2kHz"), common_frame_rate.get(), resampled_frame_rate ()); + return String::compose (_("Audio will be resampled from %1Hz to %2Hz"), common_frame_rate.get(), resampled_frame_rate ()); } else { - return String::compose (_("Audio will be resampled to %1kHz"), resampled_frame_rate ()); + return String::compose (_("Audio will be resampled to %1Hz"), resampled_frame_rate ()); } } @@ -379,3 +379,19 @@ AudioContent::set_stream (AudioStreamPtr stream) _parent->signal_changed (AudioContentProperty::STREAMS); } + +void +AudioContent::take_settings_from (shared_ptr c) +{ + set_gain (c->_gain); + set_delay (c->_delay); + + size_t i = 0; + size_t j = 0; + + while (i < _streams.size() && j < c->_streams.size()) { + _streams[i]->set_mapping (c->_streams[j]->mapping()); + ++i; + ++j; + } +}