aural

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

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

Go to latest
Published: Dec 8, 2016 License: MIT Imports: 9 Imported by: 0

README

aural

CircleCI codecov

Audio server written in Go

Documentation

Index

Constants

View Source
const (
	DEFAULT_PORT int = 28346
)
View Source
const (
	FRAMES_PER_BUFFER = 8196
)

Variables

This section is empty.

Functions

func ClearHandler

func ClearHandler(playstate *Playstate, arguments []string)

func GetExtensionFor

func GetExtensionFor(identifier string) string

func HandleRequest

func HandleRequest(playstate *Playstate, kind string, arguments []string)

func LoadHandler

func LoadHandler(playstate *Playstate, arguments []string)

func Terminate

func Terminate()

Types

type AudioSource

type AudioSource interface {
	ReadFrames(out []int32) (int64, error)

	Channels() int32
	SampleRate() int32

	Open(string) error
	Close()
}

func NewAudioSource

func NewAudioSource(identifier string) AudioSource

func NewLibSndFileAudioSource

func NewLibSndFileAudioSource() AudioSource

func NewMP3AudioSource

func NewMP3AudioSource() AudioSource

type AudioSourceFactory

type AudioSourceFactory func() AudioSource

type Configuration

type Configuration struct {
	Address string `yaml:"address";json:"address"`
}

func GetConfiguration

func GetConfiguration() Configuration

type LibSndFileAudioSource

type LibSndFileAudioSource struct {
	// contains filtered or unexported fields
}

func (*LibSndFileAudioSource) Channels

func (this *LibSndFileAudioSource) Channels() int32

func (*LibSndFileAudioSource) Close

func (this *LibSndFileAudioSource) Close()

func (*LibSndFileAudioSource) Open

func (this *LibSndFileAudioSource) Open(identifier string) error

func (*LibSndFileAudioSource) ReadFrames

func (this *LibSndFileAudioSource) ReadFrames(out []int32) (int64, error)

func (*LibSndFileAudioSource) SampleRate

func (this *LibSndFileAudioSource) SampleRate() int32

type MP3AudioSource

type MP3AudioSource struct {
	// contains filtered or unexported fields
}

func (*MP3AudioSource) Channels

func (this *MP3AudioSource) Channels() int32

func (*MP3AudioSource) Close

func (this *MP3AudioSource) Close()

func (*MP3AudioSource) Open

func (this *MP3AudioSource) Open(identifier string) error

func (*MP3AudioSource) ReadFrames

func (this *MP3AudioSource) ReadFrames(out []int32) (int64, error)

func (*MP3AudioSource) SampleRate

func (this *MP3AudioSource) SampleRate() int32

type MessageHandler

type MessageHandler func(*Playstate, []string)

type Playlist

type Playlist struct {
	// contains filtered or unexported fields
}

func NewPlaylist

func NewPlaylist(tracks []*Track) *Playlist

func (*Playlist) Current

func (playlist *Playlist) Current() *Track

func (*Playlist) Length

func (playlist *Playlist) Length() int

func (*Playlist) Pop

func (playlist *Playlist) Pop() *Track

func (*Playlist) Queue

func (playlist *Playlist) Queue(location string)

type Playstate

type Playstate struct {
	Playlist *Playlist
	// contains filtered or unexported fields
}

func NewPlaystate

func NewPlaystate() (*Playstate, error)

func (*Playstate) Clear

func (playstate *Playstate) Clear()

func (*Playstate) MainLoop

func (playstate *Playstate) MainLoop() chan *Playstate

func (*Playstate) Queue

func (playstate *Playstate) Queue(playlist *Playlist) *Playlist

func (*Playstate) Update

func (playstate *Playstate) Update() *Playstate

type Repeat

type Repeat int
const (
	REPEAT_ONE Repeat = iota
	REPEAT_ALL
)

type Track

type Track struct {
	Location string
	// contains filtered or unexported fields
}

func (*Track) Close

func (this *Track) Close()

func (*Track) Open

func (this *Track) Open() error

func (*Track) Update

func (this *Track) Update(playstate *Playstate) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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