Documentation
¶
Overview ¶
Package: github.com/Foxenfurter/foxAudioLib/foxAudioDecoder/foxWavReader file foxWavReader.go pkg for encoding a stream into wav format. The package has been specified to allow a header to be written in the initial phase the body to be following this. The package is expected to be called as part of an encoder function. which will run asynchronously
Index ¶
- Variables
- type WavReader
- func (FD *WavReader) ConvertBytesToFloat64(myBytes []byte) ([][]float64, error)
- func (FD *WavReader) DecodeInput(DecodedSamplesChannel chan [][]float64) error
- func (fd *WavReader) DecodeWavHeader() error
- func (fd *WavReader) GetBitDepth() int
- func (fd *WavReader) GetLittleEndian() bool
- func (fd *WavReader) GetNumChannels() int
- func (fd *WavReader) GetReaderCursor() int
- func (fd *WavReader) GetSampleRate() int
- func (fd *WavReader) GetSize() uint32
- func (fd *WavReader) SetBitDepth(bitDepth int)
- func (fd *WavReader) SetLittleEndian(endianNess bool)
- func (fd *WavReader) SetNumChannels(numChannels int)
- func (fd *WavReader) SetReaderCursor(readerCursor int)
- func (fd *WavReader) SetSampleRate(sampleRate int)
- func (fd *WavReader) SetSize(size uint32)
- type WaveFile
- type WaveFormat
- type WaveFormatEx
Constants ¶
This section is empty.
Variables ¶
var ( AMBISONIC_B_FORMAT_PCMPCMguid = NewWaveFormatExString("e8f32218-3fc1-4361-9f41-abf9b3b72260") AMBISONIC_B_FORMAT_IEEE_FLOATPCMguid = NewWaveFormatExString("00000003-0721-11d3-8644-C8C1CA000000") )
Functions ¶
This section is empty.
Types ¶
type WavReader ¶
type WavReader struct {
SampleRate int
BitDepth int
NumChannels int
Size uint32
ReaderCursor int
LittleEndian bool
ByteOrder binary.ByteOrder
Input io.Reader // Changed from *os.File to io.Reader
AudioFormat WaveFormat
DebugFunc func(string)
// contains filtered or unexported fields
}
Structure holds basic information about the Samples to be encoded this is a type neutral representation of the WavHeader structure
func (*WavReader) ConvertBytesToFloat64 ¶
Byte Converter
func (*WavReader) DecodeInput ¶
Function shoudl resume reading the input stream and pass the resulting samples to the output Channel
func (*WavReader) DecodeWavHeader ¶
Read Wav File Header
func (*WavReader) GetBitDepth ¶
GetBitDepth returns the bit depth of the FoxDecoder.
func (*WavReader) GetLittleEndian ¶
SetEndianess sets the Endianess field of FoxDecoder.
func (*WavReader) GetNumChannels ¶
GetNumChannels returns the number of channels in the FoxDecoder.
func (*WavReader) GetReaderCursor ¶
GetReaderCursor returns the reader cursor position of the FoxDecoder.
func (*WavReader) GetSampleRate ¶
Getters and Setters
------------Getters---------------------------------------- GetSampleRate returns the sample rate of the FoxDecoder.
func (*WavReader) SetBitDepth ¶
SetBitDepth sets the BitDepth field of FoxDecoder.
func (*WavReader) SetLittleEndian ¶
SetEndianess sets the Endianess field of FoxDecoder.
func (*WavReader) SetNumChannels ¶
SetNumChannels sets the NumChannels field of FoxDecoder.
func (*WavReader) SetReaderCursor ¶
SetReaderCursor sets the ReaderCursor field of FoxDecoder.
func (*WavReader) SetSampleRate ¶
--------------Setters-------------------------------- SetSampleRate sets the SampleRate field of FoxDecoder.
type WaveFile ¶
type WaveFile struct {
// contains filtered or unexported fields
}
Holds detailed information about the wav Header
type WaveFormat ¶
type WaveFormat uint16
const ( PCM WaveFormat = 1 ADPCM WaveFormat = 2 IEEE_FLOAT WaveFormat = 3 INTERNAL_DOUBLE WaveFormat = 4 EXTENSIBLE WaveFormat = 0xFFFE )
type WaveFormatEx ¶
type WaveFormatEx struct {
GUID [16]byte
}
func NewWaveFormatExBytes ¶
func NewWaveFormatExBytes(guid []byte) WaveFormatEx
NewWaveFormatExBytes creates a new WaveFormatEx instance with the specified GUID byte array.
func NewWaveFormatExString ¶
func NewWaveFormatExString(guid string) WaveFormatEx
NewWaveFormatExString creates a new WaveFormatEx instance with the specified GUID string.
func (*WaveFormatEx) Equals ¶
func (wf *WaveFormatEx) Equals(other *WaveFormatEx) bool
func (*WaveFormatEx) GetHashCode ¶
func (wf *WaveFormatEx) GetHashCode() int
func (*WaveFormatEx) String ¶
func (wf *WaveFormatEx) String() string