-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaudio.proto
More file actions
66 lines (55 loc) · 1.27 KB
/
audio.proto
File metadata and controls
66 lines (55 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
syntax = "proto3";
package audio;
enum SourceType {
AIRPLAY = 0;
BLUETOOTH = 1;
SPDIF = 2;
USB = 3;
LOOPBACK = 4;
ANALOG = 5;
}
/// 抢占模式
enum SwitchMode {
/// Switch to a device if the device changed from inactive to active
LAST_OVERTAKE = 0;
/// Always switch to the active enabled device with the highest priority
PRIORITY = 1;
/// Alias for PRIORITY, for frontend use
MANUAL = 2;
}
message SourcePriority {
// The priority of audio source. Larger number means higher priority.
int32 priority = 1;
bool enabled = 2;
SourceType source = 3;
}
enum DirInput {
DIR_INPUT_TOSLINK = 0;
DIR_INPUT_COAXIAL = 1;
}
message InputSettings {
repeated SourcePriority priorities = 1;
SwitchMode switch_mode = 2;
DirInput dir_input_source = 3;
}
message SourceInfo {
SourceType source = 4;
bool active = 1;
optional uint32 sample_rate = 2;
optional uint32 bit_depth = 3;
}
message InputStatus {
repeated SourceInfo sources = 1;
optional SourceType current = 2;
AirplayInfo airplay = 3;
BluetoothInfo bluetooth = 4;
}
message AirplayInfo {
string client_name = 1;
}
message BluetoothInfo {
optional string device_addr = 1;
}
message VolumeValue {
double value = 1;
}