summaryrefslogtreecommitdiff
path: root/src/sound_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-05 01:24:19 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-05 01:24:19 +0000
commit5ee3348142f4cfafdbcf2c9c833843d717affc11 (patch)
tree1c97c80eeccc6b5f515a611e35dee35b21d3b09b /src/sound_asset.cc
parent740938890d95e853cf13d4780a5d674c3d6c7f6f (diff)
Various IMF hacks.imf
Diffstat (limited to 'src/sound_asset.cc')
-rw-r--r--src/sound_asset.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index 3b988c6c..b9d0b4ba 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -43,8 +43,9 @@ using std::list;
using boost::shared_ptr;
using namespace dcp;
-SoundAsset::SoundAsset (boost::filesystem::path file)
+SoundAsset::SoundAsset (boost::filesystem::path file, AssetType type)
: Asset (file)
+ , _type (type)
{
ASDCP::PCM::MXFReader reader;
Kumu::Result_t r = reader.OpenRead (file.string().c_str());
@@ -74,6 +75,7 @@ SoundAsset::SoundAsset (boost::filesystem::path file)
SoundAsset::SoundAsset (Fraction edit_rate, int sampling_rate, int channels)
: _edit_rate (edit_rate)
, _intrinsic_duration (0)
+ , _type (ASSET_DCP)
, _channels (channels)
, _sampling_rate (sampling_rate)
{
@@ -156,7 +158,7 @@ shared_ptr<const SoundFrame>
SoundAsset::get_frame (int n) const
{
/* XXX: should add on entry point here? */
- return shared_ptr<const SoundFrame> (new SoundFrame (file(), n, _decryption_context));
+ return shared_ptr<const SoundFrame> (new SoundFrame (file(), n, _decryption_context, _type, _edit_rate));
}
shared_ptr<SoundAssetWriter>