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#include <cstddef>
10#include <string>
11
12hi_export_module(hikogui.audio.audio_channel);
13
14hi_export namespace hi { inline namespace v1 {
15
16hi_export class audio_channel {
17public:
26 bool enabled;
27
31 [[nodiscard]] std::size_t index() const noexcept;
32
35 [[nodiscard]] audio_direction direction() const noexcept;
36
39 [[nodiscard]] std::string id() const noexcept;
40
43 [[nodiscard]] std::string name() const noexcept;
44
47 [[nodiscard]] std::size_t clip_count() noexcept;
48
51 [[nodiscard]] float peak() noexcept;
52
58 [[nodiscard]] float rms(std::size_t num_samples) noexcept;
59};
60
61}} // namespace hi::inline v1
STL namespace.
The HikoGUI namespace.
Definition array_generic.hpp:20
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
Definition audio_channel.hpp:16
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:26
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.