Support more than one closed caption asset per reel.
[libdcp.git] / src / sound_asset.cc
index 11fd4b2fae685ec081f0221fe6ea35c98abcd134..1f1c2f4314b7589fdd551c812805dfb4961ddaec 100644 (file)
@@ -84,8 +84,9 @@ SoundAsset::SoundAsset (boost::filesystem::path file)
        _id = read_writer_info (info);
 }
 
-SoundAsset::SoundAsset (Fraction edit_rate, int sampling_rate, int channels)
-       : _edit_rate (edit_rate)
+SoundAsset::SoundAsset (Fraction edit_rate, int sampling_rate, int channels, Standard standard)
+       : MXF (standard)
+       , _edit_rate (edit_rate)
        , _intrinsic_duration (0)
        , _channels (channels)
        , _sampling_rate (sampling_rate)
@@ -192,20 +193,20 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHand
 }
 
 shared_ptr<SoundAssetWriter>
-SoundAsset::start_write (boost::filesystem::path file, Standard standard)
+SoundAsset::start_write (boost::filesystem::path file)
 {
        /* XXX: can't we use a shared_ptr here? */
-       return shared_ptr<SoundAssetWriter> (new SoundAssetWriter (this, file, standard));
+       return shared_ptr<SoundAssetWriter> (new SoundAssetWriter (this, file));
 }
 
 shared_ptr<SoundAssetReader>
 SoundAsset::start_read () const
 {
-       return shared_ptr<SoundAssetReader> (new SoundAssetReader (this));
+       return shared_ptr<SoundAssetReader> (new SoundAssetReader (this, key(), standard()));
 }
 
 string
-SoundAsset::pkl_type (Standard standard) const
+SoundAsset::static_pkl_type (Standard standard)
 {
        switch (standard) {
        case INTEROP: