summaryrefslogtreecommitdiff
path: root/src/lib/sndfile_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-16 23:09:34 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-16 23:09:34 +0100
commit5778f4c92793a7950f02206e735a00731c87b090 (patch)
tree4d532804245e4da0b24cc0245d940edc260aa4db /src/lib/sndfile_content.cc
parentbfc0b96db6cc6c2e94d93f9c4239adca14a6bb0c (diff)
Fix up AudioMapping confusions with respect to number of content channels.
Diffstat (limited to 'src/lib/sndfile_content.cc')
-rw-r--r--src/lib/sndfile_content.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc
index 2dd7d8f67..7e6d56a9e 100644
--- a/src/lib/sndfile_content.cc
+++ b/src/lib/sndfile_content.cc
@@ -44,11 +44,11 @@ SndfileContent::SndfileContent (shared_ptr<const Film> f, boost::filesystem::pat
SndfileContent::SndfileContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node)
: Content (f, node)
, AudioContent (f, node)
+ , _audio_mapping (node->node_child ("AudioMapping"))
{
_audio_channels = node->number_child<int> ("AudioChannels");
_audio_length = node->number_child<AudioContent::Frame> ("AudioLength");
_audio_frame_rate = node->number_child<int> ("AudioFrameRate");
- _audio_mapping = AudioMapping (node->node_child ("AudioMapping"));
}
string
@@ -109,6 +109,7 @@ SndfileContent::examine (shared_ptr<Job> job)
/* XXX: do this in signal_changed...? */
_audio_mapping = AudioMapping (_audio_channels);
+ _audio_mapping.make_default ();
signal_changed (AudioContentProperty::AUDIO_MAPPING);
}