go_alac

package module
v0.0.0-...-7bab2d4 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: BSD-2-Clause Imports: 8 Imported by: 0

README

go-alac

libalac CGO bindings for encoding/decoding.

Requirements

libalac
git clone --depth 1 https://git.gammaspectra.live/S.O.N.G/alac.git
cd alac
autoreconf -fi
./configure --prefix /usr
make -j$(nproc)
sudo make install

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlacBox

type AlacBox struct {
	Cookie []byte
}

func (*AlacBox) Encode

func (b *AlacBox) Encode(w io.Writer) error

Encode - write box to w

func (*AlacBox) EncodeSW

func (b *AlacBox) EncodeSW(sw bits.SliceWriter) error

func (*AlacBox) Info

func (b *AlacBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error

func (*AlacBox) Size

func (b *AlacBox) Size() uint64

Size - calculated size of box

func (*AlacBox) Type

func (b *AlacBox) Type() string

type FormatDecoder

type FormatDecoder struct {
	// contains filtered or unexported fields
}

func NewFormatDecoder

func NewFormatDecoder(reader io.Reader) *FormatDecoder

func (*FormatDecoder) GetBitDepth

func (d *FormatDecoder) GetBitDepth() int

func (*FormatDecoder) GetChannels

func (d *FormatDecoder) GetChannels() int

func (*FormatDecoder) GetSampleRate

func (d *FormatDecoder) GetSampleRate() int

func (*FormatDecoder) Read

func (d *FormatDecoder) Read() (buf []byte)

type FormatEncoder

type FormatEncoder struct {
	// contains filtered or unexported fields
}

func NewFormatEncoder

func NewFormatEncoder(writer io.Writer, sampleRate, channels, bitDepth int, fastMode bool, segmentDuration time.Duration) *FormatEncoder

func (*FormatEncoder) Flush

func (e *FormatEncoder) Flush()

func (*FormatEncoder) Write

func (e *FormatEncoder) Write(pcm []byte)

type FrameDecoder

type FrameDecoder struct {
	// contains filtered or unexported fields
}

func NewFrameDecoder

func NewFrameDecoder(magicCookie []byte) *FrameDecoder

func (*FrameDecoder) Close

func (e *FrameDecoder) Close()

func (*FrameDecoder) GetBitDepth

func (e *FrameDecoder) GetBitDepth() int

func (*FrameDecoder) GetChannels

func (e *FrameDecoder) GetChannels() int

func (*FrameDecoder) GetInputSize

func (e *FrameDecoder) GetInputSize() int

func (*FrameDecoder) GetSampleRate

func (e *FrameDecoder) GetSampleRate() int

func (*FrameDecoder) GetSamplesPerPacket

func (e *FrameDecoder) GetSamplesPerPacket() int

func (*FrameDecoder) ReadPacket

func (e *FrameDecoder) ReadPacket(data []byte) (inputBytesUsed int, pcm []byte)

type FrameEncoder

type FrameEncoder struct {
	// contains filtered or unexported fields
}

func NewFrameEncoder

func NewFrameEncoder(sampleRate, channels, bitDepth int, fastMode bool) *FrameEncoder

func (*FrameEncoder) Close

func (e *FrameEncoder) Close()

func (*FrameEncoder) GetInputSize

func (e *FrameEncoder) GetInputSize() int

func (*FrameEncoder) GetMagicCookie

func (e *FrameEncoder) GetMagicCookie() []byte

func (*FrameEncoder) GetSamplesPerPacket

func (e *FrameEncoder) GetSamplesPerPacket() int

func (*FrameEncoder) WritePacket

func (e *FrameEncoder) WritePacket(pcm []byte) []byte

Jump to

Keyboard shortcuts

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