summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-07-17 09:12:38 +0200
committerRobin Gareus <robin@gareus.org>2018-07-17 09:44:34 +0200
commite5a181c323243a03338f5a9934a5df254986370d (patch)
treed916ff7dbc9905222414205c74d207b907c33bf0 /libs/ardour/ardour
parent854df0ae24ff997979fa5d3e005a4a5cb4eb3acb (diff)
Refactor LTC File decoder, prepare for Lua bindings
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/ltc_file_reader.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/libs/ardour/ardour/ltc_file_reader.h b/libs/ardour/ardour/ltc_file_reader.h
index 6ced83951e..c555177cf5 100644
--- a/libs/ardour/ardour/ltc_file_reader.h
+++ b/libs/ardour/ardour/ltc_file_reader.h
@@ -29,6 +29,22 @@
namespace ARDOUR {
+class LIBARDOUR_API LTCReader
+{
+public:
+ LTCReader (int expected_apv, LTC_TV_STANDARD tv_standard = LTC_TV_FILM_24);
+ ~LTCReader ();
+
+ void write (float const*, samplecnt_t n_samples, samplepos_t pos = -1);
+ void raw_write (ltcsnd_sample_t*, size_t, ltc_off_t);
+
+ bool read (uint32_t& hh, uint32_t& mm, uint32_t& ss, uint32_t& ff);
+
+private:
+ LTCDecoder* _decoder;
+ samplecnt_t _position;
+};
+
class LIBARDOUR_API LTCFileReader
{
public:
@@ -60,9 +76,8 @@ private:
SNDFILE* _sndfile;
SF_INFO _info;
- LTCDecoder* decoder;
- float* _interleaved_audio_buffer;
- uint32_t _frames_decoded;
+ LTCReader* _reader;
+ float* _interleaved_audio_buffer;
samplecnt_t _samples_read;
};