summaryrefslogtreecommitdiff
path: root/src/sound_asset_writer.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-07-11 00:12:50 +0200
committerCarl Hetherington <cth@carlh.net>2020-07-11 21:14:02 +0200
commitaa646c58267a6bd2580f3cb30674f4ebd0ed6db7 (patch)
tree2abc9a3123bf4f2470b093f0332ddeccb1390b0d /src/sound_asset_writer.h
parent1b6f847eddca54ed223b22858c19c987aa61c2df (diff)
Allow creation of ATMOS sync on channel 14.atmos
Diffstat (limited to 'src/sound_asset_writer.h')
-rw-r--r--src/sound_asset_writer.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/sound_asset_writer.h b/src/sound_asset_writer.h
index b2de9e8e..f1b1514d 100644
--- a/src/sound_asset_writer.h
+++ b/src/sound_asset_writer.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -36,10 +36,16 @@
*/
#include "asset_writer.h"
+#include "fsk.h"
#include "types.h"
#include "sound_frame.h"
#include <boost/shared_ptr.hpp>
#include <boost/filesystem.hpp>
+#include <boost/shared_array.hpp>
+
+
+struct sync_test1;
+
namespace dcp {
@@ -62,10 +68,12 @@ public:
private:
friend class SoundAsset;
+ friend struct ::sync_test1;
- SoundAssetWriter (SoundAsset *, boost::filesystem::path);
+ SoundAssetWriter (SoundAsset *, boost::filesystem::path, bool sync);
void write_current_frame ();
+ std::vector<bool> create_sync_packets ();
/* do this with an opaque pointer so we don't have to include
ASDCP headers
@@ -76,6 +84,12 @@ private:
SoundAsset* _asset;
int _frame_buffer_offset;
+
+ /** true to ignore any signal passed to write() on channel 14 and instead write a sync track */
+ bool _sync;
+ /** index of the sync packet (0-3) which starts the next edit unit */
+ int _sync_packet;
+ FSK _fsk;
};
}