Documentation ¶
Overview ¶
Package: github.com/Foxenfurter/foxAudioLib/foxAudioDecoder filename foxAudioDecoder.go package calls a decoder based upon the supplied format and then processes the returned bytestream either to standardd out or to the supplied file name
Index ¶
Constants ¶
const DefaultDecoderFrameSize int = 1000 // I don't think this is used anywhere
The DecoderFrameSize is the number of frame samples to output ian each frame. A frame being an arbitrary number of frame samples and a frame sample being n channels of samples e.g. stereo is 2 single samples.
const InputBufferSize = 64000 // I don't think this is used anywhere
The input Buffer is used to read in byte date from the external source
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioDecoder ¶
type AudioDecoder struct { SampleRate int BitDepth int NumChannels int Size uint32 // Size of the audio data Type string Filename string // Added for file reading WavDecoder *foxWavReader.WavReader FrameSample int DebugFunc func(string) // enables the use of an external debug function supplied at the application level - expect to use foxLog }
func (*AudioDecoder) Close ¶
func (myDecoder *AudioDecoder) Close()
func (*AudioDecoder) DecodeSamples ¶
func (myDecoder *AudioDecoder) DecodeSamples(DecodedSamplesChannel chan [][]float64, ThrottleLoaderChannel chan time.Duration) error
Should call the lower level function and pass in the Channel to be used for transmitting decoded samples Throttle Loadre is optional and enables the Decoder to limit the speed of the loader. Current version of wav loader does not need throttling
func (*AudioDecoder) Initialise ¶
func (myDecoder *AudioDecoder) Initialise() error
NewDecoder creates a new decoder with implicit file opening or Stdin setup