Documentation ¶
Overview ¶
Package ebiten contains ebiten's implementation of the audio interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioProvider ¶
AudioProvider represents a provider capable of playing audio
func CreateAudio ¶
func CreateAudio(l d2util.LogLevel, am *d2asset.AssetManager) *AudioProvider
CreateAudio creates an instance of ebiten's audio provider
func (*AudioProvider) LoadSound ¶
func (eap *AudioProvider) LoadSound(sfx string, loop, bgm bool) (d2interface.SoundEffect, error)
LoadSound loads a sound affect so that it canb e played
func (*AudioProvider) PlayBGM ¶
func (eap *AudioProvider) PlayBGM(song string)
PlayBGM loads an audio stream and plays it in the background
func (*AudioProvider) SetVolumes ¶
func (eap *AudioProvider) SetVolumes(bgmVolume, sfxVolume float64)
SetVolumes sets the volumes of the audio provider
type SoundEffect ¶
type SoundEffect struct {
// contains filtered or unexported fields
}
SoundEffect represents an ebiten implementation of a sound effect
func (*SoundEffect) IsPlaying ¶
func (v *SoundEffect) IsPlaying() bool
IsPlaying returns a bool for whether or not the sound is currently playing
func (*SoundEffect) SetPan ¶
func (v *SoundEffect) SetPan(pan float64)
SetPan sets the audio pan, left is -1.0, center is 0.0, right is 1.0
func (*SoundEffect) SetVolume ¶
func (v *SoundEffect) SetVolume(volume float64)
SetVolume ets the volume
Click to show internal directories.
Click to hide internal directories.