diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-20 16:21:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-20 16:21:55 +0100 |
| commit | 0c66eaeac227d6aeb63a7a36e202ef87081dc222 (patch) | |
| tree | fe59970e8ca5d6bfc7859fa6f901b1f1ed04eb33 /src/lib/sndfile_content.cc | |
| parent | 56aa7eef1572e48c96ff198ee52a5a5fe17a6bf0 (diff) | |
Some basics of AudioMapping.
Diffstat (limited to 'src/lib/sndfile_content.cc')
| -rw-r--r-- | src/lib/sndfile_content.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index 210ca1577..963abb58e 100644 --- a/src/lib/sndfile_content.cc +++ b/src/lib/sndfile_content.cc @@ -1,3 +1,5 @@ +/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */ + /* Copyright (C) 2013 Carl Hetherington <cth@carlh.net> @@ -48,6 +50,7 @@ SndfileContent::SndfileContent (shared_ptr<const cxml::Node> node) _audio_channels = node->number_child<int> ("AudioChannels"); _audio_length = node->number_child<ContentAudioFrame> ("AudioLength"); _audio_frame_rate = node->number_child<int> ("AudioFrameRate"); + _mapping = AudioMapping (node->node_child ("Mapping")); } string @@ -103,6 +106,7 @@ SndfileContent::examine (shared_ptr<Film> film, shared_ptr<Job> job, bool quick) _audio_channels = dec.audio_channels (); _audio_length = dec.audio_length (); _audio_frame_rate = dec.audio_frame_rate (); + _mapping = AudioMapping (_audio_channels); } signal_changed (AudioContentProperty::AUDIO_CHANNELS); @@ -118,6 +122,7 @@ SndfileContent::as_xml (xmlpp::Node* node) const node->add_child("AudioChannels")->add_child_text (lexical_cast<string> (_audio_channels)); node->add_child("AudioLength")->add_child_text (lexical_cast<string> (_audio_length)); node->add_child("AudioFrameRate")->add_child_text (lexical_cast<string> (_audio_frame_rate)); + _mapping.as_xml (node->add_child("Mapping")); } int |
