diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-15 13:38:14 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-15 13:38:14 +0100 |
| commit | 6322c72a13d7be2e991a8e0421414c0af8187b88 (patch) | |
| tree | b4ca07d1f00016bcd407152202ab408b59f093d4 /src/sound_asset.cc | |
| parent | 4709841e68d860c4fbee2f2f824e57489c8ad97d (diff) | |
Use boost::function for making notes during equals operations.
Diffstat (limited to 'src/sound_asset.cc')
| -rw-r--r-- | src/sound_asset.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc index e18441c6..da6e72bc 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -222,9 +222,9 @@ SoundAsset::write_to_cpl (ostream& s) const } bool -SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, list<string>& notes) const +SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (string)> note) const { - if (!MXFAsset::equals (other, opt, notes)) { + if (!MXFAsset::equals (other, opt, note)) { return false; } @@ -260,7 +260,7 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, list<str // desc_A.ChannelFormat != desc_B.ChannelFormat || ) { - notes.push_back ("audio MXF picture descriptors differ"); + note ("audio MXF picture descriptors differ"); return false; } @@ -277,7 +277,7 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, list<str } if (buffer_A.Size() != buffer_B.Size()) { - notes.push_back ("sizes of audio data for frame " + lexical_cast<string>(i) + " differ"); + note ("sizes of audio data for frame " + lexical_cast<string>(i) + " differ"); return false; } @@ -285,7 +285,7 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, list<str for (uint32_t i = 0; i < buffer_A.Size(); ++i) { int const d = abs (buffer_A.RoData()[i] - buffer_B.RoData()[i]); if (d > opt.max_audio_sample_error) { - notes.push_back ("PCM data difference of " + lexical_cast<string> (d)); + note ("PCM data difference of " + lexical_cast<string> (d)); return false; } } |
