7#include "../utility/utility.hpp"
8#include "../macros.hpp"
13hi_export_module(hikogui.audio.audio_direction);
15hi_export
namespace hi {
inline namespace v1 {
17hi_export
enum class audio_direction :
unsigned char { none = 0b00, input = 0b01, output = 0b10, bidirectional = 0b11 };
19hi_export [[nodiscard]]
constexpr audio_direction operator&(audio_direction
const& lhs, audio_direction
const& rhs)
noexcept
21 return static_cast<audio_direction
>(std::to_underlying(lhs) & std::to_underlying(rhs));
24hi_export [[nodiscard]]
constexpr audio_direction operator|(audio_direction
const& lhs, audio_direction
const& rhs)
noexcept
26 return static_cast<audio_direction
>(std::to_underlying(lhs) | std::to_underlying(rhs));
29hi_export [[nodiscard]]
constexpr bool to_bool(audio_direction
const &rhs)
noexcept
31 return to_bool(std::to_underlying(rhs));
35hi_export
constexpr auto audio_direction_metadata = enum_metadata{
36 audio_direction::none,
"none",
37 audio_direction::input,
"input",
38 audio_direction::output,
"output",
39 audio_direction::bidirectional,
"bidirectional"
47struct std::formatter<
hi::audio_direction, char> : std::formatter<std::string_view, char> {
48 auto format(hi::audio_direction
const& t,
auto& fc)
const
50 return std::formatter<std::string_view, char>::format(hi::audio_direction_metadata[t], fc);
The HikoGUI namespace.
Definition array_generic.hpp:20
DOXYGEN BUG.
Definition algorithm_misc.hpp:20