sopro

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ErrUnsupportedTranscoding = "unsupported transcoding by formats" // ErrUnsupportedConversion is the error message for unsupported conversions

Variables

View Source
var (
	WIDTH_TERMINAL  = 80
	HEIGHT_TERMINAL = 30
)

Default terminal size

Functions

func GraphIn

func GraphIn(in *In) error

GraphIn graphs the input file to the terminal

func GraphOut

func GraphOut(in *In, out *Out) error

GraphOut graphs the output file to the terminal

Types

type AudioConfig

type AudioConfig struct {
	Encoding   int // the encoding format (e.g. "UNSIGNED", "SIGNED", "FLOAT", "PCM", "IEEE_FLOAT", "MULAW")
	Endianness int // the endianness of the audio data (e.g. "BIG", "LITTLE")
}

AudioConfig is a struct that contains the configuration of the source and target audio files or streams.

type AudioFileGeneral

type AudioFileGeneral struct {
	File   *os.File    // the audio file
	Format string      // the audio file format (e.g. "mp3", "ogg", "wav", etc.)
	Length int         // the length of the audio in seconds
	Config interface{} // the specific configuration options for the audio file format
}

AudioFileGeneral is a struct that contains general information about the audio file or stream.

func (*AudioFileGeneral) NewConfig

func (a *AudioFileGeneral) NewConfig(config interface{})

type In

type In struct {
	Data             io.Reader     // the audio data
	Reader           *bufio.Reader //  reader
	AudioFileGeneral               // general information about the audio file
}

In is a struct that contains the input audio file or stream.

type Out

type Out struct {
	Data             io.Writer     // the audio data
	Writer           *bufio.Writer // writer
	AudioFileGeneral               // general information about the audio file
}

Out is a struct that contains the output audio file or stream.

Jump to

Keyboard shortcuts

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