mix

package
v0.0.0-...-b7ebc80 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2015 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NO_FADING = iota
	FADING_OUT
	FADING_IN
)
View Source
const (
	NONE = iota
	CMD
	WAV
	MOD
	MID
	OGG
	MP3
	MP3_MAD
	FLAC
	MODPLUG
)
View Source
const CHANNEL_POST = -2
View Source
const DEFAULT_CHANNELS = 2
View Source
const DEFAULT_CHUNKSIZE = 2
View Source
const DEFAULT_FORMAT = sdl.AUDIO_S16LSB
View Source
const DEFAULT_FREQUENCY = 22050
View Source
const EFFECTSMAXSPEED = "MIX_EFFECTSMAXSPEED"
View Source
const MAX_VOLUME = 128

Variables

This section is empty.

Functions

func AllocateChannels

func AllocateChannels(numchans int) int

func ChannelFinished

func ChannelFinished(channelFinished func(int))

func CloseAudio

func CloseAudio()

func EachSoundFont

func EachSoundFont(function func(string) int) int

func ExpireChannel

func ExpireChannel(channel, ticks int) int

func FadeOutChannel

func FadeOutChannel(which, ms int) int

func FadeOutGroup

func FadeOutGroup(tag, ms int) int

func FadeOutMusic

func FadeOutMusic(ms int) bool

func GetChunkDecoder

func GetChunkDecoder(index int) string

func GetMusicDecoder

func GetMusicDecoder(index int) string

func GetNumChunkDecoders

func GetNumChunkDecoders() int

func GetNumMusicDecoders

func GetNumMusicDecoders() int

func GetSoundFonts

func GetSoundFonts() string

undocumented

func GetSynchroValue

func GetSynchroValue() int

undocumented

func GroupAvailable

func GroupAvailable(tag int) int

func GroupChannel

func GroupChannel(which, tag int) bool

func GroupChannels

func GroupChannels(from, to, tag int) int

func GroupCount

func GroupCount(tag int) int

func GroupNewer

func GroupNewer(tag int) int

func GroupOldest

func GroupOldest(tag int) int

func HaltChannel

func HaltChannel(channel int)

func HaltGroup

func HaltGroup(tag int)

func HaltMusic

func HaltMusic()

func HookMusic

func HookMusic(music_func func([]uint8))

func HookMusicFinished

func HookMusicFinished(musicFinished func())

func MusicPlaying

func MusicPlaying() bool

func OpenAudio

func OpenAudio(frequency int, format uint16, channels, chunksize int) error

func Pause

func Pause(channel int)

func PauseMusic

func PauseMusic()

func Paused

func Paused(channel int) bool

func PausedMusic

func PausedMusic() bool

func Playing

func Playing(channel int) bool

func QuerySpec

func QuerySpec() (frequency int, format uint16, channels int, open int, err error)

open is number of call to OpenAudio or 0 on error

func RegisterEffect

func RegisterEffect(channel int, f EffectFuncT, d EffectDoneT) int

func ReserveChannels

func ReserveChannels(num int) int

func Resume

func Resume(channel int)

func ResumeMusic

func ResumeMusic()

func RewindMusic

func RewindMusic()

func SetDistance

func SetDistance(channel int, distance uint8) error

func SetMusicCMD

func SetMusicCMD(command string) error

func SetMusicPosition

func SetMusicPosition(position int64) error

func SetPanning

func SetPanning(channel int, left, right uint8) error

func SetPosition

func SetPosition(channel int, angle int16, distance uint8) error

func SetPostMix

func SetPostMix(mix_func func([]uint8))

func SetReverseStereo

func SetReverseStereo(channel int, flip int) error

func SetSoundFonts

func SetSoundFonts(paths string) bool

undocumented

func SetSynchroValue

func SetSynchroValue(value int) bool

undocumented

func UnregisterAllEffects

func UnregisterAllEffects(channel int) int

func Volume

func Volume(channel, volume int) int

func VolumeMusic

func VolumeMusic(volume int) int

Types

type Chunk

type Chunk struct {
	// contains filtered or unexported fields
}

func GetChunk

func GetChunk(channel int) *Chunk

func LoadWAV

func LoadWAV(file string) (chunk *Chunk, err error)

func LoadWAV_RW

func LoadWAV_RW(src *sdl.RWops, freesrc bool) (chunk *Chunk, err error)

func QuickLoad_RAW

func QuickLoad_RAW(mem *uint8, len_ uint32) (chunk *Chunk, err error)

func QuickLoad_WAV

func QuickLoad_WAV(mem unsafe.Pointer) (chunk *Chunk, err error)

func (*Chunk) FadeIn

func (chunk *Chunk) FadeIn(channel, loops, ms int) (channel_ int, err error)

func (*Chunk) FadeInTimed

func (chunk *Chunk) FadeInTimed(channel, loops, ms, ticks int) (channel_ int, err error)

func (*Chunk) Free

func (chunk *Chunk) Free()

func (*Chunk) LengthInMs

func (chunk *Chunk) LengthInMs() int

func (*Chunk) PlayChannel

func (chunk *Chunk) PlayChannel(channel, loops int) (channel_ int, err error)

func (*Chunk) PlayTimed

func (chunk *Chunk) PlayTimed(channel, loops, ticks int) (channel_ int, err error)

func (*Chunk) Volume

func (chunk *Chunk) Volume(volume int) int

type EffectDoneT

type EffectDoneT func(channel int)

type EffectFuncT

type EffectFuncT func(channel int, stream []byte)

type Fading

type Fading int

func FadingChannel

func FadingChannel(which int) Fading

func FadingMusic

func FadingMusic() Fading

type Music

type Music struct {
	unsafe.Pointer
}

func LoadMUS

func LoadMUS(file string) (mus *Music, err error)

func LoadMUSType_RW

func LoadMUSType_RW(src *sdl.RWops, type_ MusicType, freesrc int) (mus *Music, err error)

func LoadMUS_RW

func LoadMUS_RW(src *sdl.RWops, freesrc int) (mus *Music, err error)

func (*Music) FadeIn

func (music *Music) FadeIn(loops, ms int) error

func (*Music) FadeInPos

func (music *Music) FadeInPos(loops, ms int, position float64) error

func (*Music) Free

func (music *Music) Free()

func (*Music) Play

func (music *Music) Play(loops int) error

func (*Music) Type

func (music *Music) Type() MusicType

type MusicType

type MusicType int

Jump to

Keyboard shortcuts

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