- AudioContent (boost::filesystem::path);
- AudioContent (boost::shared_ptr<const cxml::Node>);
- AudioContent (AudioContent const &);
-
- virtual int audio_channels () const = 0;
- virtual ContentAudioFrame audio_length () const = 0;
- virtual int audio_frame_rate () const = 0;
- virtual int64_t audio_channel_layout () const = 0;
-
+ explicit AudioContent (Content* parent);
+ AudioContent (Content* parent, std::vector<boost::shared_ptr<Content> >);
+
+ void as_xml (xmlpp::Node *) const;
+ std::string technical_summary () const;
+ void take_settings_from (boost::shared_ptr<const AudioContent> c);
+
+ AudioMapping mapping () const;
+ void set_mapping (AudioMapping);
+ int resampled_frame_rate (boost::shared_ptr<const Film> film) const;
+ bool has_rate_above_48k () const;
+ std::vector<std::string> channel_names () const;
+
+ void set_gain (double);
+ void set_delay (int);
+
+ double gain () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _gain;
+ }
+
+ int delay () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _delay;
+ }
+
+ std::string processing_description (boost::shared_ptr<const Film> film) const;
+
+ std::vector<AudioStreamPtr> streams () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _streams;
+ }
+
+ void add_stream (AudioStreamPtr stream);
+ void set_stream (AudioStreamPtr stream);
+ void set_streams (std::vector<AudioStreamPtr> streams);
+ AudioStreamPtr stream () const;
+
+ void add_properties (boost::shared_ptr<const Film> film, std::list<UserProperty> &) const;
+
+ void modify_position (boost::shared_ptr<const Film> film, DCPTime& pos) const;
+ void modify_trim_start (ContentTime& pos) const;
+
+ static boost::shared_ptr<AudioContent> from_xml (Content* parent, cxml::ConstNodePtr, int version);
+
+private:
+
+ AudioContent (Content* parent, cxml::ConstNodePtr);
+
+ /** Gain to apply to audio in dB */
+ double _gain;
+ /** Delay to apply to audio (positive moves audio later) in milliseconds */
+ int _delay;
+ std::vector<AudioStreamPtr> _streams;