shackbus_audio

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAudio        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAudio          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAudio = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Channels_name = map[int32]string{
	0: "unknown",
	1: "mono",
	2: "stereo",
}
View Source
var Channels_value = map[string]int32{
	"unknown": 0,
	"mono":    1,
	"stereo":  2,
}
View Source
var Codec_name = map[int32]string{
	0: "none",
	1: "opus",
	2: "pcm",
}
View Source
var Codec_value = map[string]int32{
	"none": 0,
	"opus": 1,
	"pcm":  2,
}

Functions

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"`
	RxStreamAddress      string   `protobuf:"bytes,2,opt,name=rx_stream_address,json=rxStreamAddress,proto3" json:"rx_stream_address,omitempty"`
	TxStreamAddress      string   `protobuf:"bytes,3,opt,name=tx_stream_address,json=txStreamAddress,proto3" json:"tx_stream_address,omitempty"`
	StateUpdatesAddress  string   `protobuf:"bytes,4,opt,name=state_updates_address,json=stateUpdatesAddress,proto3" json:"state_updates_address,omitempty"`
	Index                int32    `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Capabilities) Descriptor

func (*Capabilities) Descriptor() ([]byte, []int)

func (*Capabilities) GetIndex

func (m *Capabilities) GetIndex() int32

func (*Capabilities) GetName

func (m *Capabilities) GetName() string

func (*Capabilities) GetRxStreamAddress

func (m *Capabilities) GetRxStreamAddress() string

func (*Capabilities) GetStateUpdatesAddress

func (m *Capabilities) GetStateUpdatesAddress() string

func (*Capabilities) GetTxStreamAddress

func (m *Capabilities) GetTxStreamAddress() string

func (*Capabilities) Marshal

func (m *Capabilities) Marshal() (dAtA []byte, err error)

func (*Capabilities) MarshalTo

func (m *Capabilities) MarshalTo(dAtA []byte) (int, error)

func (*Capabilities) MarshalToSizedBuffer

func (m *Capabilities) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Capabilities) ProtoMessage

func (*Capabilities) ProtoMessage()

func (*Capabilities) Reset

func (m *Capabilities) Reset()

func (*Capabilities) Size

func (m *Capabilities) Size() (n int)

func (*Capabilities) String

func (m *Capabilities) String() string

func (*Capabilities) Unmarshal

func (m *Capabilities) Unmarshal(dAtA []byte) error

func (*Capabilities) XXX_DiscardUnknown

func (m *Capabilities) XXX_DiscardUnknown()

func (*Capabilities) XXX_Marshal

func (m *Capabilities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Capabilities) XXX_Merge

func (m *Capabilities) XXX_Merge(src proto.Message)

func (*Capabilities) XXX_Size

func (m *Capabilities) XXX_Size() int

func (*Capabilities) XXX_Unmarshal

func (m *Capabilities) XXX_Unmarshal(b []byte) error

type Channels

type Channels int32
const (
	Channels_unknown Channels = 0
	Channels_mono    Channels = 1
	Channels_stereo  Channels = 2
)

func (Channels) EnumDescriptor

func (Channels) EnumDescriptor() ([]byte, []int)

func (Channels) String

func (x Channels) String() string

type Codec

type Codec int32
const (
	Codec_none Codec = 0
	Codec_opus Codec = 1
	Codec_pcm  Codec = 2
)

func (Codec) EnumDescriptor

func (Codec) EnumDescriptor() ([]byte, []int)

func (Codec) String

func (x Codec) String() string

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"`
	FrameLength          int32    `protobuf:"varint,3,opt,name=frame_length,json=frameLength,proto3" json:"frame_length,omitempty"`
	SamplingRate         int32    `protobuf:"varint,4,opt,name=sampling_rate,json=samplingRate,proto3" json:"sampling_rate,omitempty"`
	BitDepth             int32    `protobuf:"varint,5,opt,name=bit_depth,json=bitDepth,proto3" json:"bit_depth,omitempty"`
	Data                 []byte   `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
	UserId               string   `protobuf:"bytes,8,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Audio frame consisting of the raw audio byte array + metadata

func (*Frame) Descriptor

func (*Frame) Descriptor() ([]byte, []int)

func (*Frame) GetBitDepth

func (m *Frame) GetBitDepth() int32

func (*Frame) GetChannels

func (m *Frame) GetChannels() Channels

func (*Frame) GetCodec

func (m *Frame) GetCodec() Codec

func (*Frame) GetData

func (m *Frame) GetData() []byte

func (*Frame) GetFrameLength

func (m *Frame) GetFrameLength() int32

func (*Frame) GetSamplingRate

func (m *Frame) GetSamplingRate() int32

func (*Frame) GetUserId

func (m *Frame) GetUserId() string

func (*Frame) Marshal

func (m *Frame) Marshal() (dAtA []byte, err error)

