HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
audio_block.hpp
1// Copyright Take Vos 2020.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "../chrono.hpp"
8#include "../required.hpp"
9#include "../assert.hpp"
10#include "../rapid/numeric_array.hpp"
11#include <span>
12
13namespace tt {
14
15enum class audio_block_state { normal, silent, corrupt };
16
26public:
36 float **samples;
37
41
45
50
53 int64_t sample_count;
54
57 utc_nanoseconds time_stamp;
58
71 audio_block_state state;
72};
73
74} // namespace tt
A block of audio data.
Definition audio_block.hpp:25
int64_t sample_count
The sample count value for the first sample in the sample buffers.
Definition audio_block.hpp:53
size_t num_channels
Number of channels in samples.
Definition audio_block.hpp:44
audio_block_state state
The state of the audio block.
Definition audio_block.hpp:71
float ** samples
A list of pointers to non-interleaved sample buffers.
Definition audio_block.hpp:36
int sample_rate
The sample rate this block was taken at.
Definition audio_block.hpp:49
utc_nanoseconds time_stamp
Time point when the sample was at the input or will be at the output of the audio interface.
Definition audio_block.hpp:57
size_t num_samples
Number of samples for each channel in samples.
Definition audio_block.hpp:40