diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-17 20:30:30 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-17 20:30:30 +0100 |
| commit | 4709b2fe88040f3678560997726f3a209eacc660 (patch) | |
| tree | db4c7f923de4bd4e09de6c5237288424f0622a24 /src/sound_asset.cc | |
| parent | 43cc9d6e1b1e1957288c545cc55f5a0df8492b55 (diff) | |
Fix up progress reporting, some better exceptions.
Diffstat (limited to 'src/sound_asset.cc')
| -rw-r--r-- | src/sound_asset.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc index 9dba4ed6..50bf463c 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -36,8 +36,8 @@ using namespace libdcp; * @param len Length in frames. */ -SoundAsset::SoundAsset (list<string> const & files, string p, int fps, int len) - : Asset (p, fps, len) +SoundAsset::SoundAsset (list<string> const & files, string p, sigc::signal1<void, float>* progress, int fps, int len) + : Asset (p, progress, fps, len) { ASDCP::Rational asdcp_fps (_fps, 1); @@ -114,14 +114,14 @@ SoundAsset::SoundAsset (list<string> const & files, string p, int fps, int len) throw runtime_error ("could not write audio MXF frame"); } - Progress (float (i) / _length); + (*_progress) (0.5 * float (i) / _length); } if (ASDCP_FAILURE (mxf_writer.Finalize())) { throw runtime_error ("could not finalise audio MXF"); } - _digest = make_digest (_mxf_path); + _digest = make_digest (_mxf_path, _progress); } /** Write details of this asset to a CPL stream. |
