Documentation ¶
Overview ¶
package calls an encoder based upon the supplied format and then processes the returned bytestream either to standardd out or to the supplied file name
Index ¶
- type AudioEncoder
- func (myEncoder *AudioEncoder) AccumulateAndEncode(samples [][]float64, n int) error
- func (myEncoder *AudioEncoder) AccumulateAndEncodeChannel(samplesChannel <-chan [][]float64, throttleInputChannel chan<- time.Duration, ...) error
- func (myEncoder *AudioEncoder) EncodeData(buffer [][]float64) error
- func (myEncoder *AudioEncoder) EncodeHeader() error
- func (myEncoder *AudioEncoder) EncodeSamplesChannel(samplesChannel <-chan [][]float64, throttleInputChannel chan<- time.Duration) error
- func (myEncoder *AudioEncoder) Initialise() error
- type EncoderInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioEncoder ¶
type AudioEncoder struct { SampleRate int BitDepth int NumChannels int Size int64 Type string Filename string // Added filename field DebugFunc func(string) // enables the use of an external debug function supplied at the application level - expect to use foxLog DebugOn bool //enables debugging // contains filtered or unexported fields }
Encoder definition EncoderDefinition
func (*AudioEncoder) AccumulateAndEncode ¶
func (myEncoder *AudioEncoder) AccumulateAndEncode(samples [][]float64, n int) error
func (*AudioEncoder) AccumulateAndEncodeChannel ¶
func (*AudioEncoder) EncodeData ¶
func (myEncoder *AudioEncoder) EncodeData(buffer [][]float64) error
Call low level encoder to convert [][]float64 samples to bytesream of choice, and then call output writer
func (*AudioEncoder) EncodeHeader ¶
func (myEncoder *AudioEncoder) EncodeHeader() error
Expose the methods
func (*AudioEncoder) EncodeSamplesChannel ¶
func (myEncoder *AudioEncoder) EncodeSamplesChannel(samplesChannel <-chan [][]float64, throttleInputChannel chan<- time.Duration) error
Wraps the encoder into a channel based function that takes a stream of inputSamples as [][]float64, throttleInputChannel as duration and a wait group the optional throttleInputChannel will send a delay based upont the encoder processing time to be used by the feeding function in order to slow down any processing
func (*AudioEncoder) Initialise ¶
func (myEncoder *AudioEncoder) Initialise() error
Constructor for Encoder