Documentation ¶
Index ¶
- Constants
- Variables
- func FindEncodingByContentType(contentType string) string
- func LoadConfig(file string, config interface{}) error
- func SaveConfig(file string, config interface{}) error
- func ToAlsaSampleFormat(sampleFormat SampleFormat) alsa.SampleFormat
- type AACEncoder
- type AACPEncoder
- type AdjustAudioBuffer
- type AlsaInput
- type AlsaInputConfig
- type AlsaOutput
- type AlsaOutputConfig
- type Amplifier
- type Audio
- func (audio *Audio) ChannelCount() int
- func (audio *Audio) InterleavedFloats() []float32
- func (audio *Audio) LoadInterleavedFloats(samples []float32, sampleCount int, channelCount int)
- func (audio *Audio) Process(processor AudioProcessor)
- func (audio *Audio) Sample(channel int, samplePosition int) float32
- func (audio *Audio) SampleCount() int
- func (audio *Audio) Samples(channel int) []float32
- func (audio *Audio) SetSample(channel int, samplePosition int, sample float32)
- func (audio *Audio) SetSamples(channel int, samples []float32)
- func (audio *Audio) SetTimestamp(timestamp time.Time)
- func (audio *Audio) Timestamp() time.Time
- type AudioBuffer
- type AudioDecoder
- type AudioEncoder
- type AudioFormat
- type AudioHandler
- type AudioHandlerFunc
- type AudioHandlerSupport
- type AudioProcessor
- type AudioProvider
- type AudioProviderFunc
- type BackupConfig
- type BufferHttpStreamInput
- func (buffer *BufferHttpStreamInput) AudioOut(audio *Audio)
- func (buffer *BufferHttpStreamInput) Read() *Audio
- func (buffer *BufferHttpStreamInput) SampleCount() uint32
- func (buffer *BufferHttpStreamInput) SampleRate() int
- func (buffer *BufferHttpStreamInput) SetChannelCount(channelCount int)
- func (buffer *BufferHttpStreamInput) SetSampleRate(sampleRate int)
- func (buffer *BufferHttpStreamInput) Setup(config *BufferHttpStreamInputConfig)
- type BufferHttpStreamInputConfig
- type BufferedHttpStreamInput
- func (input *BufferedHttpStreamInput) Init() error
- func (input *BufferedHttpStreamInput) Read() *Audio
- func (input *BufferedHttpStreamInput) Run()
- func (input *BufferedHttpStreamInput) SetChannelCount(channelCount int)
- func (input *BufferedHttpStreamInput) SetSampleRate(sampleRate int)
- func (input *BufferedHttpStreamInput) Setup(config *BufferedHttpStreamInputConfig)
- type BufferedHttpStreamInputConfig
- type BufferedHttpStreamOutput
- func (output *BufferedHttpStreamOutput) AdminStatus() string
- func (output *BufferedHttpStreamOutput) AudioOut(audio *Audio)
- func (output *BufferedHttpStreamOutput) Config() BufferedHttpStreamOutputConfig
- func (output *BufferedHttpStreamOutput) ConnectionStatus() string
- func (output *BufferedHttpStreamOutput) Init() error
- func (output *BufferedHttpStreamOutput) OperationalStatus() string
- func (output *BufferedHttpStreamOutput) Read() (audio *Audio)
- func (output *BufferedHttpStreamOutput) Run()
- func (output *BufferedHttpStreamOutput) SetChannelCount(channelCount int)
- func (output *BufferedHttpStreamOutput) SetSampleRate(sampleRate int)
- func (output *BufferedHttpStreamOutput) Setup(config *BufferedHttpStreamOutputConfig)
- func (output *BufferedHttpStreamOutput) Start()
- func (output *BufferedHttpStreamOutput) Status() BufferedHttpStreamOutputStatus
- func (output *BufferedHttpStreamOutput) Stop()
- type BufferedHttpStreamOutputConfig
- type BufferedHttpStreamOutputStatus
- type CPUProfiler
- type CommandConfig
- type ConfigController
- type ConfigManager
- type Event
- type EventCollection
- type EventLogger
- type FDKAACEncoder
- type FileInput
- type FixedRateAudioHandler
- type HttpInput
- func (input *HttpInput) GetReadTimeout() time.Duration
- func (input *HttpInput) GetWaitOnError() time.Duration
- func (input *HttpInput) Init() (err error)
- func (input *HttpInput) Read() (err error)
- func (input *HttpInput) Reset()
- func (input *HttpInput) Run()
- func (input *HttpInput) SetAudioHandler(audioHandler AudioHandler)
- func (input *HttpInput) Setup(config *HttpStreamInputConfig)
- type HttpServer
- type HttpServerConfig
- type HttpStreamDialer
- type HttpStreamInputConfig
- type HttpStreamOutput
- func (output *HttpStreamOutput) AdminStatus() string
- func (output *HttpStreamOutput) ConnectionDuration() time.Duration
- func (output *HttpStreamOutput) ConnectionStatus() string
- func (output *HttpStreamOutput) GetWaitOnError() time.Duration
- func (output *HttpStreamOutput) GetWriteTimeout() time.Duration
- func (output *HttpStreamOutput) Init() error
- func (output *HttpStreamOutput) IsConnected() bool
- func (output *HttpStreamOutput) OperationalStatus() string
- func (output *HttpStreamOutput) Reset()
- func (output *HttpStreamOutput) Run()
- func (output *HttpStreamOutput) SampleRate() int
- func (output *HttpStreamOutput) Start()
- func (output *HttpStreamOutput) Stop()
- func (output *HttpStreamOutput) Write(buffer []byte) (int, error)
- type HttpStreamOutputConfig
- type HttpStreamOutputStatus
- type HttpStreamOutputs
- func (output *HttpStreamOutputs) AudioOut(audio *Audio)
- func (output *HttpStreamOutputs) Config() HttpStreamOutputsConfig
- func (output *HttpStreamOutputs) Create(config *BufferedHttpStreamOutputConfig) *BufferedHttpStreamOutput
- func (output *HttpStreamOutputs) Destroy(identifier string) *BufferedHttpStreamOutput
- func (output *HttpStreamOutputs) Init() error
- func (output *HttpStreamOutputs) Run()
- func (output *HttpStreamOutputs) SetChannelCount(channelCount int)
- func (output *HttpStreamOutputs) SetSampleRate(sampleRate int)
- func (output *HttpStreamOutputs) Setup(config *HttpStreamOutputsConfig)
- func (output *HttpStreamOutputs) Start()
- func (output *HttpStreamOutputs) Status() HttpStreamOutputsStatus
- func (output *HttpStreamOutputs) Stop()
- func (output *HttpStreamOutputs) Stream(identifier string) *BufferedHttpStreamOutput
- type HttpStreamOutputsConfig
- type HttpStreamOutputsController
- func (controller *HttpStreamOutputsController) Config() HttpStreamOutputsConfig
- func (controller *HttpStreamOutputsController) Create(response http.ResponseWriter, body []byte)
- func (controller *HttpStreamOutputsController) Delete(response http.ResponseWriter, identifier string)
- func (controller *HttpStreamOutputsController) Index(response http.ResponseWriter)
- func (controller *HttpStreamOutputsController) IndexEvents(response http.ResponseWriter)
- func (controller *HttpStreamOutputsController) ServeHTTP(response http.ResponseWriter, request *http.Request)
- func (controller *HttpStreamOutputsController) Show(response http.ResponseWriter, identifier string)
- func (controller *HttpStreamOutputsController) Status() HttpStreamOutputsStatus
- func (controller *HttpStreamOutputsController) Update(response http.ResponseWriter, identifier string, body []byte)
- type HttpStreamOutputsStatus
- type Icecast2Dialer
- type IdentifierGenerator
- type IdentifierValidator
- type Info
- type InterleavedAudioCoder
- type IoEfficiencyHandler
- type IoEfficiencyMeter
- type IoEfficiencyMeterHistory
- type LameEncoder
- type LocalEventLog
- type LocalMetrics
- type LogConfig
- type LogWriter
- type Logger
- type LoggerEventLog
- type MadDecoder
- type MadError
- type MemoryAudioBuffer
- type MemoryBenchmark
- func (benchmark *MemoryBenchmark) Complete()
- func (benchmark *MemoryBenchmark) CurrentResidentMemory() uint64
- func (benchmark *MemoryBenchmark) IsEnabled() bool
- func (benchmark *MemoryBenchmark) MemoryPerOperation() float64
- func (benchmark *MemoryBenchmark) MemoryUsage() uint64
- func (benchmark *MemoryBenchmark) OperationCount() int
- func (benchmark *MemoryBenchmark) Start()
- func (benchmark *MemoryBenchmark) Status() string
- type MemoryEventLog
- type MemoryProfiler
- type MetricsConfig
- type MetricsLibratoConfig
- type MetricsReadCloser
- type MutexAudioBuffer
- type OggDecoder
- type OggEncoder
- type OggHandler
- type OggPacketHandler
- type OpusAudioDecoder
- type OpusAudioEncoder
- type OpusAudioEncoderConfig
- type OpusDecoder
- type OpusEncoder
- type Processing
- type ProcessingConfig
- type ProcessingController
- type Profiler
- type ProfilerConfig
- type ProfilerController
- type RawAudioDecoder
- type RawAudioEncoder
- type RefillAudioBuffer
- type Remixer
- type RemixerChannel
- type Resettable
- type ResizeAudio
- type SampleFormat
- type ShoutcastDialer
- type SndFile
- type SoundChannelMetrics
- type SoundMeterAudioHandler
- type SoundMetrics
- type SoundMetricsHistory
- type SoundMetricsReceiver
- type StdWriter
- type StreamDecoder
- type StreamDescription
- type StreamEncoder
- type TimedFileOutput
- func (output *TimedFileOutput) AudioOut(audio *Audio)
- func (output *TimedFileOutput) ChannelCount() int
- func (output *TimedFileOutput) FileDuration() time.Duration
- func (output *TimedFileOutput) SampleRate() int
- func (output *TimedFileOutput) SetChannelCount(channelCount int)
- func (output *TimedFileOutput) SetFileDuration(fileDuration time.Duration)
- func (output *TimedFileOutput) SetSampleRate(sampleRate int)
- func (output *TimedFileOutput) Write(audio *Audio) (err error)
- type TimedFileOutputConfig
- type UDPClientConfig
- type UDPInput
- type UDPInputConfig
- type UDPOutput
- type UDPOutputConfig
- type UDPServerConfig
- type UnfillAudioBuffer
- type VorbisDecoder
- type VorbisEncoder
Constants ¶
View Source
const ( STEREO = C.STEREO JOINT_STEREO = C.JOINT_STEREO MONO = C.MONO NOT_SET = C.NOT_SET MAX_INDICATOR = C.MAX_INDICATOR )
View Source
const ( OPUS_APPLICATION_AUDIO int = C.OPUS_APPLICATION_AUDIO OPUS_OK int = C.OPUS_OK )
View Source
const ( O_RDONLY int = C.SFM_READ O_WRONLY int = C.SFM_WRITE O_RDWR int = C.SFM_RDWR /* Major formats. */ FORMAT_WAV int = C.SF_FORMAT_WAV /* Microsoft WAV format (little endian). */ FORMAT_AIFF int = C.SF_FORMAT_AIFF /* Apple/SGI AIFF format (big endian). */ FORMAT_AU int = C.SF_FORMAT_AU /* Sun/NeXT AU format (big endian). */ FORMAT_RAW int = C.SF_FORMAT_RAW /* RAW PCM data. */ FORMAT_PAF int = C.SF_FORMAT_PAF /* Ensoniq PARIS file format. */ FORMAT_SVX int = C.SF_FORMAT_SVX /* Amiga IFF / SVX8 / SV16 format. */ FORMAT_NIST int = C.SF_FORMAT_NIST /* Sphere NIST format. */ FORMAT_VOC int = C.SF_FORMAT_VOC /* VOC files. */ FORMAT_IRCAM int = C.SF_FORMAT_IRCAM /* Berkeley/IRCAM/CARL */ FORMAT_W64 int = C.SF_FORMAT_W64 /* Sonic Foundry's 64 bit RIFF/WAV */ FORMAT_MAT4 int = C.SF_FORMAT_MAT4 /* Matlab (tm) V4.2 / GNU Octave 2.0 */ FORMAT_MAT5 int = C.SF_FORMAT_MAT5 /* Matlab (tm) V5.0 / GNU Octave 2.1 */ FORMAT_PVF int = C.SF_FORMAT_PVF /* Portable Voice Format */ FORMAT_XI int = C.SF_FORMAT_XI /* Fasttracker 2 Extended Instrument */ FORMAT_HTK int = C.SF_FORMAT_HTK /* HMM Tool Kit format */ FORMAT_SDS int = C.SF_FORMAT_SDS /* Midi Sample Dump Standard */ FORMAT_AVR int = C.SF_FORMAT_AVR /* Audio Visual Research */ FORMAT_WAVEX int = C.SF_FORMAT_WAVEX /* MS WAVE with WAVEFORMATEX */ FORMAT_SD2 int = C.SF_FORMAT_SD2 /* Sound Designer 2 */ FORMAT_FLAC int = C.SF_FORMAT_FLAC /* FLAC lossless file format */ FORMAT_CAF int = C.SF_FORMAT_CAF /* Core Audio File format */ FORMAT_WVE int = C.SF_FORMAT_WVE /* Psion WVE format */ FORMAT_OGG int = C.SF_FORMAT_OGG /* Xiph OGG container */ FORMAT_MPC2K int = C.SF_FORMAT_MPC2K /* Akai MPC 2000 sampler */ FORMAT_RF64 int = C.SF_FORMAT_RF64 /* RF64 WAV file */ FORMAT_PCM_S8 int = C.SF_FORMAT_PCM_S8 /* Signed 8 bit data */ FORMAT_PCM_16 int = C.SF_FORMAT_PCM_16 /* Signed 16 bit data */ FORMAT_PCM_24 int = C.SF_FORMAT_PCM_24 /* Signed 24 bit data */ FORMAT_PCM_32 int = C.SF_FORMAT_PCM_32 /* Signed 32 bit data */ FORMAT_PCM_U8 int = C.SF_FORMAT_PCM_U8 /* Unsigned 8 bit data (WAV and RAW only) */ FORMAT_FLOAT int = C.SF_FORMAT_FLOAT /* 32 bit float data */ FORMAT_DOUBLE int = C.SF_FORMAT_DOUBLE /* 64 bit float data */ FORMAT_ULAW int = C.SF_FORMAT_ULAW /* U-Law encoded. */ FORMAT_ALAW int = C.SF_FORMAT_ALAW /* A-Law encoded. */ FORMAT_IMA_ADPCM int = C.SF_FORMAT_IMA_ADPCM /* IMA ADPCM. */ FORMAT_MS_ADPCM int = C.SF_FORMAT_MS_ADPCM /* Microsoft ADPCM. */ FORMAT_GSM610 int = C.SF_FORMAT_GSM610 /* GSM 6.10 encoding. */ FORMAT_VOX_ADPCM int = C.SF_FORMAT_VOX_ADPCM /* Oki Dialogic ADPCM encoding. */ FORMAT_G721_32 int = C.SF_FORMAT_G721_32 /* 32kbs G721 ADPCM encoding. */ FORMAT_G723_24 int = C.SF_FORMAT_G723_24 /* 24kbs G723 ADPCM encoding. */ FORMAT_G723_40 int = C.SF_FORMAT_G723_40 /* 40kbs G723 ADPCM encoding. */ FORMAT_DWVW_12 int = C.SF_FORMAT_DWVW_12 /* 12 bit Delta Width Variable Word encoding. */ FORMAT_DWVW_16 int = C.SF_FORMAT_DWVW_16 /* 16 bit Delta Width Variable Word encoding. */ FORMAT_DWVW_24 int = C.SF_FORMAT_DWVW_24 /* 24 bit Delta Width Variable Word encoding. */ FORMAT_DWVW_N int = C.SF_FORMAT_DWVW_N /* N bit Delta Width Variable Word encoding. */ FORMAT_DPCM_8 int = C.SF_FORMAT_DPCM_8 /* 8 bit differential PCM (XI only) */ FORMAT_DPCM_16 int = C.SF_FORMAT_DPCM_16 /* 16 bit differential PCM (XI only) */ FORMAT_VORBIS int = C.SF_FORMAT_VORBIS /* Xiph Vorbis encoding. */ ENDIAN_FILE int = C.SF_ENDIAN_FILE /* Default file endian-ness. */ ENDIAN_LITTLE int = C.SF_ENDIAN_LITTLE /* Force little endian-ness. */ ENDIAN_BIG int = C.SF_ENDIAN_BIG /* Force big endian-ness. */ ENDIAN_CPU int = C.SF_ENDIAN_CPU /* Force CPU endian-ness. */ // FIXME Usefull ? FORMAT_SUBMASK int = C.SF_FORMAT_SUBMASK FORMAT_TYPEMASK int = C.SF_FORMAT_TYPEMASK FORMAT_ENDMASK int = C.SF_FORMAT_ENDMASK )
View Source
const (
DefaultSampleRate = 44100
)
View Source
const MadFixedOne float32 = 1 << 28
Variables ¶
View Source
var Sample16bLittleEndian sample16bLittleEndian
View Source
var Sample32bLittleEndian sample32bLittleEndian
Functions ¶
func LoadConfig ¶
func SaveConfig ¶
func ToAlsaSampleFormat ¶
func ToAlsaSampleFormat(sampleFormat SampleFormat) alsa.SampleFormat
Types ¶
type AACEncoder ¶
type AACEncoder struct { BitRate int ChannelCount int SampleRate int Writer io.Writer // contains filtered or unexported fields }
func (*AACEncoder) AudioOut ¶
func (encoder *AACEncoder) AudioOut(audio *Audio)
func (*AACEncoder) Close ¶
func (encoder *AACEncoder) Close()
func (*AACEncoder) Init ¶
func (encoder *AACEncoder) Init() error
type AACPEncoder ¶
type AACPEncoder struct { BitRate int ChannelCount int SampleRate int Writer io.Writer // contains filtered or unexported fields }
func (*AACPEncoder) AudioOut ¶
func (encoder *AACPEncoder) AudioOut(audio *Audio)
func (*AACPEncoder) Close ¶
func (encoder *AACPEncoder) Close()
func (*AACPEncoder) Init ¶
func (encoder *AACPEncoder) Init() error
type AdjustAudioBuffer ¶
type AdjustAudioBuffer struct { Buffer AudioBuffer ChannelCount int LimitSampleCount uint32 ThresholdSampleCount uint32 }
func (*AdjustAudioBuffer) AudioOut ¶
func (pseudoBuffer *AdjustAudioBuffer) AudioOut(audio *Audio)
func (*AdjustAudioBuffer) Read ¶
func (pseudoBuffer *AdjustAudioBuffer) Read() (audio *Audio)
func (*AdjustAudioBuffer) SampleCount ¶
func (pseudoBuffer *AdjustAudioBuffer) SampleCount() uint32
type AlsaInput ¶
type AlsaInput struct { Device string SampleRate int BufferSampleCount int SampleFormat SampleFormat Channels int // contains filtered or unexported fields }
func (*AlsaInput) ChannelCount ¶
func (*AlsaInput) SetAudioHandler ¶
func (input *AlsaInput) SetAudioHandler(audioHandler AudioHandler)
type AlsaInputConfig ¶
type AlsaInputConfig struct { Device string SampleRate int BufferDuration time.Duration SampleFormat string Channels int Remix string }
func (*AlsaInputConfig) Apply ¶
func (config *AlsaInputConfig) Apply(alsaInput *AlsaInput)
type AlsaOutput ¶
type AlsaOutput struct { Device string SampleRate int SampleFormat SampleFormat Channels int // contains filtered or unexported fields }
func (*AlsaOutput) AudioOut ¶
func (alsa *AlsaOutput) AudioOut(audio *Audio)
func (*AlsaOutput) Delay ¶
func (alsa *AlsaOutput) Delay() (delay int)
func (*AlsaOutput) Init ¶
func (output *AlsaOutput) Init() error
type AlsaOutputConfig ¶
func (*AlsaOutputConfig) Apply ¶
func (config *AlsaOutputConfig) Apply(alsaOutput *AlsaOutput)
type Amplifier ¶
type Amplifier struct { Amplification float32 Output AudioHandler }
type Audio ¶
type Audio struct {
// contains filtered or unexported fields
}
func (*Audio) ChannelCount ¶
func (*Audio) InterleavedFloats ¶
func (*Audio) LoadInterleavedFloats ¶
func (*Audio) Process ¶
func (audio *Audio) Process(processor AudioProcessor)
func (*Audio) SampleCount ¶
func (*Audio) SetSamples ¶
func (*Audio) SetTimestamp ¶
type AudioBuffer ¶
type AudioEncoder ¶
type AudioFormat ¶
type AudioFormat struct { Encoding string Mode string BitRate int Quality float32 ChannelCount int SampleRate int }
func ParseAudioFormat ¶
func ParseAudioFormat(definition string) AudioFormat
func (*AudioFormat) ContentType ¶
func (format *AudioFormat) ContentType() string
type AudioHandler ¶
type AudioHandler interface {
AudioOut(audio *Audio)
}
type AudioHandlerFunc ¶
type AudioHandlerFunc func(audio *Audio)
audioHandler := broadcast.AudioHandlerFunc(func(audio *broadcast.Audio) { ... })
func (AudioHandlerFunc) AudioOut ¶
func (f AudioHandlerFunc) AudioOut(audio *Audio)
type AudioHandlerSupport ¶
type AudioHandlerSupport interface {
SetAudioHandler(audioHandler AudioHandler)
}
type AudioProvider ¶
type AudioProvider interface {
Read() *Audio
}
type AudioProviderFunc ¶
type AudioProviderFunc func() *Audio
func (AudioProviderFunc) Read ¶
func (f AudioProviderFunc) Read() *Audio
type BackupConfig ¶
type BackupConfig struct { CommandConfig Alsa AlsaInputConfig Files TimedFileOutputConfig }
func (*BackupConfig) Apply ¶
func (config *BackupConfig) Apply(alsaInput *AlsaInput, timedFileOutput *TimedFileOutput, httpServer *HttpServer)
func (*BackupConfig) Flags ¶
func (config *BackupConfig) Flags(flags *flag.FlagSet)
type BufferHttpStreamInput ¶
type BufferHttpStreamInput struct {
// contains filtered or unexported fields
}
func NewBufferHttpStreamInput ¶
func NewBufferHttpStreamInput() *BufferHttpStreamInput
func (*BufferHttpStreamInput) AudioOut ¶
func (buffer *BufferHttpStreamInput) AudioOut(audio *Audio)
func (*BufferHttpStreamInput) Read ¶
func (buffer *BufferHttpStreamInput) Read() *Audio
func (*BufferHttpStreamInput) SampleCount ¶
func (buffer *BufferHttpStreamInput) SampleCount() uint32
func (*BufferHttpStreamInput) SampleRate ¶
func (buffer *BufferHttpStreamInput) SampleRate() int
func (*BufferHttpStreamInput) SetChannelCount ¶
func (buffer *BufferHttpStreamInput) SetChannelCount(channelCount int)
func (*BufferHttpStreamInput) SetSampleRate ¶
func (buffer *BufferHttpStreamInput) SetSampleRate(sampleRate int)
func (*BufferHttpStreamInput) Setup ¶
func (buffer *BufferHttpStreamInput) Setup(config *BufferHttpStreamInputConfig)
type BufferHttpStreamInputConfig ¶
type BufferHttpStreamInputConfig struct { Duration time.Duration LowAdjustThreshold float64 LowRefill float64 HighAdjustThreshold float64 HighUnfill float64 }
func NewBufferHttpStreamInputConfig ¶
func NewBufferHttpStreamInputConfig() *BufferHttpStreamInputConfig
type BufferedHttpStreamInput ¶
type BufferedHttpStreamInput struct {
// contains filtered or unexported fields
}
func NewBufferedHttpStreamInput ¶
func NewBufferedHttpStreamInput() *BufferedHttpStreamInput
func (*BufferedHttpStreamInput) Init ¶
func (input *BufferedHttpStreamInput) Init() error
func (*BufferedHttpStreamInput) Read ¶
func (input *BufferedHttpStreamInput) Read() *Audio
func (*BufferedHttpStreamInput) Run ¶
func (input *BufferedHttpStreamInput) Run()
func (*BufferedHttpStreamInput) SetChannelCount ¶
func (input *BufferedHttpStreamInput) SetChannelCount(channelCount int)
func (*BufferedHttpStreamInput) SetSampleRate ¶
func (input *BufferedHttpStreamInput) SetSampleRate(sampleRate int)
func (*BufferedHttpStreamInput) Setup ¶
func (input *BufferedHttpStreamInput) Setup(config *BufferedHttpStreamInputConfig)
type BufferedHttpStreamInputConfig ¶
type BufferedHttpStreamInputConfig struct { HttpStreamInputConfig Buffer BufferHttpStreamInputConfig }
func (*BufferedHttpStreamInputConfig) Apply ¶
func (config *BufferedHttpStreamInputConfig) Apply(input *BufferedHttpStreamInput)
type BufferedHttpStreamOutput ¶
type BufferedHttpStreamOutput struct { Identifier string Metrics *LocalMetrics EventLog *LocalEventLog // contains filtered or unexported fields }
func NewBufferedHttpStreamOutput ¶
func NewBufferedHttpStreamOutput() *BufferedHttpStreamOutput
func (*BufferedHttpStreamOutput) AdminStatus ¶
func (output *BufferedHttpStreamOutput) AdminStatus() string
func (*BufferedHttpStreamOutput) AudioOut ¶
func (output *BufferedHttpStreamOutput) AudioOut(audio *Audio)
func (*BufferedHttpStreamOutput) Config ¶
func (output *BufferedHttpStreamOutput) Config() BufferedHttpStreamOutputConfig
func (*BufferedHttpStreamOutput) ConnectionStatus ¶
func (output *BufferedHttpStreamOutput) ConnectionStatus() string
func (*BufferedHttpStreamOutput) Init ¶
func (output *BufferedHttpStreamOutput) Init() error
func (*BufferedHttpStreamOutput) OperationalStatus ¶
func (output *BufferedHttpStreamOutput) OperationalStatus() string
func (*BufferedHttpStreamOutput) Read ¶
func (output *BufferedHttpStreamOutput) Read() (audio *Audio)
func (*BufferedHttpStreamOutput) Run ¶
func (output *BufferedHttpStreamOutput) Run()
func (*BufferedHttpStreamOutput) SetChannelCount ¶
func (output *BufferedHttpStreamOutput) SetChannelCount(channelCount int)
func (*BufferedHttpStreamOutput) SetSampleRate ¶
func (output *BufferedHttpStreamOutput) SetSampleRate(sampleRate int)
func (*BufferedHttpStreamOutput) Setup ¶
func (output *BufferedHttpStreamOutput) Setup(config *BufferedHttpStreamOutputConfig)
func (*BufferedHttpStreamOutput) Start ¶
func (output *BufferedHttpStreamOutput) Start()
func (*BufferedHttpStreamOutput) Status ¶
func (output *BufferedHttpStreamOutput) Status() BufferedHttpStreamOutputStatus
func (*BufferedHttpStreamOutput) Stop ¶
func (output *BufferedHttpStreamOutput) Stop()
type BufferedHttpStreamOutputConfig ¶
type BufferedHttpStreamOutputConfig struct { HttpStreamOutputConfig Identifier string BufferDuration time.Duration }
func NewBufferedHttpStreamOutputConfig ¶
func NewBufferedHttpStreamOutputConfig() BufferedHttpStreamOutputConfig
func (*BufferedHttpStreamOutputConfig) Apply ¶
func (config *BufferedHttpStreamOutputConfig) Apply(bufferedHttpStreamOutput *BufferedHttpStreamOutput)
func (*BufferedHttpStreamOutputConfig) Empty ¶
func (config *BufferedHttpStreamOutputConfig) Empty() bool
type BufferedHttpStreamOutputStatus ¶
type BufferedHttpStreamOutputStatus struct { BufferedHttpStreamOutputConfig AdminStatus string // "enabled" / "disabled" OperationalStatus string // "started" / "stopped" ConnectionStatus string // "connected" / "disconnected" ConnectionDuration time.Duration Efficiency float64 EfficiencyHistory IoEfficiencyMeterHistory Events []*Event }
type CPUProfiler ¶
type CPUProfiler struct { }
func (*CPUProfiler) Start ¶
func (profiler *CPUProfiler) Start(file *os.File)
func (*CPUProfiler) Stop ¶
func (profiler *CPUProfiler) Stop(file *os.File)
type CommandConfig ¶
type CommandConfig struct { File string `json:"-"` HttpServer HttpServerConfig Log LogConfig Metrics MetricsConfig Profiler ProfilerConfig }
func (*CommandConfig) BaseApply ¶
func (config *CommandConfig) BaseApply(httpServer *HttpServer)
func (*CommandConfig) BaseFlags ¶
func (config *CommandConfig) BaseFlags(flags *flag.FlagSet)
type ConfigController ¶
type ConfigController struct {
// contains filtered or unexported fields
}
func NewConfigController ¶
func NewConfigController(manager ConfigManager) *ConfigController
func (*ConfigController) Save ¶
func (controller *ConfigController) Save(response http.ResponseWriter)
func (*ConfigController) ServeHTTP ¶
func (controller *ConfigController) ServeHTTP(response http.ResponseWriter, request *http.Request)
func (*ConfigController) Show ¶
func (controller *ConfigController) Show(response http.ResponseWriter)
type ConfigManager ¶
type Event ¶
type EventCollection ¶
type EventCollection interface { EventLogger Create(message string) *Event Append(event *Event) Events() []*Event }
var EventLog EventCollection = &LoggerEventLog{Parent: NewMemoryEventLog(256)}
type EventLogger ¶
type FDKAACEncoder ¶
type FDKAACEncoder struct { ChannelCount int AOT int SampleRate int Mode string Quality float32 BitRate int Writer io.Writer // contains filtered or unexported fields }
func (*FDKAACEncoder) AudioOut ¶
func (encoder *FDKAACEncoder) AudioOut(audio *Audio)
func (*FDKAACEncoder) BitRateMode ¶
func (encoder *FDKAACEncoder) BitRateMode() C.UINT
func (*FDKAACEncoder) ChannelMode ¶
func (encoder *FDKAACEncoder) ChannelMode() (channelMode C.CHANNEL_MODE)
func (*FDKAACEncoder) Close ¶
func (encoder *FDKAACEncoder) Close()
func (*FDKAACEncoder) Init ¶
func (encoder *FDKAACEncoder) Init() error
type FileInput ¶
type FileInput struct { File string // contains filtered or unexported fields }
func (*FileInput) ChannelCount ¶
func (*FileInput) SampleRate ¶
type FixedRateAudioHandler ¶
type FixedRateAudioHandler struct { SampleRate uint Output AudioHandler Tolerance float64 // contains filtered or unexported fields }
func (*FixedRateAudioHandler) AudioOut ¶
func (rated *FixedRateAudioHandler) AudioOut(audio *Audio)
type HttpInput ¶
type HttpInput struct { Url string Username string Password string ReadTimeout time.Duration WaitOnError time.Duration // contains filtered or unexported fields }
func (*HttpInput) GetReadTimeout ¶
func (*HttpInput) GetWaitOnError ¶
func (*HttpInput) SetAudioHandler ¶
func (input *HttpInput) SetAudioHandler(audioHandler AudioHandler)
func (*HttpInput) Setup ¶
func (input *HttpInput) Setup(config *HttpStreamInputConfig)
type HttpServer ¶
type HttpServer struct { Bind string SoundMeterAudioHandler *SoundMeterAudioHandler }
func (*HttpServer) Init ¶
func (server *HttpServer) Init() error
type HttpServerConfig ¶
type HttpServerConfig struct {
Bind string
}
func (*HttpServerConfig) Apply ¶
func (config *HttpServerConfig) Apply(httpServer *HttpServer)
type HttpStreamDialer ¶
type HttpStreamDialer interface {
Connect(output *HttpStreamOutput) (net.Conn, error)
}
type HttpStreamInputConfig ¶
type HttpStreamOutput ¶
type HttpStreamOutput struct { Target string Format AudioFormat ServerType string Provider AudioProvider Description *StreamDescription Metrics *LocalMetrics EventLog *LocalEventLog // contains filtered or unexported fields }
func (*HttpStreamOutput) AdminStatus ¶
func (output *HttpStreamOutput) AdminStatus() string
func (*HttpStreamOutput) ConnectionDuration ¶
func (output *HttpStreamOutput) ConnectionDuration() time.Duration
func (*HttpStreamOutput) ConnectionStatus ¶
func (output *HttpStreamOutput) ConnectionStatus() string
func (*HttpStreamOutput) GetWaitOnError ¶
func (output *HttpStreamOutput) GetWaitOnError() time.Duration
func (*HttpStreamOutput) GetWriteTimeout ¶
func (output *HttpStreamOutput) GetWriteTimeout() time.Duration
func (*HttpStreamOutput) Init ¶
func (output *HttpStreamOutput) Init() error
func (*HttpStreamOutput) IsConnected ¶
func (output *HttpStreamOutput) IsConnected() bool
func (*HttpStreamOutput) OperationalStatus ¶
func (output *HttpStreamOutput) OperationalStatus() string
func (*HttpStreamOutput) Reset ¶
func (output *HttpStreamOutput) Reset()
func (*HttpStreamOutput) Run ¶
func (output *HttpStreamOutput) Run()
func (*HttpStreamOutput) SampleRate ¶
func (output *HttpStreamOutput) SampleRate() int
func (*HttpStreamOutput) Start ¶
func (output *HttpStreamOutput) Start()
func (*HttpStreamOutput) Stop ¶
func (output *HttpStreamOutput) Stop()
type HttpStreamOutputConfig ¶
type HttpStreamOutputConfig struct { Target string Format string Description StreamDescription ServerType string Disabled bool }
func NewHttpStreamOutputConfig ¶
func NewHttpStreamOutputConfig() HttpStreamOutputConfig
func (*HttpStreamOutputConfig) Apply ¶
func (config *HttpStreamOutputConfig) Apply(httpStreamOutput *HttpStreamOutput)
type HttpStreamOutputStatus ¶
type HttpStreamOutputStatus int
const ( HttpStreamOutputStopped HttpStreamOutputStatus = 0 + iota HttpStreamOutputStarted HttpStreamOutputStopping )
type HttpStreamOutputs ¶
type HttpStreamOutputs struct {
// contains filtered or unexported fields
}
func NewHttpStreamOutputs ¶
func NewHttpStreamOutputs() *HttpStreamOutputs
func (*HttpStreamOutputs) AudioOut ¶
func (output *HttpStreamOutputs) AudioOut(audio *Audio)
func (*HttpStreamOutputs) Config ¶
func (output *HttpStreamOutputs) Config() HttpStreamOutputsConfig
func (*HttpStreamOutputs) Create ¶
func (output *HttpStreamOutputs) Create(config *BufferedHttpStreamOutputConfig) *BufferedHttpStreamOutput
func (*HttpStreamOutputs) Destroy ¶
func (output *HttpStreamOutputs) Destroy(identifier string) *BufferedHttpStreamOutput
func (*HttpStreamOutputs) Init ¶
func (output *HttpStreamOutputs) Init() error
func (*HttpStreamOutputs) Run ¶
func (output *HttpStreamOutputs) Run()
func (*HttpStreamOutputs) SetChannelCount ¶
func (output *HttpStreamOutputs) SetChannelCount(channelCount int)
func (*HttpStreamOutputs) SetSampleRate ¶
func (output *HttpStreamOutputs) SetSampleRate(sampleRate int)
func (*HttpStreamOutputs) Setup ¶
func (output *HttpStreamOutputs) Setup(config *HttpStreamOutputsConfig)
func (*HttpStreamOutputs) Start ¶
func (output *HttpStreamOutputs) Start()
func (*HttpStreamOutputs) Status ¶
func (output *HttpStreamOutputs) Status() HttpStreamOutputsStatus
func (*HttpStreamOutputs) Stop ¶
func (output *HttpStreamOutputs) Stop()
func (*HttpStreamOutputs) Stream ¶
func (output *HttpStreamOutputs) Stream(identifier string) *BufferedHttpStreamOutput
type HttpStreamOutputsConfig ¶
type HttpStreamOutputsConfig struct {
Streams []BufferedHttpStreamOutputConfig
}
func (*HttpStreamOutputsConfig) Apply ¶
func (config *HttpStreamOutputsConfig) Apply(httpStreamOutputs *HttpStreamOutputs)
func (*HttpStreamOutputsConfig) Compact ¶
func (config *HttpStreamOutputsConfig) Compact()
func (*HttpStreamOutputsConfig) Empty ¶
func (config *HttpStreamOutputsConfig) Empty() bool
type HttpStreamOutputsController ¶
type HttpStreamOutputsController struct {
// contains filtered or unexported fields
}
func NewHttpStreamOutputsController ¶
func NewHttpStreamOutputsController(outputs *HttpStreamOutputs) (controller *HttpStreamOutputsController)
func (*HttpStreamOutputsController) Config ¶
func (controller *HttpStreamOutputsController) Config() HttpStreamOutputsConfig
func (*HttpStreamOutputsController) Create ¶
func (controller *HttpStreamOutputsController) Create(response http.ResponseWriter, body []byte)
func (*HttpStreamOutputsController) Delete ¶
func (controller *HttpStreamOutputsController) Delete(response http.ResponseWriter, identifier string)
func (*HttpStreamOutputsController) Index ¶
func (controller *HttpStreamOutputsController) Index(response http.ResponseWriter)
func (*HttpStreamOutputsController) IndexEvents ¶
func (controller *HttpStreamOutputsController) IndexEvents(response http.ResponseWriter)
func (*HttpStreamOutputsController) ServeHTTP ¶
func (controller *HttpStreamOutputsController) ServeHTTP(response http.ResponseWriter, request *http.Request)
func (*HttpStreamOutputsController) Show ¶
func (controller *HttpStreamOutputsController) Show(response http.ResponseWriter, identifier string)
func (*HttpStreamOutputsController) Status ¶
func (controller *HttpStreamOutputsController) Status() HttpStreamOutputsStatus
func (*HttpStreamOutputsController) Update ¶
func (controller *HttpStreamOutputsController) Update(response http.ResponseWriter, identifier string, body []byte)
type HttpStreamOutputsStatus ¶
type HttpStreamOutputsStatus struct { Streams []BufferedHttpStreamOutputStatus Events []*Event }
type Icecast2Dialer ¶
type Icecast2Dialer struct { }
func (*Icecast2Dialer) Connect ¶
func (dialer *Icecast2Dialer) Connect(output *HttpStreamOutput) (net.Conn, error)
type IdentifierGenerator ¶
type IdentifierGenerator struct { Prefix string Index int Validate IdentifierValidator }
func (*IdentifierGenerator) Generate ¶
func (generator *IdentifierGenerator) Generate() string
func (*IdentifierGenerator) Identifier ¶
func (generator *IdentifierGenerator) Identifier() string
func (*IdentifierGenerator) NextIdentifier ¶
func (generator *IdentifierGenerator) NextIdentifier() string
type IdentifierValidator ¶
type Info ¶
sf_count_t frames ; int samplerate ; int channels ; int format ; int sections ; int seekable ;
func (*Info) SampleRate ¶
func (*Info) SetChannels ¶
func (*Info) SetSampleRate ¶
type InterleavedAudioCoder ¶
type InterleavedAudioCoder struct { SampleFormat SampleFormat ChannelCount int }
func (*InterleavedAudioCoder) Decode ¶
func (encoder *InterleavedAudioCoder) Decode(data []byte) (*Audio, error)
func (*InterleavedAudioCoder) Encode ¶
func (encoder *InterleavedAudioCoder) Encode(audio *Audio) ([]byte, error)
func (*InterleavedAudioCoder) FrameSize ¶
func (encoder *InterleavedAudioCoder) FrameSize() int
type IoEfficiencyHandler ¶
type IoEfficiencyHandler func(efficiency float64)
type IoEfficiencyMeter ¶
type IoEfficiencyMeter struct { Metrics *LocalMetrics Handler IoEfficiencyHandler // contains filtered or unexported fields }
func (*IoEfficiencyMeter) Efficiency ¶
func (meter *IoEfficiencyMeter) Efficiency() float64
func (*IoEfficiencyMeter) History ¶
func (meter *IoEfficiencyMeter) History() *IoEfficiencyMeterHistory
func (*IoEfficiencyMeter) Input ¶
func (meter *IoEfficiencyMeter) Input(count int64)
func (*IoEfficiencyMeter) Output ¶
func (meter *IoEfficiencyMeter) Output(count int64)
func (*IoEfficiencyMeter) Reset ¶
func (meter *IoEfficiencyMeter) Reset()
type IoEfficiencyMeterHistory ¶
type IoEfficiencyMeterHistory struct { Efficiencies []float64 Max float64 Min float64 Average float64 // contains filtered or unexported fields }
func NewIoEfficiencyMeterHistory ¶
func NewIoEfficiencyMeterHistory(size int) *IoEfficiencyMeterHistory
func (*IoEfficiencyMeterHistory) IsEmpty ¶
func (history *IoEfficiencyMeterHistory) IsEmpty() bool
func (*IoEfficiencyMeterHistory) Push ¶
func (history *IoEfficiencyMeterHistory) Push(efficiency float64)
type LameEncoder ¶
type LameEncoder struct { Quality float32 BitRate int Mode string ChannelCount int SampleRate int Writer io.Writer // contains filtered or unexported fields }
func (*LameEncoder) AudioOut ¶
func (encoder *LameEncoder) AudioOut(audio *Audio)
func (*LameEncoder) Close ¶
func (encoder *LameEncoder) Close()
func (*LameEncoder) Flush ¶
func (encoder *LameEncoder) Flush()
func (*LameEncoder) Init ¶
func (encoder *LameEncoder) Init() error
func (*LameEncoder) LameMode ¶
func (encoder *LameEncoder) LameMode() int
func (*LameEncoder) LameQuality ¶
func (encoder *LameEncoder) LameQuality() int
type LocalEventLog ¶
type LocalEventLog struct { Parent EventCollection Source string // contains filtered or unexported fields }
func (*LocalEventLog) Append ¶
func (log *LocalEventLog) Append(event *Event)
func (*LocalEventLog) Create ¶
func (log *LocalEventLog) Create(message string) *Event
func (*LocalEventLog) Events ¶
func (log *LocalEventLog) Events() []*Event
func (*LocalEventLog) NewEvent ¶
func (log *LocalEventLog) NewEvent(message string) *Event
type LocalMetrics ¶
type LocalMetrics struct {
// contains filtered or unexported fields
}
func (*LocalMetrics) Histogram ¶
func (local *LocalMetrics) Histogram(name string) metrics.Histogram
func (*LocalMetrics) Name ¶
func (local *LocalMetrics) Name(name string) string
type LoggerEventLog ¶
type LoggerEventLog struct {
Parent EventCollection
}
func (*LoggerEventLog) Append ¶
func (log *LoggerEventLog) Append(event *Event)
func (*LoggerEventLog) Create ¶
func (log *LoggerEventLog) Create(message string) *Event
func (*LoggerEventLog) Events ¶
func (log *LoggerEventLog) Events() []*Event
func (*LoggerEventLog) NewEvent ¶
func (log *LoggerEventLog) NewEvent(message string) *Event
type MadDecoder ¶
type MadDecoder struct {
// contains filtered or unexported fields
}
func (*MadDecoder) Init ¶
func (decoder *MadDecoder) Init() error
func (*MadDecoder) Reset ¶
func (decoder *MadDecoder) Reset()
func (*MadDecoder) SetAudioHandler ¶
func (decoder *MadDecoder) SetAudioHandler(audioHandler AudioHandler)
type MadError ¶
type MadError int
const (
MadErrorBufferLength MadError = C.MAD_ERROR_BUFLEN
)
func (MadError) IsRecoverable ¶
type MemoryAudioBuffer ¶
type MemoryAudioBuffer struct { Metrics *LocalMetrics // contains filtered or unexported fields }
func (*MemoryAudioBuffer) AudioOut ¶
func (buffer *MemoryAudioBuffer) AudioOut(audio *Audio)
func (*MemoryAudioBuffer) Empty ¶
func (buffer *MemoryAudioBuffer) Empty() bool
func (*MemoryAudioBuffer) Full ¶
func (buffer *MemoryAudioBuffer) Full() bool
func (*MemoryAudioBuffer) Read ¶
func (buffer *MemoryAudioBuffer) Read() (audio *Audio)
func (*MemoryAudioBuffer) SampleCount ¶
func (buffer *MemoryAudioBuffer) SampleCount() uint32
type MemoryBenchmark ¶
type MemoryBenchmark struct { Benchmark *testing.B MaxMemoryPerOperation float64 MinimumOperationCount int // contains filtered or unexported fields }
func NewMemoryBenchmark ¶
func NewMemoryBenchmark(b *testing.B) *MemoryBenchmark
func (*MemoryBenchmark) Complete ¶
func (benchmark *MemoryBenchmark) Complete()
func (*MemoryBenchmark) CurrentResidentMemory ¶
func (benchmark *MemoryBenchmark) CurrentResidentMemory() uint64
func (*MemoryBenchmark) IsEnabled ¶
func (benchmark *MemoryBenchmark) IsEnabled() bool
func (*MemoryBenchmark) MemoryPerOperation ¶
func (benchmark *MemoryBenchmark) MemoryPerOperation() float64
func (*MemoryBenchmark) MemoryUsage ¶
func (benchmark *MemoryBenchmark) MemoryUsage() uint64
func (*MemoryBenchmark) OperationCount ¶
func (benchmark *MemoryBenchmark) OperationCount() int
func (*MemoryBenchmark) Start ¶
func (benchmark *MemoryBenchmark) Start()
func (*MemoryBenchmark) Status ¶
func (benchmark *MemoryBenchmark) Status() string
type MemoryEventLog ¶
type MemoryEventLog struct {
// contains filtered or unexported fields
}
func NewMemoryEventLog ¶
func NewMemoryEventLog(size int) *MemoryEventLog
func (*MemoryEventLog) Append ¶
func (log *MemoryEventLog) Append(event *Event)
func (*MemoryEventLog) Create ¶
func (log *MemoryEventLog) Create(message string) *Event
func (*MemoryEventLog) Events ¶
func (log *MemoryEventLog) Events() []*Event
func (*MemoryEventLog) NewEvent ¶
func (log *MemoryEventLog) NewEvent(message string) *Event
type MemoryProfiler ¶
type MemoryProfiler struct { }
func (*MemoryProfiler) Start ¶
func (profiler *MemoryProfiler) Start(file *os.File)
func (*MemoryProfiler) Stop ¶
func (profiler *MemoryProfiler) Stop(file *os.File)
type MetricsConfig ¶
type MetricsConfig struct {
Librato MetricsLibratoConfig `json:",omitempty"`
}
func (*MetricsConfig) Apply ¶
func (config *MetricsConfig) Apply()
type MetricsLibratoConfig ¶
type MetricsLibratoConfig struct { Account string `json:",omitempty"` Token string `json:",omitempty"` }
func (*MetricsLibratoConfig) Apply ¶
func (config *MetricsLibratoConfig) Apply()
type MetricsReadCloser ¶
type MetricsReadCloser struct {
// contains filtered or unexported fields
}
func NewMetricsReadCloser ¶
func NewMetricsReadCloser(reader io.ReadCloser, counterName string) *MetricsReadCloser
func (*MetricsReadCloser) Close ¶
func (metricsReadCloser *MetricsReadCloser) Close() error
type MutexAudioBuffer ¶
type MutexAudioBuffer struct { Buffer AudioBuffer // contains filtered or unexported fields }
func (*MutexAudioBuffer) AudioOut ¶
func (pseudoBuffer *MutexAudioBuffer) AudioOut(audio *Audio)
func (*MutexAudioBuffer) Read ¶
func (pseudoBuffer *MutexAudioBuffer) Read() (audio *Audio)
func (*MutexAudioBuffer) SampleCount ¶
func (pseudoBuffer *MutexAudioBuffer) SampleCount() uint32
type OggDecoder ¶
type OggDecoder struct {
// contains filtered or unexported fields
}
func (*OggDecoder) Init ¶
func (decoder *OggDecoder) Init() error
func (*OggDecoder) Reset ¶
func (decoder *OggDecoder) Reset()
func (*OggDecoder) SetAudioHandler ¶
func (decoder *OggDecoder) SetAudioHandler(audioHandler AudioHandler)
func (*OggDecoder) SetHandler ¶
func (decoder *OggDecoder) SetHandler(handler OggHandler)
type OggEncoder ¶
type OggEncoder struct { Writer io.Writer Encoder *VorbisEncoder // contains filtered or unexported fields }
func (*OggEncoder) AudioOut ¶
func (encoder *OggEncoder) AudioOut(audio *Audio)
func (*OggEncoder) Close ¶
func (encoder *OggEncoder) Close()
func (*OggEncoder) Flush ¶
func (encoder *OggEncoder) Flush()
func (*OggEncoder) Init ¶
func (encoder *OggEncoder) Init() error
func (*OggEncoder) PacketAvailable ¶
func (encoder *OggEncoder) PacketAvailable(packet *ogg.Packet)
type OggHandler ¶
type OggPacketHandler ¶
type OpusAudioDecoder ¶
type OpusAudioDecoder struct {
// contains filtered or unexported fields
}
func (*OpusAudioDecoder) Decode ¶
func (decoder *OpusAudioDecoder) Decode(data []byte) (*Audio, error)
func (*OpusAudioDecoder) Destroy ¶
func (decoder *OpusAudioDecoder) Destroy()
func (*OpusAudioDecoder) Init ¶
func (decoder *OpusAudioDecoder) Init() error
type OpusAudioEncoder ¶
type OpusAudioEncoder struct { Bitrate int // contains filtered or unexported fields }
func (*OpusAudioEncoder) Destroy ¶
func (encoder *OpusAudioEncoder) Destroy()
func (*OpusAudioEncoder) Encode ¶
func (encoder *OpusAudioEncoder) Encode(audio *Audio) ([]byte, error)
func (*OpusAudioEncoder) Init ¶
func (encoder *OpusAudioEncoder) Init() error
type OpusAudioEncoderConfig ¶
type OpusAudioEncoderConfig struct {
Bitrate int
}
func (*OpusAudioEncoderConfig) Apply ¶
func (config *OpusAudioEncoderConfig) Apply(opusEncoder *OpusAudioEncoder)
type OpusDecoder ¶
type OpusDecoder struct {
// contains filtered or unexported fields
}
func OpusDecoderCreate ¶
func OpusDecoderCreate() (*OpusDecoder, error)
func (*OpusDecoder) DecodeFloat ¶
func (*OpusDecoder) Destroy ¶
func (decoder *OpusDecoder) Destroy()
type OpusEncoder ¶
type OpusEncoder struct {
// contains filtered or unexported fields
}
func OpusEncoderCreate ¶
func OpusEncoderCreate(bitrate int) (*OpusEncoder, error)
func (*OpusEncoder) Destroy ¶
func (encoder *OpusEncoder) Destroy()
func (*OpusEncoder) EncodeFloat ¶
type Processing ¶
type Processing struct { Output AudioHandler // contains filtered or unexported fields }
func (*Processing) AudioOut ¶
func (processing *Processing) AudioOut(audio *Audio)
func (*Processing) Config ¶
func (processing *Processing) Config() *ProcessingConfig
func (*Processing) SetAudioHandler ¶
func (processing *Processing) SetAudioHandler(audioHandler AudioHandler)
func (*Processing) Setup ¶
func (processing *Processing) Setup(config *ProcessingConfig)
type ProcessingConfig ¶
type ProcessingConfig struct {
Amplification float64
}
func (*ProcessingConfig) Apply ¶
func (config *ProcessingConfig) Apply(processing *Processing)
type ProcessingController ¶
type ProcessingController struct {
// contains filtered or unexported fields
}
func NewProcessingController ¶
func NewProcessingController(processing *Processing) (controller *ProcessingController)
func (*ProcessingController) ServeHTTP ¶
func (controller *ProcessingController) ServeHTTP(response http.ResponseWriter, request *http.Request)
func (*ProcessingController) Show ¶
func (controller *ProcessingController) Show(response http.ResponseWriter)
func (*ProcessingController) Update ¶
func (controller *ProcessingController) Update(response http.ResponseWriter, body []byte)
type ProfilerConfig ¶
func (*ProfilerConfig) Apply ¶
func (config *ProfilerConfig) Apply()
type ProfilerController ¶
func (*ProfilerController) Start ¶
func (controller *ProfilerController) Start() error
type RawAudioDecoder ¶
type RawAudioDecoder struct { }
type RawAudioEncoder ¶
type RawAudioEncoder struct { }
type RefillAudioBuffer ¶
type RefillAudioBuffer struct { Buffer AudioBuffer MinSampleCount uint32 // contains filtered or unexported fields }
func (*RefillAudioBuffer) AudioOut ¶
func (pseudoBuffer *RefillAudioBuffer) AudioOut(audio *Audio)
func (*RefillAudioBuffer) Read ¶
func (pseudoBuffer *RefillAudioBuffer) Read() (audio *Audio)
func (*RefillAudioBuffer) SampleCount ¶
func (pseudoBuffer *RefillAudioBuffer) SampleCount() uint32
type Remixer ¶
type Remixer struct { OutputChannels []RemixerChannel Output AudioHandler }
func NewRemixer ¶
func (*Remixer) OutputChannelCount ¶
type RemixerChannel ¶
type RemixerChannel struct {
InputChannels []int
}
func (*RemixerChannel) Mix ¶
func (channel *RemixerChannel) Mix(audio *Audio) []float32
func (*RemixerChannel) String ¶
func (channel *RemixerChannel) String() string
type Resettable ¶
type Resettable interface {
Reset()
}
type ResizeAudio ¶
type ResizeAudio struct { Output AudioHandler SampleCount int ChannelCount int // contains filtered or unexported fields }
func (*ResizeAudio) AudioOut ¶
func (resize *ResizeAudio) AudioOut(audio *Audio)
type SampleFormat ¶
type SampleFormat interface { Write(writer io.Writer, sample float32) error Read(reader io.Reader) (float32, error) Name() string SampleSize() int }
func FromAlsaSampleFormat ¶
func FromAlsaSampleFormat(alsaSampleFormat alsa.SampleFormat) SampleFormat
func ParseSampleFormat ¶
func ParseSampleFormat(name string) SampleFormat
type ShoutcastDialer ¶
type ShoutcastDialer struct { }
func (*ShoutcastDialer) Client ¶
func (dialer *ShoutcastDialer) Client(output *HttpStreamOutput) (*shoutcast.Client, error)
func (*ShoutcastDialer) Connect ¶
func (dialer *ShoutcastDialer) Connect(output *HttpStreamOutput) (net.Conn, error)
type SndFile ¶
type SndFile struct {
// contains filtered or unexported fields
}
func (*SndFile) WriteFloat ¶
type SoundChannelMetrics ¶
type SoundChannelMetrics struct {
PeakLevel float32
}
type SoundMeterAudioHandler ¶
type SoundMeterAudioHandler struct { Output AudioHandler // contains filtered or unexported fields }
func (*SoundMeterAudioHandler) AudioOut ¶
func (soundMeter *SoundMeterAudioHandler) AudioOut(audio *Audio)
func (SoundMeterAudioHandler) MarshalJSON ¶
func (soundMeter SoundMeterAudioHandler) MarshalJSON() ([]byte, error)
func (*SoundMeterAudioHandler) NewReceiver ¶
func (soundMeter *SoundMeterAudioHandler) NewReceiver() *SoundMetricsReceiver
type SoundMetrics ¶
type SoundMetrics struct {
ChannelMetrics []SoundChannelMetrics
}
func NewSoundMetrics ¶
func NewSoundMetrics(audio *Audio) *SoundMetrics
func (*SoundMetrics) ChannelCount ¶
func (metrics *SoundMetrics) ChannelCount() int
func (*SoundMetrics) MarshalJSON ¶
func (metrics *SoundMetrics) MarshalJSON() ([]byte, error)
type SoundMetricsHistory ¶
type SoundMetricsHistory struct { ChannelCount int // contains filtered or unexported fields }
func NewSoundMetricsHistory ¶
func NewSoundMetricsHistory(length int, channelCount int) *SoundMetricsHistory
func (*SoundMetricsHistory) GlobalMetrics ¶
func (history *SoundMetricsHistory) GlobalMetrics() *SoundMetrics
func (*SoundMetricsHistory) Update ¶
func (history *SoundMetricsHistory) Update(metrics *SoundMetrics)
type SoundMetricsReceiver ¶
type SoundMetricsReceiver struct { Channel chan *SoundMetrics // contains filtered or unexported fields }
func (*SoundMetricsReceiver) Close ¶
func (receiver *SoundMetricsReceiver) Close()
type StreamDecoder ¶
type StreamDecoder interface { SetAudioHandler(audioHandler AudioHandler) Init() error Read(reader io.Reader) error Reset() }
func NewStreamDecoder ¶
func NewStreamDecoder(encoding string) StreamDecoder
type StreamDescription ¶
type StreamDescription struct { BitRate int Public bool Name string Description string URL string Genre string }
func (*StreamDescription) IcecastHeaders ¶
func (description *StreamDescription) IcecastHeaders() map[string]string
func (*StreamDescription) IsEmpty ¶
func (description *StreamDescription) IsEmpty() bool
func (*StreamDescription) PublicZeroOrOne ¶
func (description *StreamDescription) PublicZeroOrOne() string
func (*StreamDescription) ShoutcastHeaders ¶
func (description *StreamDescription) ShoutcastHeaders() map[string]string
type StreamEncoder ¶
func NewStreamEncoder ¶
func NewStreamEncoder(format AudioFormat, writer io.Writer) StreamEncoder
type TimedFileOutput ¶
type TimedFileOutput struct { RootDirectory string CloseHandler string // contains filtered or unexported fields }
func (*TimedFileOutput) AudioOut ¶
func (output *TimedFileOutput) AudioOut(audio *Audio)
func (*TimedFileOutput) ChannelCount ¶
func (output *TimedFileOutput) ChannelCount() int
func (*TimedFileOutput) FileDuration ¶
func (output *TimedFileOutput) FileDuration() time.Duration
func (*TimedFileOutput) SampleRate ¶
func (output *TimedFileOutput) SampleRate() int
func (*TimedFileOutput) SetChannelCount ¶
func (output *TimedFileOutput) SetChannelCount(channelCount int)
func (*TimedFileOutput) SetFileDuration ¶
func (output *TimedFileOutput) SetFileDuration(fileDuration time.Duration)
func (*TimedFileOutput) SetSampleRate ¶
func (output *TimedFileOutput) SetSampleRate(sampleRate int)
func (*TimedFileOutput) Write ¶
func (output *TimedFileOutput) Write(audio *Audio) (err error)
type TimedFileOutputConfig ¶
func (*TimedFileOutputConfig) Apply ¶
func (config *TimedFileOutputConfig) Apply(output *TimedFileOutput)
type UDPClientConfig ¶
type UDPClientConfig struct { CommandConfig Alsa AlsaInputConfig Udp UDPOutputConfig }
func (*UDPClientConfig) Apply ¶
func (config *UDPClientConfig) Apply(alsaInput *AlsaInput, udpOutput *UDPOutput, httpServer *HttpServer)
func (*UDPClientConfig) Flags ¶
func (config *UDPClientConfig) Flags(flags *flag.FlagSet)
type UDPInput ¶
type UDPInput struct { Bind string Decoder AudioDecoder // contains filtered or unexported fields }
func (*UDPInput) SetAudioHandler ¶
func (input *UDPInput) SetAudioHandler(audioHandler AudioHandler)
type UDPInputConfig ¶
type UDPInputConfig struct {
Bind string
}
func (*UDPInputConfig) Apply ¶
func (config *UDPInputConfig) Apply(udpInput *UDPInput)
type UDPOutput ¶
type UDPOutput struct { Target string Encoder AudioEncoder PacketSampleCount int // contains filtered or unexported fields }
type UDPOutputConfig ¶
type UDPOutputConfig struct { Target string Opus OpusAudioEncoderConfig }
func (*UDPOutputConfig) Apply ¶
func (config *UDPOutputConfig) Apply(udpOutput *UDPOutput)
type UDPServerConfig ¶
type UDPServerConfig struct { CommandConfig Alsa AlsaOutputConfig Udp UDPInputConfig }
func (*UDPServerConfig) Apply ¶
func (config *UDPServerConfig) Apply(alsaOutput *AlsaOutput, udpInput *UDPInput, httpServer *HttpServer)
func (*UDPServerConfig) Flags ¶
func (config *UDPServerConfig) Flags(flags *flag.FlagSet)
type UnfillAudioBuffer ¶
type UnfillAudioBuffer struct { Buffer AudioBuffer MaxSampleCount uint32 UnfillSampleCount uint32 Metrics *LocalMetrics }
func (*UnfillAudioBuffer) AudioOut ¶
func (pseudoBuffer *UnfillAudioBuffer) AudioOut(audio *Audio)
func (*UnfillAudioBuffer) Read ¶
func (pseudoBuffer *UnfillAudioBuffer) Read() (audio *Audio)
func (*UnfillAudioBuffer) SampleCount ¶
func (pseudoBuffer *UnfillAudioBuffer) SampleCount() uint32
type VorbisDecoder ¶
type VorbisDecoder struct {
// contains filtered or unexported fields
}
func (*VorbisDecoder) NewStream ¶
func (decoder *VorbisDecoder) NewStream(serialNo int32)
func (*VorbisDecoder) PacketOut ¶
func (decoder *VorbisDecoder) PacketOut(packet *ogg.Packet) (result bool)
func (*VorbisDecoder) Reset ¶
func (decoder *VorbisDecoder) Reset()
func (*VorbisDecoder) SetAudioHandler ¶
func (decoder *VorbisDecoder) SetAudioHandler(audioHandler AudioHandler)
type VorbisEncoder ¶
type VorbisEncoder struct { Quality float32 BitRate int Mode string ChannelCount int SampleRate int PacketHandler OggPacketHandler // contains filtered or unexported fields }
func (*VorbisEncoder) AudioOut ¶
func (encoder *VorbisEncoder) AudioOut(audio *Audio)
func (*VorbisEncoder) Close ¶
func (encoder *VorbisEncoder) Close()
func (*VorbisEncoder) Flush ¶
func (encoder *VorbisEncoder) Flush()
func (*VorbisEncoder) Init ¶
func (encoder *VorbisEncoder) Init() error
func (*VorbisEncoder) Reset ¶
func (encoder *VorbisEncoder) Reset()
Source Files ¶
- aac_encoder.go
- aacp_encoder.go
- adjust_audio_buffer.go
- alsa.go
- alsa_input.go
- alsa_output.go
- amplifier.go
- audio.go
- audio_buffer.go
- audio_encoder.go
- audio_format.go
- buffered_http_stream_input.go
- buffered_http_stream_output.go
- config.go
- config_controller.go
- event.go
- fdk_aac_encoder.go
- file_input.go
- fixed_rate_audio_handler.go
- http_input.go
- http_server.go
- http_stream_dialer.go
- http_stream_output.go
- http_stream_outputs.go
- http_stream_outputs_controller.go
- interleaved_audio_coder.go
- io_efficiency_meter.go
- lame_encoder.go
- lifecycle.go
- logger.go
- mad_decoder.go
- math.go
- memory_audio_buffer.go
- memory_benchmark.go
- metrics.go
- mutex_audio_buffer.go
- ogg.go
- opus.go
- opus_audio_encoder.go
- processing.go
- processing_controller.go
- profiler.go
- raw_audio_encoder.go
- refill_audio_buffer.go
- remixer.go
- resize_audio.go
- sample_format.go
- snd_file.go
- sound_meter_audio_handler.go
- stream_decoder.go
- stream_description.go
- stream_encoder.go
- timed_file_output.go
- udp_input.go
- udp_output.go
- unfill_audio_buffer.go
- vorbis.go
Click to show internal directories.
Click to hide internal directories.