HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
AudioDevice.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
3#include <string>
4#include <cinttypes>
5
8namespace HephAudio
9{
11 {
12 Null = 0,
13
18 Render = 1,
19
25
31 };
32
33 constexpr AudioDeviceType operator|(const AudioDeviceType& lhs, const AudioDeviceType& rhs)
34 {
35 return (AudioDeviceType)((uint8_t)lhs | (uint8_t)rhs);
36 }
37
38 constexpr AudioDeviceType& operator|=(AudioDeviceType& lhs, const AudioDeviceType& rhs)
39 {
40 lhs = lhs | rhs;
41 return lhs;
42 }
43
44 constexpr AudioDeviceType operator&(const AudioDeviceType& lhs, const AudioDeviceType& rhs)
45 {
46 return (AudioDeviceType)((uint8_t)lhs & (uint8_t)rhs);
47 }
48
49 constexpr AudioDeviceType& operator&=(AudioDeviceType& lhs, const AudioDeviceType& rhs)
50 {
51 lhs = lhs & rhs;
52 return lhs;
53 }
54
55 constexpr AudioDeviceType operator^(const AudioDeviceType& lhs, const AudioDeviceType& rhs)
56 {
57 return (AudioDeviceType)((uint8_t)lhs ^ (uint8_t)rhs);
58 }
59
60 constexpr AudioDeviceType& operator^=(AudioDeviceType& lhs, const AudioDeviceType& rhs)
61 {
62 lhs = lhs ^ rhs;
63 return lhs;
64 }
65
66 constexpr AudioDeviceType operator~(const AudioDeviceType& lhs)
67 {
68 return (AudioDeviceType)(~(uint8_t)lhs);
69 }
70
76 {
81 std::string id;
82
87 std::string name;
88
94
100
103 };
104}
AudioDeviceType
Definition AudioDevice.h:11
@ Capture
Definition AudioDevice.h:24
@ All
Definition AudioDevice.h:30
@ Render
Definition AudioDevice.h:18
#define HEPH_API
Definition HephShared.h:132
stores information about an audio device.
Definition AudioDevice.h:76
AudioDeviceType type
Definition AudioDevice.h:93
std::string name
Definition AudioDevice.h:87
std::string id
Definition AudioDevice.h:81
bool isDefault
Definition AudioDevice.h:99