diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-06 20:10:13 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-21 21:57:18 +0200 |
| commit | cdc8bc6a7da0b4f8c3dbfcf560fea61473cf1ca3 (patch) | |
| tree | 6f6fc0c6b7897e6d3bd48fcc27e0e5eb08fc92b9 /examples | |
| parent | 445f2495fbb0885132d3a6c8e7a1e135cbac3cce (diff) | |
Support MCA sound channel tags in MXF/CPL.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/make_dcp.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/make_dcp.cc b/examples/make_dcp.cc index 0c7ebf77..734ae880 100644 --- a/examples/make_dcp.cc +++ b/examples/make_dcp.cc @@ -71,8 +71,12 @@ main () /* Now create a sound MXF. As before, create an object and a writer. When creating the object we specify the sampling rate (48kHz) and the number of channels (2). */ - boost::shared_ptr<dcp::SoundAsset> sound_asset (new dcp::SoundAsset (dcp::Fraction (24, 1), 48000, 2, dcp::SMPTE)); - boost::shared_ptr<dcp::SoundAssetWriter> sound_writer = sound_asset->start_write ("DCP/sound.mxf"); + boost::shared_ptr<dcp::SoundAsset> sound_asset (new dcp::SoundAsset(dcp::Fraction(24, 1), 48000, 2, dcp::LanguageTag("en-GB"), dcp::SMPTE)); + /* Here we must also say which of our channels will have "real" sound data in them */ + std::vector<dcp::Channel> active_channels; + active_channels.push_back (dcp::LEFT); + active_channels.push_back (dcp::RIGHT); + boost::shared_ptr<dcp::SoundAssetWriter> sound_writer = sound_asset->start_write ("DCP/sound.mxf", active_channels); /* Write some sine waves */ float* audio[2]; |
