7#include "../hires_utc_clock.hpp"
8#include "../required.hpp"
9#include "../assert.hpp"
A block of audio data.
Definition audio_block.hpp:24
ssize_t number_of_channels
Number of channels in this audio block.
Definition audio_block.hpp:43
double word_clock_sample_rate
Sample rate of the word clock attached to the audio interface For example in some situation on film s...
Definition audio_block.hpp:89
double device_sample_rate
Sample rate to what the audio device is configured to.
Definition audio_block.hpp:93
hires_utc_clock::time_point timestamp
Timestamp when the sample first sample in this block was captured at the audio device input or when t...
Definition audio_block.hpp:83
bool silent
This block of audio is silent.
Definition audio_block.hpp:109
ssize_t number_of_samples() const noexcept
Number of samples in this audio block.
Definition audio_block.hpp:36
ssize_t number_of_vectors
Number of vector of samples in this audio block.
Definition audio_block.hpp:31
static constexpr ssize_t samples_per_vector
The number of samples in a vector.
Definition audio_block.hpp:27
std::span< float > samples
Sample data.
Definition audio_block.hpp:53
std::span< float > samples_for_channel(ssize_t index) noexcept
Sample data for a channel.
Definition audio_block.hpp:61
bool corrupt
The sample data in this block was corrupted Examples of how corruption could happen:
Definition audio_block.hpp:103
uint64_t sample_position
The sample position of the first sample in this block since the start of the capture/render session.
Definition audio_block.hpp:75