Make similar changes to the previous commit for _xml_id.
[libdcp.git] / src / sound_asset.cc
index fe0c5dd0447647875bd82131b5eeaee7b9bfb761..0eaa8fb50f69269c66b86b37e428a4f0e0368707 100644 (file)
  */
 
 
-#include "sound_asset.h"
-#include "util.h"
-#include "exceptions.h"
-#include "sound_frame.h"
-#include "sound_asset_writer.h"
-#include "sound_asset_reader.h"
 #include "compose.hpp"
 #include "dcp_assert.h"
+#include "exceptions.h"
+#include "sound_asset.h"
+#include "sound_asset_reader.h"
+#include "sound_asset_writer.h"
+#include "sound_frame.h"
+#include "util.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/AS_DCP.h>
 #include <asdcp/KM_fileio.h>
 #include <asdcp/Metadata.h>
+LIBDCP_ENABLE_WARNINGS
 #include <libxml++/nodes/element.h>
 #include <boost/filesystem.hpp>
 #include <stdexcept>
@@ -63,11 +66,6 @@ using namespace dcp;
 
 SoundAsset::SoundAsset (boost::filesystem::path file)
        : Asset (file)
-       /* XXX: this is a fallback language, which will be used if we can't find the RFC5646SpokenLanguage
-        * in the MXF header.  Perhaps RFC5646SpokenLanguage is optional and we should just not write it
-        * if we don't know it.
-        */
-       , _language ("en-US")
 {
        ASDCP::PCM::MXFReader reader;
        auto r = reader.OpenRead (file.string().c_str());
@@ -209,7 +207,7 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHand
                                for (int channel = 0; channel < frame_A->channels(); ++channel) {
                                        int32_t const d = abs(frame_A->get(channel, sample) - frame_B->get(channel, sample));
                                        if (d > opt.max_audio_sample_error) {
-                                               note (NoteType::ERROR, String::compose ("PCM data difference of %1", d));
+                                               note (NoteType::ERROR, String::compose("PCM data difference of %1 in frame %2, channel %3, sample %4", d, i, channel, sample));
                                                return false;
                                        }
                                }