Documentation ¶
Index ¶
- func NewAmbience(next mix.Source, fade, chunkSize mix.Tz) mix.SourceMutator
- func NewMusic(mus, next mix.Source, fade, chunkSize mix.Tz) mix.SourceMutator
- type Ambience
- type Effect
- type Music
- type Region
- type Session
- func (s *Session) AddRegion(r Region) error
- func (s *Session) Clone() mix.Source
- func (s *Session) Length() mix.Tz
- func (s *Session) NumChannels() int
- func (s *Session) Position() mix.Tz
- func (s *Session) SampleRate() mix.Tz
- func (s *Session) Samples(channel int, offset, length mix.Tz) mix.Buffer
- func (s *Session) SetPosition(pos mix.Tz)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAmbience ¶
Types ¶
type Region ¶
type Region struct { Source mix.Source // Audio to play. Begin mix.Tz // Time to begin playing in session samples. Offset, Length mix.Tz // Offset and Length in Source that will be played. Volume, Pan float32 // Volume gain and stereo panning. FadeIn, FadeOut mix.Tz // Length of fades. }
Region defines where and how Source audio (or its part) will be played.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session mixes collection of Regions. Output is done in 32-bit float WAV. Session implements Source, so it could be nested.
func NewSession ¶
NewSession creates Session with given sampleRate.
func (*Session) Clone ¶
Returns shallow copy of Session. Sources that are used in regions are not cloned.
func (*Session) NumChannels ¶
NumChannels returns number of channels in Session
func (*Session) SampleRate ¶
SampleRate returns sample rate of Session.
func (*Session) SetPosition ¶
SetPosition sets current Session position.
Click to show internal directories.
Click to hide internal directories.