audio

package
v0.0.0-...-af47be6 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2016 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Mono8    = Format(iota)
	Mono16   = Format(iota)
	Stereo8  = Format(iota)
	Stereo16 = Format(iota)
)
View Source
const (
	InverseDistance         = DistanceModel(openal.InverseDistance)
	InverseDistanceClamped  = DistanceModel(openal.InverseDistanceClamped)
	LinearDistance          = DistanceModel(openal.LinearDistance)
	LinearDistanceClamped   = DistanceModel(openal.LinearDistanceClamped)
	ExponentDistance        = DistanceModel(openal.ExponentDistance)
	ExponentDistanceClamped = DistanceModel(openal.ExponentDistanceClamped)
)

Variables

View Source
var (
	Device   *openal.Device
	Context  *openal.Context
	Listener *openal.Listener
)

Functions

This section is empty.

Types

type AudioClip

type AudioClip interface {
	/*
		Buffer size in int16 required to pass to NextBuffer
	*/
	BufferLength() int
	NextBuffer([]int16, bool) int
	Clone() (AudioClip, error)
	/*
		Samples in this clip
	*/
	Length() int
	SampleRate() int
	SetPosition(int)
	AudioFormat() Format
}

type AudioListener

type AudioListener struct {
	engine.BaseComponent
	// contains filtered or unexported fields
}

func NewAudioListener

func NewAudioListener() *AudioListener

func (*AudioListener) Update

func (this *AudioListener) Update()

type AudioSource

type AudioSource struct {
	engine.BaseComponent

	Clip AudioClip
	// contains filtered or unexported fields
}

func NewAudioSource

func NewAudioSource(clip AudioClip) *AudioSource

func (*AudioSource) IsPlaying

func (this *AudioSource) IsPlaying() bool

func (*AudioSource) Pause

func (this *AudioSource) Pause()

func (*AudioSource) Play

func (this *AudioSource) Play()

func (*AudioSource) Set2D

func (this *AudioSource) Set2D()

func (*AudioSource) SetDistanceModel

func (this *AudioSource) SetDistanceModel(model DistanceModel)

func (*AudioSource) SetGain

func (this *AudioSource) SetGain(gain float32)

func (*AudioSource) SetLooping

func (this *AudioSource) SetLooping(loop bool)

func (*AudioSource) SetMaxDistance

func (this *AudioSource) SetMaxDistance(distance float32)

func (*AudioSource) SetMono

func (this *AudioSource) SetMono(v bool)

func (*AudioSource) SetPitch

func (this *AudioSource) SetPitch(pitch float32)

func (*AudioSource) SetReferenceDistance

func (this *AudioSource) SetReferenceDistance(distance float32)

func (*AudioSource) SetRolloffFactor

func (this *AudioSource) SetRolloffFactor(factor float32)

func (*AudioSource) Start

func (this *AudioSource) Start()

func (*AudioSource) Stop

func (this *AudioSource) Stop()

func (*AudioSource) Update

func (this *AudioSource) Update()

func (*AudioSource) UpdateTransform

func (this *AudioSource) UpdateTransform()

type DistanceModel

type DistanceModel uint32

type Format

type Format int

func (Format) AlFormat

func (f Format) AlFormat() openal.Format

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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