foxAudioDecoder

package module
v0.0.0-...-2f35ba3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 7 Imported by: 0

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

View Source
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.

View Source
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

Jump to

Keyboard shortcuts

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