audio

package
v0.0.0-...-60c8330 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OnStop func()
)

Functions

func AudioStreamBroker

func AudioStreamBroker() *util.Broker[EnumAudioStreamState]

func Close

func Close()

func Dispose

func Dispose()

할당된 자원 해제

func Duration

func Duration() time.Duration

func GetAllSampleData

func GetAllSampleData() [][2]float64

func GetDecoder

func GetDecoder(fpath string) (beep.StreamSeekCloser, *beep.Format, error)

func GetMonoAllSampleData

func GetMonoAllSampleData() []float64

func IsAudioLoaded

func IsAudioLoaded() bool

func IsRunning

func IsRunning() bool

func Open

func Open(fpath string)

func Pause

func Pause()

func Play

func Play()

func Position

func Position() time.Duration

func SetPosition

func SetPosition(t time.Duration)

func Stop

func Stop()

func StreamFormat

func StreamFormat() *beep.Format

Types

type AudioStream

type AudioStream struct {
	beep.StreamSeekCloser
	Format *beep.Format
}

type EnumAudioStreamState

type EnumAudioStreamState int
const (
	EnumAudioStreamOpen EnumAudioStreamState = iota + 1
	EnumAudioStreamClosed
	EnumAudioStreamStarted
	EnumAudioStreamPaused
	EnumAudioStreamStoped
)

type Format

type Format string
var (
	UNKNOWN Format = "unknown"
	WAV     Format = "wav"
	FLAC    Format = "flac"
	MP3     Format = "mp3"
)

func FileFormat

func FileFormat(fpath string) (Format, error)

FileFormat returns the known format of the passed path.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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