HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
audio_block.hpp
1// Copyright Take Vos 2020-2021.
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 "../time/time.hpp"
8#include "../utility/utility.hpp"
9#include "../macros.hpp"
10#include <hikocpu/hikocpu.hpp>
11#include <span>
12
13hi_export_module(hikogui.audio.audio_block);
14
15hi_export namespace hi { inline namespace v1 {
16
17hi_export enum class audio_block_state { normal, silent, corrupt };
18
27hi_export class audio_block {
28public:
38 float **samples;
39
43
47
52
55 int64_t sample_count;
56
59 utc_nanoseconds time_stamp;
60
73 audio_block_state state;
74};
75
76}} // namespace hi::inline v1
The HikoGUI namespace.
Definition array_generic.hpp:20
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
A block of audio data.
Definition audio_block.hpp:27
int64_t sample_count
The sample count value for the first sample in the sample buffers.
Definition audio_block.hpp:55
int sample_rate
The sample rate this block was taken at.
Definition audio_block.hpp:51
std::size_t num_samples
Number of samples for each channel in samples.
Definition audio_block.hpp:42
std::size_t num_channels
Number of channels in samples.
Definition audio_block.hpp:46
audio_block_state state
The state of the audio block.
Definition audio_block.hpp:73
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:59
float ** samples
A list of pointers to non-interleaved sample buffers.
Definition audio_block.hpp:38