audio

package
v0.0.0-...-2825a58 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2019 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package audio implements a basic audio library with support for the following audio file formats:

DSF - DSD Stream File

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audio

type Audio struct {
	// The audio encoding e.g. DSD or DST.
	Encoding Encoding

	// The number of channels e.g. 2 for stereo.
	NumChannels uint

	// The channel order e.g. front left, front right.
	ChannelOrder []Channel

	// The sampling frequency in Hertz.
	SamplingFrequency uint

	// The number of bits per sample.
	BitsPerSample uint

	// Block size per channel in bytes.
	BlockSize uint

	// The encoded audio samples.
	EncodedSamples []byte

	// Metadata e.g. an ID3v2 tag.
	Metadata []byte
}

Audio is a set of audio samples of a particular encoding.

type Channel

type Channel int

Channel defines the set of possible audio channels.

const (
	FrontLeft Channel = iota
	FrontRight
	Center
	LowFrequency
	BackLeft
	BackRight
)

func (Channel) String

func (c Channel) String() string

String returns the lowercase name of a Channel.

type Encoding

type Encoding int

Encoding defines the set of possible audio encodings.

const (
	// Direct Stream Digital (DSD) i.e. uncompressed DSD audio.
	DSD Encoding = iota

	// Direct Stream Transfer (DST) i.e. compressed DSD audio.
	DST
)

Directories

Path Synopsis
cmd
dsfinfo
dsfinfo reads a DSF (DSD Stream File) and prints information about its contents.
dsfinfo reads a DSF (DSD Stream File) and prints information about its contents.
Package dsf implements a DSF (DSD Stream File) audio decoder and encoder.
Package dsf implements a DSF (DSD Stream File) audio decoder and encoder.

Jump to

Keyboard shortcuts

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