mix

package
Version: v0.0.0-...-1caac2b Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2014 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) bool

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) bool

func FadeOutChannel

func FadeOutChannel(which, ms int) bool

func FadeOutGroup

func FadeOutGroup(tag, ms int) bool

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

func GetSynchroValue

func GetSynchroValue() int

func GroupAvailable

func GroupAvailable(tag int) int

func GroupChannel

func GroupChannel(which, tag int) bool

func GroupChannels

func GroupChannels(from, to, tag int) bool

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) bool

func HaltGroup

func HaltGroup(tag int) bool

func HaltMusic

func HaltMusic() bool

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) bool

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) bool

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) bool

func SetMusicCMD

func SetMusicCMD(command string) bool

func SetMusicPosition

func SetMusicPosition(position int64) bool

func SetMusicVolume

func SetMusicVolume(volume int) int

func SetPanning

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

func SetPosition

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

func SetPostMix

func SetPostMix(mix_func func([]uint8))

func SetReverseStereo

func SetReverseStereo(channel int, flip int) bool

func SetSoundFonts

func SetSoundFonts(paths string) bool

func SetSynchroValue

func SetSynchroValue(value int) bool

func SetVolume

func SetVolume(channel, volume int) int

func UnregisterAllEffects

func UnregisterAllEffects(channel int) int

Types

type Chunk

type Chunk struct {
	Allocated int32
	Buf       *uint8
	Len       uint32
	Volume    uint8
}

func GetChunk

func GetChunk(channel int) *Chunk

func LoadWAV

func LoadWAV(file string) *Chunk

func LoadWAV_RW

func LoadWAV_RW(src *sdl.RWops, freesrc int) *Chunk

func QuickLoad_RAW

func QuickLoad_RAW(mem *uint8, len_ uint32) *Chunk

func QuickLoad_WAV

func QuickLoad_WAV(mem *uint8) *Chunk

func (*Chunk) FadeIn

func (chunk *Chunk) FadeIn(channel, loops, ms, ticks int) bool

func (*Chunk) FadeInTimed

func (chunk *Chunk) FadeInTimed(channel, loops, ms, ticks int) bool

func (*Chunk) Free

func (chunk *Chunk) Free()

func (*Chunk) PlayChannel

func (chunk *Chunk) PlayChannel(channel, loops int) bool

func (*Chunk) PlayTimed

func (chunk *Chunk) PlayTimed(channel, loops, ticks int) bool

func (*Chunk) SetVolume

func (chunk *Chunk) SetVolume(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) *Music

func LoadMUSType_RW

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

func LoadMUS_RW

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

func (*Music) FadeIn

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

func (*Music) FadeInPos

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

func (*Music) Free

func (music *Music) Free()

func (*Music) Play

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

func (*Music) Type

func (music *Music) Type() MusicType

type MusicType

type MusicType int

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto