+
+void
+AudioContent::set_streams (vector<AudioStreamPtr> streams)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _streams = streams;
+ }
+
+ _parent->signal_changed (AudioContentProperty::STREAMS);
+}
+
+AudioStreamPtr
+AudioContent::stream () const
+{
+ boost::mutex::scoped_lock lm (_mutex);
+ DCPOMATIC_ASSERT (_streams.size() == 1);
+ return _streams.front ();
+}
+
+void
+AudioContent::add_stream (AudioStreamPtr stream)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _streams.push_back (stream);
+ }
+
+ _parent->signal_changed (AudioContentProperty::STREAMS);
+}
+
+void
+AudioContent::set_stream (AudioStreamPtr stream)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _streams.clear ();
+ _streams.push_back (stream);
+ }
+
+ _parent->signal_changed (AudioContentProperty::STREAMS);
+}
+
+void
+AudioContent::use_template (shared_ptr<const AudioContent> c)
+{
+ _gain = c->_gain;
+ _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;
+ }
+}