Documentation ¶
Index ¶
- Variables
- func SetLogLevel(level LogLevel)
- func SetLogger(logger Logger)
- func SetLoggerFunc(logFn LoggerFunc)
- type Address
- type ChannelSet
- type Context
- type ContextConfig
- type Family
- type FecCode
- type FrameEncoding
- type LogLevel
- type Logger
- type LoggerFunc
- type PacketEncoding
- type PortType
- type Protocol
- type Receiver
- type ReceiverConfig
- type ResamplerProfile
- type Sender
- type SenderConfig
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidArguments indicates that one or more arguments passed to the function // are invalid ErrInvalidArguments = errors.New("One or more arguments are invalid") // ErrInvalidApi should never happen and indicates that the API don't follow the // declared contract ErrInvalidApi = errors.New("Invalid return code from API") // ErrRuntime indicates a runtime error: memory allocation error etc ErrRuntime = errors.New("Runtime error") )
Functions ¶
func SetLogLevel ¶
func SetLogLevel(level LogLevel)
func SetLoggerFunc ¶
func SetLoggerFunc(logFn LoggerFunc)
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
Address as declared in roc/address.h:59
func NewAddress ¶
NewAddress parses the `ip`, `port` and `family` and initializes the Address object
type ChannelSet ¶
type ChannelSet int32
ChannelSet as declared in roc/config.h:108
const (
ChannelSetStereo ChannelSet = 2
)
ChannelSet enumeration from roc/config.h:108
type Context ¶
type Context C.roc_context
Context as declared in roc/context.h:41
func OpenContext ¶
func OpenContext(contextConfig *ContextConfig) (*Context, error)
type ContextConfig ¶
ContextConfig as declared in roc/config.h:147
type FrameEncoding ¶
type FrameEncoding int32
FrameEncoding as declared in roc/config.h:100
const (
FrameEncodingPcmFloat FrameEncoding = 1
)
FrameEncoding enumeration from roc/config.h:100
type LoggerFunc ¶
type PacketEncoding ¶
type PacketEncoding int32
PacketEncoding as declared in roc/config.h:91
const (
PacketEncodingAvpL16 PacketEncoding = 2
)
PacketEncoding enumeration from roc/config.h:91
type Receiver ¶
type Receiver C.roc_receiver
Receiver as declared in roc/receiver.h:117
func OpenReceiver ¶
func OpenReceiver(rocContext *Context, receiverConfig *ReceiverConfig) (*Receiver, error)
type ReceiverConfig ¶
type ReceiverConfig struct { FrameSampleRate uint32 FrameChannels ChannelSet FrameEncoding FrameEncoding AutomaticTiming uint32 ResamplerProfile ResamplerProfile TargetLatency uint64 MaxLatencyOverrun uint64 MaxLatencyUnderrun uint64 NoPlaybackTimeout int64 BrokenPlaybackTimeout int64 BreakageDetectionWindow uint64 }
ReceiverConfig as declared in roc/config.h:316
type ResamplerProfile ¶
type ResamplerProfile int32
ResamplerProfile as declared in roc/config.h:128
const ( ResamplerDisable ResamplerProfile = -1 ResamplerDefault ResamplerProfile = 0 ResamplerHigh ResamplerProfile = 1 ResamplerMedium ResamplerProfile = 2 ResamplerLow ResamplerProfile = 3 )
ResamplerProfile enumeration from roc/config.h:128
type SenderConfig ¶
type SenderConfig struct { FrameSampleRate uint32 FrameChannels ChannelSet FrameEncoding FrameEncoding PacketSampleRate uint32 PacketChannels ChannelSet PacketEncoding PacketEncoding PacketLength uint64 PacketInterleaving uint32 AutomaticTiming uint32 ResamplerProfile ResamplerProfile FecCode FecCode FecBlockSourcePackets uint32 FecBlockRepairPackets uint32 }
SenderConfig as declared in roc/config.h:234