Documentation ¶
Index ¶
- Variables
- func NewServerEndpoints() []*api.Endpoint
- func RegisterServerHandler(s server.Server, hdlr ServerHandler, opts ...server.HandlerOption) error
- type Capabilities
- func (*Capabilities) Descriptor() ([]byte, []int)deprecated
- func (x *Capabilities) GetIndex() int32
- func (x *Capabilities) GetName() string
- func (x *Capabilities) GetRxStreamAddress() string
- func (x *Capabilities) GetStateUpdatesAddress() string
- func (x *Capabilities) GetTxStreamAddress() string
- func (*Capabilities) ProtoMessage()
- func (x *Capabilities) ProtoReflect() protoreflect.Message
- func (x *Capabilities) Reset()
- func (x *Capabilities) String() string
- type Channels
- type Codec
- type Frame
- func (*Frame) Descriptor() ([]byte, []int)deprecated
- func (x *Frame) GetBitDepth() int32
- func (x *Frame) GetChannels() Channels
- func (x *Frame) GetCodec() Codec
- func (x *Frame) GetData() []byte
- func (x *Frame) GetFrameLength() int32
- func (x *Frame) GetSamplingRate() int32
- func (x *Frame) GetUserId() string
- func (*Frame) ProtoMessage()
- func (x *Frame) ProtoReflect() protoreflect.Message
- func (x *Frame) Reset()
- func (x *Frame) String() string
- type None
- type PingPong
- type ServerHandler
- type ServerService
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Channels_name = map[int32]string{ 0: "unknown", 1: "mono", 2: "stereo", } Channels_value = map[string]int32{ "unknown": 0, "mono": 1, "stereo": 2, } )
Enum value maps for Channels.
View Source
var ( Codec_name = map[int32]string{ 0: "none", 1: "opus", 2: "pcm", } Codec_value = map[string]int32{ "none": 0, "opus": 1, "pcm": 2, } )
Enum value maps for Codec.
View Source
var File_audio_proto protoreflect.FileDescriptor
Functions ¶
func NewServerEndpoints ¶ added in v0.5.0
func RegisterServerHandler ¶
func RegisterServerHandler(s server.Server, hdlr ServerHandler, opts ...server.HandlerOption) error
Types ¶
type Capabilities ¶
type Capabilities struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // name of the server RxStreamAddress string `protobuf:"bytes,2,opt,name=rx_stream_address,json=rxStreamAddress,proto3" json:"rx_stream_address,omitempty"` // where the Server publishes audio from the radio TxStreamAddress string `protobuf:"bytes,3,opt,name=tx_stream_address,json=txStreamAddress,proto3" json:"tx_stream_address,omitempty"` // where the Server listens for audio to be transmitted on the radio StateUpdatesAddress string `protobuf:"bytes,4,opt,name=state_updates_address,json=stateUpdatesAddress,proto3" json:"state_updates_address,omitempty"` // where the Server listens for audio to be transmitted on the radio Index int32 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` // static index for displaying several servers consistently in a GUI // contains filtered or unexported fields }
func (*Capabilities) Descriptor
deprecated
func (*Capabilities) Descriptor() ([]byte, []int)
Deprecated: Use Capabilities.ProtoReflect.Descriptor instead.
func (*Capabilities) GetIndex ¶
func (x *Capabilities) GetIndex() int32
func (*Capabilities) GetName ¶
func (x *Capabilities) GetName() string
func (*Capabilities) GetRxStreamAddress ¶
func (x *Capabilities) GetRxStreamAddress() string
func (*Capabilities) GetStateUpdatesAddress ¶
func (x *Capabilities) GetStateUpdatesAddress() string
func (*Capabilities) GetTxStreamAddress ¶
func (x *Capabilities) GetTxStreamAddress() string
func (*Capabilities) ProtoMessage ¶
func (*Capabilities) ProtoMessage()
func (*Capabilities) ProtoReflect ¶ added in v0.5.0
func (x *Capabilities) ProtoReflect() protoreflect.Message
func (*Capabilities) Reset ¶
func (x *Capabilities) Reset()
func (*Capabilities) String ¶
func (x *Capabilities) String() string
type Channels ¶
type Channels int32
func (Channels) Descriptor ¶ added in v0.5.0
func (Channels) Descriptor() protoreflect.EnumDescriptor
func (Channels) EnumDescriptor
deprecated
func (Channels) Number ¶ added in v0.5.0
func (x Channels) Number() protoreflect.EnumNumber
func (Channels) Type ¶ added in v0.5.0
func (Channels) Type() protoreflect.EnumType
type Codec ¶
type Codec int32
func (Codec) Descriptor ¶ added in v0.5.0
func (Codec) Descriptor() protoreflect.EnumDescriptor
func (Codec) EnumDescriptor
deprecated
func (Codec) Number ¶ added in v0.5.0
func (x Codec) Number() protoreflect.EnumNumber
func (Codec) Type ¶ added in v0.5.0
func (Codec) Type() protoreflect.EnumType
type Frame ¶
type Frame struct { Codec Codec `protobuf:"varint,1,opt,name=codec,proto3,enum=shackbus.audio.Codec" json:"codec,omitempty"` Channels Channels `protobuf:"varint,2,opt,name=channels,proto3,enum=shackbus.audio.Channels" json:"channels,omitempty"` // Number of channels FrameLength int32 `protobuf:"varint,3,opt,name=frame_length,json=frameLength,proto3" json:"frame_length,omitempty"` // Audio frame length (in bytes) SamplingRate int32 `protobuf:"varint,4,opt,name=sampling_rate,json=samplingRate,proto3" json:"sampling_rate,omitempty"` // Audio sampling rate BitDepth int32 `protobuf:"varint,5,opt,name=bit_depth,json=bitDepth,proto3" json:"bit_depth,omitempty"` // Audio bit depth (8...16 bit typically) Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` // Audio packets as raw byte array UserId string `protobuf:"bytes,8,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
Audio frame consisting of the raw audio byte array + metadata
func (*Frame) Descriptor
deprecated
func (*Frame) GetBitDepth ¶
func (*Frame) GetChannels ¶
func (*Frame) GetFrameLength ¶
func (*Frame) GetSamplingRate ¶
func (*Frame) ProtoMessage ¶
func (*Frame) ProtoMessage()
func (*Frame) ProtoReflect ¶ added in v0.5.0
func (x *Frame) ProtoReflect() protoreflect.Message
type None ¶
type None struct {
// contains filtered or unexported fields
}
func (*None) Descriptor
deprecated
func (*None) ProtoMessage ¶
func (*None) ProtoMessage()
func (*None) ProtoReflect ¶ added in v0.5.0
func (x *None) ProtoReflect() protoreflect.Message
type PingPong ¶
type PingPong struct { Ping int64 `protobuf:"varint,1,opt,name=ping,proto3" json:"ping,omitempty"` // unix timestamp // contains filtered or unexported fields }
func (*PingPong) Descriptor
deprecated
func (*PingPong) ProtoMessage ¶
func (*PingPong) ProtoMessage()
func (*PingPong) ProtoReflect ¶ added in v0.5.0
func (x *PingPong) ProtoReflect() protoreflect.Message
type ServerHandler ¶
type ServerService ¶
type ServerService interface { GetCapabilities(ctx context.Context, in *None, opts ...client.CallOption) (*Capabilities, error) GetState(ctx context.Context, in *None, opts ...client.CallOption) (*State, error) StartStream(ctx context.Context, in *None, opts ...client.CallOption) (*None, error) StopStream(ctx context.Context, in *None, opts ...client.CallOption) (*None, error) Ping(ctx context.Context, in *PingPong, opts ...client.CallOption) (*PingPong, error) }
func NewServerService ¶
func NewServerService(name string, c client.Client) ServerService
type State ¶
type State struct { RxOn bool `protobuf:"varint,1,opt,name=rx_on,json=rxOn,proto3" json:"rx_on,omitempty"` TxUser string `protobuf:"bytes,3,opt,name=tx_user,json=txUser,proto3" json:"tx_user,omitempty"` // contains filtered or unexported fields }
func (*State) Descriptor
deprecated
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) ProtoReflect ¶ added in v0.5.0
func (x *State) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.