HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
hikogui
audio
audio_stream_format.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 "audio_sample_format.hpp"
8
#include "speaker_mapping.hpp"
9
#include <bit>
10
11
namespace
hi::inline v1 {
12
15
struct
audio_stream_format
{
16
audio_sample_format
sample_format;
17
double
sample_rate;
18
hi::speaker_mapping speaker_mapping;
19
20
constexpr
audio_stream_format
() noexcept : sample_format(), sample_rate(0.0f), speaker_mapping(hi::speaker_mapping::none) {}
21
22
constexpr
audio_stream_format
(
audio_stream_format
const
&)
noexcept
=
default
;
23
constexpr
audio_stream_format
(
audio_stream_format
&&)
noexcept
=
default
;
24
constexpr
audio_stream_format
&operator=(
audio_stream_format
const
&)
noexcept
=
default
;
25
constexpr
audio_stream_format
&operator=(
audio_stream_format
&&)
noexcept
=
default
;
26
27
[[nodiscard]]
constexpr
audio_stream_format
(
28
audio_sample_format
sample_format,
29
double
sample_rate,
30
hi::speaker_mapping speaker_mapping) noexcept :
31
sample_format(sample_format), sample_rate(sample_rate), speaker_mapping(speaker_mapping)
32
{
33
}
34
35
constexpr
explicit
operator
bool()
const
noexcept
36
{
37
return
static_cast<
bool
>
(sample_format);
38
}
39
};
40
41
}
// namespace hi::inline v1
v1::audio_sample_format
Audio sample format.
Definition
audio_sample_format.hpp:29
v1::audio_stream_format
The format of a stream of audio.
Definition
audio_stream_format.hpp:15
Generated on Mon Apr 22 2024 12:53:25 for HikoGUI by
1.10.0