HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
audio_channel.hpp
1// Copyright Take Vos 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 "../macros.hpp"
8#include "audio_direction.hpp"
9
10hi_export_module(hikogui.audio.audio_channel);
11
12namespace hi { inline namespace v1 {
13
14hi_export class audio_channel {
15public:
24 bool enabled;
25
30
33 [[nodiscard]] audio_direction direction() const noexcept;
34
37 [[nodiscard]] std::string id() const noexcept;
38
42
46
49 [[nodiscard]] float peak() noexcept;
50
56 [[nodiscard]] float rms(std::size_t num_samples) noexcept;
57};
58
59}} // namespace hi::inline v1
STL namespace.
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
Definition audio_channel.hpp:14
std::string name() const noexcept
The name of the audio channel according to the system.
std::size_t clip_count() noexcept
The number of times the audio clipped since last read.
bool enabled
If the channel is enabled by the user.
Definition audio_channel.hpp:24
audio_direction direction() const noexcept
The direction of audio.
float rms(std::size_t num_samples) noexcept
Get the running-RMS over the given number of samples.
std::size_t index() const noexcept
The index of the audio channel.
float peak() noexcept
The maximum peak sample value since last read.