summaryrefslogtreecommitdiff
path: root/src/sound_asset.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound_asset.cc')
-rw-r--r--src/sound_asset.cc9
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>