-
- shared_ptr<const Film> film = _film.lock ();
- assert (film);
-
- SndfileDecoder dec (film, shared_from_this());
-
- {
- boost::mutex::scoped_lock lm (_mutex);
- _audio_channels = dec.audio_channels ();
- _audio_length = dec.audio_length ();
- _audio_frame_rate = dec.audio_frame_rate ();
- }
-
- signal_changed (AudioContentProperty::AUDIO_CHANNELS);
- signal_changed (AudioContentProperty::AUDIO_LENGTH);
- signal_changed (AudioContentProperty::AUDIO_FRAME_RATE);
-}
-
-void
-SndfileContent::as_xml (xmlpp::Node* node) const
-{
- node->add_child("Type")->add_child_text ("Sndfile");
- Content::as_xml (node);
- 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));
+ shared_ptr<AudioExaminer> dec (new SndfileDecoder (shared_from_this()));
+ take_from_audio_examiner (dec);