++j;
}
}
+
+void
+AudioContent::modify_position (DCPTime& pos) const
+{
+ pos = pos.round (_parent->film()->audio_frame_rate());
+}
+
+void
+AudioContent::modify_trim_start (ContentTime& trim) const
+{
+ trim = trim.round (stream()->frame_rate());
+}
void add_properties (std::list<UserProperty> &) const;
+ void modify_position (DCPTime& pos) const;
+ void modify_trim_start (ContentTime& pos) const;
+
static boost::shared_ptr<AudioContent> from_xml (Content* parent, cxml::ConstNodePtr, int version);
private:
void
Content::set_position (DCPTime p)
{
- /* video content can modify its position */
+ /* video and audio content can modify its position */
+
if (video) {
video->modify_position (p);
}
+ if (audio) {
+ audio->modify_position (p);
+ }
+
{
boost::mutex::scoped_lock lm (_mutex);
if (p == _position) {
void
Content::set_trim_start (ContentTime t)
{
- /* video content can modify its start trim */
+ /* video and audio content can modify its start trim */
+
if (video) {
video->modify_trim_start (t);
}
+ if (audio) {
+ audio->modify_trim_start (t);
+ }
+
{
boost::mutex::scoped_lock lm (_mutex);
_trim_start = t;