libdcp
Public Member Functions | Private Attributes | List of all members
dcp::FSK Class Reference

Create frequency-shift-keyed samples for encoding synchronization signals. More...

#include <fsk.h>

Public Member Functions

void set_data (std::vector< bool > data)
 
int32_t get ()
 

Private Attributes

std::vector< bool > _data
 
int _data_position = 0
 
int _sample_position = 0
 
bool _last_polarity = false
 
bool _last_bit = false
 

Detailed Description

Create frequency-shift-keyed samples for encoding synchronization signals.

An array of data is given to a FSK object using set_data(), and on calling get() this data will be returned in a the D-Cinema FSK "format", sample by sample, starting with the MSB of the first byte in the data array.

Definition at line 55 of file fsk.h.

Member Function Documentation

◆ get()

int32_t FSK::get ( )
Returns
the next sample as a 24-bit signed integer

Definition at line 64 of file fsk.cc.

Member Data Documentation

◆ _data_position

int dcp::FSK::_data_position = 0
private

current offset into _data

Definition at line 68 of file fsk.h.

◆ _last_bit

bool dcp::FSK::_last_bit = false
private

value of the last bit to be written

Definition at line 74 of file fsk.h.

◆ _last_polarity

bool dcp::FSK::_last_polarity = false
private

polarity of the last bit to be written (false for -ve, true for +ve)

Definition at line 72 of file fsk.h.

◆ _sample_position

int dcp::FSK::_sample_position = 0
private

current sample number of the current bit (0-3)

Definition at line 70 of file fsk.h.


The documentation for this class was generated from the following files: