diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
| commit | ceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 (patch) | |
| tree | c55e4b85ee30138ce83263045d77d01631378b2e /src/sound_asset_writer.h | |
| parent | 6c37cc1979b2a01205a888c4c98f3334685ee8dd (diff) | |
Tidying.
Diffstat (limited to 'src/sound_asset_writer.h')
| -rw-r--r-- | src/sound_asset_writer.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/sound_asset_writer.h b/src/sound_asset_writer.h index f1cdf419..d2eba024 100644 --- a/src/sound_asset_writer.h +++ b/src/sound_asset_writer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -31,10 +31,12 @@ files in the program, then also delete it here. */ + /** @file src/sound_asset_writer.h - * @brief SoundAssetWriter class. + * @brief SoundAssetWriter class */ + #include "asset_writer.h" #include "fsk.h" #include "types.h" @@ -49,8 +51,10 @@ struct sync_test1; namespace dcp { + class SoundAsset; + /** @class SoundAssetWriter * @brief A helper class for writing to SoundAssets. * @@ -63,7 +67,11 @@ class SoundAsset; class SoundAssetWriter : public AssetWriter { public: + /** @param data Pointer an array of float pointers, one for each channel. + * @param frames Number of frames i.e. number of floats that are given for each channel. + */ void write (float const * const *, int); + bool finalize (); private: @@ -83,13 +91,13 @@ private: struct ASDCPState; std::shared_ptr<ASDCPState> _state; - SoundAsset* _asset; - int _frame_buffer_offset; + SoundAsset* _asset = nullptr; + int _frame_buffer_offset = 0; /** true to ignore any signal passed to write() on channel 14 and instead write a sync track */ - bool _sync; + bool _sync = false; /** index of the sync packet (0-3) which starts the next edit unit */ - int _sync_packet; + int _sync_packet = 0; FSK _fsk; std::vector<Channel> _active_channels; |
