audio

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package audio are the components for audio and music

Index

Constants

View Source
const (
	StateStopped = MusicPlayingState(iota) // StateStopped is the audio.MusicPlayingState for a stopped music
	StatePlaying                           // StatePlaying is the audio.MusicPlayingState for a playing music
	StatePaused                            // StatePaused is the audio.MusicPlayingState for a paused music
)

Variables

View Source
var Get = gets{

	Music: func(e *goecs.Entity) Music {
		return e.Get(TYPE.Music).(Music)
	},

	MusicState: func(e *goecs.Entity) MusicState {
		return e.Get(TYPE.MusicState).(MusicState)
	},
}

Get a audio component

TYPE hold the reflect.Type for our audio components

Functions

This section is empty.

Types

type Music

type Music struct {
	Name string // Name is the filename for our music stream
}

Music represent an music stream

type MusicPlayingState

type MusicPlayingState int32

MusicPlayingState represent the playing state for a music stream

type MusicState

type MusicState struct {
	PlayingState MusicPlayingState // PlayingState is the current audio.MusicPlayingState for our music
	Name         string            // Name is the current music Name
}

MusicState represent the state for a music

Jump to

Keyboard shortcuts

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