From aa646c58267a6bd2580f3cb30674f4ebd0ed6db7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 11 Jul 2020 00:12:50 +0200 Subject: Allow creation of ATMOS sync on channel 14. --- src/sound_asset.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/sound_asset.cc') 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 other, EqualityOptions opt, NoteHand } shared_ptr -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 (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 (new SoundAssetWriter(this, file, atmos_sync)); } shared_ptr -- cgit v1.2.3