diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-07-11 00:12:50 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-07-11 23:45:52 +0200 |
| commit | 9a8faacd1b81f5e61512c69e99d0b8456478197e (patch) | |
| tree | 2ab1b21e2b396e4a2f3254ff0f805acedaba0150 /src/sound_asset.cc | |
| parent | 1b6f847eddca54ed223b22858c19c987aa61c2df (diff) | |
Allow creation of ATMOS sync on channel 14.
Diffstat (limited to 'src/sound_asset.cc')
| -rw-r--r-- | src/sound_asset.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc index c28a33fe..7f2bf5e3 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -193,10 +193,13 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHand } shared_ptr<SoundAssetWriter> -SoundAsset::start_write (boost::filesystem::path file) +SoundAsset::start_write (boost::filesystem::path file, bool atmos_sync) { - /* XXX: can't we use a shared_ptr here? */ - return shared_ptr<SoundAssetWriter> (new SoundAssetWriter (this, file)); + if (atmos_sync && _channels < 14) { + throw MiscError ("Insufficient channels to write ATMOS sync (there must be at least 14)"); + } + + return shared_ptr<SoundAssetWriter> (new SoundAssetWriter(this, file, atmos_sync)); } shared_ptr<SoundAssetReader> |
