beepFade

package module
v0.0.0-...-1554536 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2019 License: MIT Imports: 4 Imported by: 0

README

beepFade

Adds a new fading effect for the Golang Beep library

How to use

Crossfade between songs
// CrossfadeStream crossfades between all songs specified in files
// The sample-rates between the two streams must be the same, otherwise weird things might happen
// If opts is nil, then reasonable defaults are used
streamer := beepFade.CrossfadeStream(format, nil, stream1, stream2)
// This streamer will fade into stream1, and then crossfade between stream1 and stream2, and then fade out of stream2

A full example can be found in the example folder

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrossfadeStream

func CrossfadeStream(format beep.Format, opts *Options, streams ...beep.StreamSeekCloser) beep.Streamer

CrossfadeStream crossfades between all songs specified in files The sample-rates between the two streams must be the same, otherwise weird things might happen If opts is nil, then reasonable defaults are used

Types

type Options

type Options struct {
	TimeSpan time.Duration // How long to fade in, and to fade out
	Volume   float64       // What the volume should be for the streamer
}

Options for the CrossfadeSream function

Jump to

Keyboard shortcuts

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