func (*Frame) MarshalTo

func (m *Frame) MarshalTo(dAtA []byte) (int, error)

func (*Frame) MarshalToSizedBuffer

func (m *Frame) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Frame) ProtoMessage

func (*Frame) ProtoMessage()

func (*Frame) Reset

func (m *Frame) Reset()

func (*Frame) Size

func (m *Frame) Size() (n int)

func (*Frame) String

func (m *Frame) String() string

func (*Frame) Unmarshal

func (m *Frame) Unmarshal(dAtA []byte) error

func (*Frame) XXX_DiscardUnknown

func (m *Frame) XXX_DiscardUnknown()

func (*Frame) XXX_Marshal

func (m *Frame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Frame) XXX_Merge

func (m *Frame) XXX_Merge(src proto.Message)

func (*Frame) XXX_Size

func (m *Frame) XXX_Size() int

func (*Frame) XXX_Unmarshal

func (m *Frame) XXX_Unmarshal(b []byte) error

type None

type None struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*None) Descriptor

func (*None) Descriptor() ([]byte, []int)

func (*None) Marshal

func (m *None) Marshal() (dAtA []byte, err error)

func (*None) MarshalTo

func (m *None) MarshalTo(dAtA []byte) (int, error)

func (*None) MarshalToSizedBuffer

func (m *None) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*None) ProtoMessage

func (*None) ProtoMessage()

func (*None) Reset

func (m *None) Reset()

func (*None) Size

func (m *None) Size() (n int)

func (*None) String

func (m *None) String() string

func (*None) Unmarshal

func (m *None) Unmarshal(dAtA []byte) error

func (*None) XXX_DiscardUnknown

func (m *None) XXX_DiscardUnknown()

func (*None) XXX_Marshal

func (m *None) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*None) XXX_Merge

func (m *None) XXX_Merge(src proto.Message)

func (*None) XXX_Size

func (m *None) XXX_Size() int

func (*None) XXX_Unmarshal

func (m *None) XXX_Unmarshal(b []byte) error

type PingPong

type PingPong struct {
	Ping                 int64    `protobuf:"varint,1,opt,name=ping,proto3" json:"ping,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PingPong) Descriptor

func (*PingPong) Descriptor() ([]byte, []int)

func (*PingPong) GetPing

func (m *PingPong) GetPing() int64

func (*PingPong) Marshal

func (m *PingPong) Marshal() (dAtA []byte, err error)

func (*PingPong) MarshalTo

func (m *PingPong) MarshalTo(dAtA []byte) (int, error)

func (*PingPong) MarshalToSizedBuffer

func (m *PingPong) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PingPong) ProtoMessage

func (*PingPong) ProtoMessage()

func (*PingPong) Reset

func (m *PingPong) Reset()

func (*PingPong) Size

func (m *PingPong) Size() (n int)

func (*PingPong) String

func (m *PingPong) String() string

func (*PingPong) Unmarshal

func (m *PingPong) Unmarshal(dAtA []byte) error

func (*PingPong) XXX_DiscardUnknown

func (m *PingPong) XXX_DiscardUnknown()

func (*PingPong) XXX_Marshal

func (m *PingPong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PingPong) XXX_Merge

func (m *PingPong) XXX_Merge(src proto.Message)

func (*PingPong) XXX_Size

func (m *PingPong) XXX_Size() int

func (*PingPong) XXX_Unmarshal

func (m *PingPong) XXX_Unmarshal(b []byte) error

type ServerHandler

type ServerHandler interface {
	GetCapabilities(context.Context, *None, *Capabilities) error
	GetState(context.Context, *None, *State) error
	StartStream(context.Context, *None, *None) error
	StopStream(context.Context, *None, *None) error
	Ping(context.Context, *PingPong, *PingPong) error
}

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*State) Descriptor

func (*State) Descriptor() ([]byte, []int)

func (*State) GetRxOn

func (m *State) GetRxOn() bool

func (*State) GetTxUser

func (m *State) GetTxUser() string

func (*State) Marshal

func (m *State) Marshal() (dAtA []byte, err error)

func (*State) MarshalTo

func (m *State) MarshalTo(dAtA []byte) (int, error)

func (*State) MarshalToSizedBuffer

func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) Reset

func (m *State) Reset()

func (*State) Size

func (m *State) Size() (n int)

func (*State) String

func (m *State) String() string

func (*State) Unmarshal

func (m *State) Unmarshal(dAtA []byte) error

func (*State) XXX_DiscardUnknown

func (m *State) XXX_DiscardUnknown()

func (*State) XXX_Marshal

func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*State) XXX_Merge

func (m *State) XXX_Merge(src proto.Message)

func (*State) XXX_Size

func (m *State) XXX_Size() int

func (*State) XXX_Unmarshal

func (m *State) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL