summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-24 00:54:25 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-24 00:54:25 +0100
commitb489c7ad24303799a32412e160fe27c4e9eddb29 (patch)
tree3dd84a4f5079807fe84c05234c75a8a28e6833e7
parent338302bb147396c7956cf658f68c574f56c74fa8 (diff)
Add channels parameter to simple_audio().
-rw-r--r--src/sound_asset.h4
-rw-r--r--test/test.cc4
-rw-r--r--test/test.h3
3 files changed, 5 insertions, 6 deletions
diff --git a/src/sound_asset.h b/src/sound_asset.h
index c943d88b..717aab82 100644
--- a/src/sound_asset.h
+++ b/src/sound_asset.h
@@ -55,7 +55,7 @@ namespace dcp {
extern std::shared_ptr<dcp::SoundAsset> simple_sound (
- boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language, int frames, int sample_rate, boost::optional<dcp::Key>
+ boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language, int frames, int sample_rate, boost::optional<dcp::Key>, int channels
);
@@ -112,7 +112,7 @@ public:
private:
friend class SoundAssetWriter;
friend std::shared_ptr<dcp::SoundAsset> (::simple_sound) (
- boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language, int frames, int sample_rate, boost::optional<dcp::Key>
+ boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language, int frames, int sample_rate, boost::optional<dcp::Key>, int channels
);
std::string pkl_type (Standard standard) const override {
diff --git a/test/test.cc b/test/test.cc
index 450ff514..fb4f48c5 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -292,10 +292,8 @@ simple_picture (boost::filesystem::path path, string suffix, int frames, optiona
shared_ptr<dcp::SoundAsset>
-simple_sound (boost::filesystem::path path, string suffix, dcp::MXFMetadata mxf_meta, string language, int frames, int sample_rate, optional<dcp::Key> key)
+simple_sound(boost::filesystem::path path, string suffix, dcp::MXFMetadata mxf_meta, string language, int frames, int sample_rate, optional<dcp::Key> key, int channels)
{
- int const channels = 6;
-
/* Set a valid language, then overwrite it, so that the language parameter can be badly formed */
auto ms = make_shared<dcp::SoundAsset>(dcp::Fraction(24, 1), sample_rate, channels, dcp::LanguageTag("en-US"), dcp::Standard::SMPTE);
if (key) {
diff --git a/test/test.h b/test/test.h
index 339dd8aa..82e6afd5 100644
--- a/test/test.h
+++ b/test/test.h
@@ -56,7 +56,8 @@ extern std::shared_ptr<dcp::SoundAsset> simple_sound (
std::string language,
int frames = 24,
int sample_rate = 48000,
- boost::optional<dcp::Key> key = boost::optional<dcp::Key>()
+ boost::optional<dcp::Key> key = boost::optional<dcp::Key>(),
+ int channels = 6
);
extern std::shared_ptr<dcp::Subtitle> simple_subtitle ();
extern std::shared_ptr<dcp::ReelMarkersAsset> simple_markers (int frames = 24);