This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-#include <libdcp/cpl.h>
-#include <libdcp/dcp.h>
-#include <libdcp/sound_asset.h>
-#include <libdcp/sound_frame.h>
-#include <libdcp/reel.h>
+#include <dcp/cpl.h>
+#include <dcp/dcp.h>
+#include <dcp/sound_asset.h>
+#include <dcp/sound_frame.h>
+#include <dcp/reel_sound_asset.h>
+#include <dcp/reel.h>
shared_ptr<Film> film = new_test_film ("ffmpeg_audio_test");
film->set_name ("ffmpeg_audio_test");
shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/staircase.mov"));
shared_ptr<Film> film = new_test_film ("ffmpeg_audio_test");
film->set_name ("ffmpeg_audio_test");
shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/staircase.mov"));
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
boost::filesystem::path path = "build/test";
path /= "ffmpeg_audio_test";
path /= film->dcp_name ();
boost::filesystem::path path = "build/test";
path /= "ffmpeg_audio_test";
path /= film->dcp_name ();
- while (n < sound_asset->intrinsic_duration()) {
- shared_ptr<const libdcp::SoundFrame> sound_frame = sound_asset->get_frame (frame++);
+ while (n < sound_asset->asset()->intrinsic_duration()) {
+ shared_ptr<const dcp::SoundFrame> sound_frame = sound_asset->asset()->get_frame (frame++);
/* L should be silent */
int const sample = d[i + 0] | (d[i + 1] << 8);
BOOST_CHECK_EQUAL (sample, 0);
}
/* L should be silent */
int const sample = d[i + 0] | (d[i + 1] << 8);
BOOST_CHECK_EQUAL (sample, 0);
}
/* R should be silent */
int const sample = d[i + 2] | (d[i + 3] << 8);
BOOST_CHECK_EQUAL (sample, 0);
}
/* R should be silent */
int const sample = d[i + 2] | (d[i + 3] << 8);
BOOST_CHECK_EQUAL (sample, 0);
}
/* Mono input so it will appear on centre */
int const sample = d[i + 7] | (d[i + 8] << 8);
BOOST_CHECK_EQUAL (sample, n);
}
/* Mono input so it will appear on centre */
int const sample = d[i + 7] | (d[i + 8] << 8);
BOOST_CHECK_EQUAL (sample, n);
}
/* Lfe should be silent */
int const sample = d[i + 9] | (d[i + 10] << 8);
BOOST_CHECK_EQUAL (sample, 0);
}
/* Lfe should be silent */
int const sample = d[i + 9] | (d[i + 10] << 8);
BOOST_CHECK_EQUAL (sample, 0);
}
/* Ls should be silent */
int const sample = d[i + 11] | (d[i + 12] << 8);
BOOST_CHECK_EQUAL (sample, 0);
}
/* Ls should be silent */
int const sample = d[i + 11] | (d[i + 12] << 8);
BOOST_CHECK_EQUAL (sample, 0);
}
/* Rs should be silent */
int const sample = d[i + 13] | (d[i + 14] << 8);
BOOST_CHECK_EQUAL (sample, 0);
/* Rs should be silent */
int const sample = d[i + 13] | (d[i + 14] << 8);
BOOST_CHECK_EQUAL (sample, 0);