Documentation ¶
Index ¶
- func GetVolume() float32
- func PauseAll()
- func PlayAll()
- func RewindAll()
- func SetVolume(gain float32)
- func StopAll()
- type Source
- func (s *Source) GetDuration() time.Duration
- func (s *Source) GetPitch() float32
- func (s *Source) GetState() string
- func (s *Source) GetVolume() float32
- func (s *Source) IsFinished() bool
- func (s *Source) IsLooping() bool
- func (s *Source) IsPaused() bool
- func (s *Source) IsPlaying() bool
- func (s *Source) IsStatic() bool
- func (s *Source) IsStopped() bool
- func (s *Source) Pause()
- func (s *Source) Play() bool
- func (s *Source) Resume()
- func (s *Source) Rewind()
- func (s *Source) Seek(offset time.Duration)
- func (s *Source) SetLooping(loop bool)
- func (s *Source) SetPitch(p float32)
- func (s *Source) SetVolume(v float32)
- func (s *Source) Stop()
- func (s *Source) Tell() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source manages decoding sound data, creates an openal sound and manages the data associated with the source.
func NewSource ¶
NewSource creates a new Source from a file at the path provided. If you specify a static source it will all be buffered into a single buffer. If false then it will create many buffers a cycle through them with data chunks. This allows a smaller memory footprint while playing bigger music files. You may want a static file if the sound is less than 2 seconds. It allows for faster cleaning playing of shorter sounds like footsteps.
func (*Source) GetDuration ¶
GetDuration returns the total duration of the source.
func (*Source) IsFinished ¶
IsFinished will return true if the source is at the end of its duration and it is not a looping source.
func (*Source) Rewind ¶
func (s *Source) Rewind()
Rewind rewinds the source source to its start time.
func (*Source) SetLooping ¶
SetLooping sets whether the Source should loop when the source is complete.
func (*Source) SetPitch ¶
SetPitch sets the pitch of the Source, the value should be between 0.0, 1.0
Directories ¶
Path | Synopsis |
---|---|
Package al provides OpenAL Soft bindings for Go.
|
Package al provides OpenAL Soft bindings for Go. |
Package decoding is used for converting familiar file types to data usable by OpenAL.
|
Package decoding is used for converting familiar file types to data usable by OpenAL. |