/*
- Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
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"
#include "sound_frame.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/filesystem.hpp>
#include <boost/shared_array.hpp>
namespace dcp {
+
class SoundAsset;
+
/** @class SoundAssetWriter
* @brief A helper class for writing to SoundAssets.
*
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:
*/
struct ASDCPState;
- boost::shared_ptr<ASDCPState> _state;
+ 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;