}
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>