libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
ltcencoder.h
Go to the documentation of this file.
1
8#pragma once
9
12#include <promeki/proav/audio.h>
13#include <vtc/ltc_audio.h>
14
16
36 public:
42 LtcEncoder(int sampleRate, float level = 0.5f);
43
45 ~LtcEncoder() = default;
46
47 LtcEncoder(const LtcEncoder &) = delete;
48 LtcEncoder &operator=(const LtcEncoder &) = delete;
49 LtcEncoder(LtcEncoder &&) = default;
50 LtcEncoder &operator=(LtcEncoder &&) = default;
51
56 int sampleRate() const { return _encoder.sample_rate; }
57
62 float level() const { return _encoder.level; }
63
68 void setLevel(float level);
69
76
85 size_t frameSizeApprox(const VtcFormat *format) const;
86
87 private:
88 VtcLTCEncoder _encoder;
89};
90
Object to hold some number of audio samples.
Definition audio.h:35
Dynamic array container wrapping std::vector.
Definition list.h:40
Encodes timecode values into LTC (Linear Timecode) audio samples.
Definition ltcencoder.h:35
Audio encode(const Timecode &tc)
Encodes one timecode frame into mono int8_t audio.
~LtcEncoder()=default
Destructor.
int sampleRate() const
Returns the configured sample rate.
Definition ltcencoder.h:56
size_t frameSizeApprox(const VtcFormat *format) const
Returns the approximate number of samples per LTC frame.
LtcEncoder(int sampleRate, float level=0.5f)
Constructs an LTC encoder.
float level() const
Returns the output amplitude level.
Definition ltcencoder.h:62
void setLevel(float level)
Sets the output amplitude.
Class for holding and manipulating timecode.
Definition timecode.h:45
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19