50 lines
1.2 KiB
Protocol Buffer
50 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package termix.audio_backend;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
service AudioBackendRPC {
|
|
// Stop the active audio server
|
|
rpc StopClient(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
// Start the audio server of choice
|
|
rpc StartClient(DesiredAudioBacked) returns (google.protobuf.Empty);
|
|
// Get information about the possible audio backend configuration options
|
|
rpc DescribeBackend(DesiredAudioBacked) returns (AudioBackendDescription);
|
|
rpc InitConnection(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
rpc GetAvailableBackends(google.protobuf.Empty) returns (BackendList);
|
|
}
|
|
|
|
enum SupportedAudioBackends {
|
|
AB_UNSPECIFIED = 0;
|
|
AB_JACK = 1;
|
|
AB_COREAUDIO = 2;
|
|
}
|
|
|
|
message DesiredAudioBacked {
|
|
SupportedAudioBackends backend = 1;
|
|
CoreAudioOptions core_audio_opts = 2;
|
|
}
|
|
|
|
message AudioBackendDescription {
|
|
CoreAudioAvailableOptions core_audio_description = 1;
|
|
repeated string input_devices = 2;
|
|
repeated string output_devices = 3;
|
|
}
|
|
|
|
message CoreAudioAvailableOptions {
|
|
repeated string input_devices = 1;
|
|
repeated string output_devices = 2;
|
|
}
|
|
|
|
message CoreAudioOptions {
|
|
string input_device = 1;
|
|
}
|
|
|
|
message BackendList {
|
|
repeated Backend backends = 1;
|
|
}
|
|
|
|
message Backend {
|
|
string name = 1;
|
|
}
|