explicit SoundAsset (boost::filesystem::path file);
SoundAsset (Fraction edit_rate, int sampling_rate, int channels, LanguageTag language, Standard standard);
- std::shared_ptr<SoundAssetWriter> start_write(boost::filesystem::path file, bool atmos_sync = false, bool include_mca_subdescriptors = true);
+ enum class AtmosSync {
+ ENABLED,
+ DISABLED
+ };
+
+ enum class MCASubDescriptors {
+ ENABLED,
+ DISABLED
+ };
+
+ /** @param extra_active_channels list of channels that are active in the asset, other than the basic 5.1
+ * which are assumed always to be active.
+ */
+ std::shared_ptr<SoundAssetWriter> start_write(
+ boost::filesystem::path file,
+ std::vector<dcp::Channel> extra_active_channels,
+ AtmosSync atmos_sync,
+ MCASubDescriptors mca_subdescriptors
+ );
+
std::shared_ptr<SoundAssetReader> start_read () const;
bool equals (
std::shared_ptr<const Asset> other,
- EqualityOptions opt,
+ EqualityOptions const& opt,
NoteHandler note
) const override;
- /** @return number of channels */
+ /** @return number of channels in the MXF */
int channels () const {
return _channels;
}
+ /** @return An estimate of the number of channels that are actually in use */
+ int active_channels() const;
+
/** @return sampling rate in Hz */
int sampling_rate () const {
return _sampling_rate;
* content presented may be less than this.
*/
int64_t _intrinsic_duration = 0;
- int _channels = 0; ///< number of channels
- int _sampling_rate = 0; ///< sampling rate in Hz
+ int _channels = 0; ///< number of channels in the MXF
+ boost::optional<int> _active_channels; ///< estimate of the number of active channels
+ int _sampling_rate = 0; ///< sampling rate in Hz
boost::optional<std::string> _language;
};