spec

package
Version: v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 1 Imported by: 33

Documentation

Overview

Package spec specifies valid audio formats

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioFormat

type AudioFormat string

AudioFormat represents the bit allocation for a single sample of audio

const AudioF32 AudioFormat = "F32"

AudioF32 is floating-point 32-bit sample (per channel)

const AudioF64 AudioFormat = "F64"

AudioF64 is floating-point 64-bit sample (per channel)

const AudioS16 AudioFormat = "S16"

AudioS16 is signed-integer 16-bit sample (per channel)

const AudioS32 AudioFormat = "S32"

AudioS32 is signed-integer 32-bit sample (per channel)

const AudioS8 AudioFormat = "S8"

AudioS8 is signed-integer 8-bit sample (per channel)

const AudioU16 AudioFormat = "U16"

AudioU16 is unsigned-integer 16-bit sample (per channel)

const AudioU8 AudioFormat = "U8"

AudioU8 is unsigned-integer 8-bit sample (per channel)

type AudioSpec

type AudioSpec struct {
	Freq     float64
	Format   AudioFormat
	Channels int
	Length   time.Duration
}

AudioSpec represents the frequency, format, # channels and sample rate of any audio I/O

func (*AudioSpec) Validate

func (spec *AudioSpec) Validate()

Validate these specs

type Tz

type Tz uint64

Tz is the unit of measurement of samples-over-time, e.g. for 48000Hz playback there are 48,000 Tz in 1 second.

Source Files

Jump to

Keyboard shortcuts

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