mix

package
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: 9 Imported by: 3

Documentation

Overview

Package mix combines sources into an output audio stream

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearAllFires

func ClearAllFires()

ClearAllFires to remove all ready & live fires.

func Configure

func Configure(s spec.AudioSpec)

Configure the mixer frequency, format, channels & sample rate.

func FireCount

func FireCount() int

FireCount returns the current total ready fires + live fires.

func GetCycleDurationTz

func GetCycleDurationTz() spec.Tz

GetCycleDurationTz returns the duration of a mix cycle.

func GetNowAt

func GetNowAt() time.Duration

GetNowAt returns current mix position

func GetStartTime

func GetStartTime() time.Time

GetStartTime returns the time mixing began.

func NextSample

func NextSample() []sample.Value

NextSample returns the next sample mixed in all channels

func OutputClose

func OutputClose()

OutputBegin to output WAV closer as []byte via stdout

func OutputContinueTo

func OutputContinueTo(t time.Duration)

OutputContinueTo to mix and output as []byte via stdout, up to a specified duration-since-start

func OutputStart

func OutputStart(length time.Duration, out io.Writer)

OutputStart requires a known length

func SetCycleDuration

func SetCycleDuration(d time.Duration)

GetCycleDurationTz sets the duration of a mix cycle.

func SetFire

func SetFire(source string, begin time.Duration, sustain time.Duration, volume float64, pan float64) *fire.Fire

SetFire to represent a single audio source playing at a specific time in the future (in time.Duration from play start), with sustain time.Duration, volume from 0 to 1, and pan from -1 to +1

func SetSoundsPath

func SetSoundsPath(prefix string)

SetSoundsPath to set the sound path prefix.

func Spec

func Spec() *spec.AudioSpec

Spec spec returns the current audio specification.

func StartAt

func StartAt(t time.Time)

StartAt to specify what time to begin mixing.

func Teardown

func Teardown()

Teardown everything and release all memory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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