Documentation ¶
Index ¶
- Constants
- func AllocateChannels(numchans int) int
- func ChannelFinished(channelFinished func(int))
- func CloseAudio()
- func EachSoundFont(function func(string) int) int
- func ExpireChannel(channel, ticks int) int
- func FadeOutChannel(which, ms int) int
- func FadeOutGroup(tag, ms int) int
- func FadeOutMusic(ms int) bool
- func GetChunkDecoder(index int) string
- func GetMusicDecoder(index int) string
- func GetNumChunkDecoders() int
- func GetNumMusicDecoders() int
- func GetSoundFonts() string
- func GetSynchroValue() int
- func GroupAvailable(tag int) int
- func GroupChannel(which, tag int) bool
- func GroupChannels(from, to, tag int) int
- func GroupCount(tag int) int
- func GroupNewer(tag int) int
- func GroupOldest(tag int) int
- func HaltChannel(channel int)
- func HaltGroup(tag int)
- func HaltMusic()
- func HookMusic(music_func func([]uint8))
- func HookMusicFinished(musicFinished func())
- func Init(flags int) error
- func OpenAudio(frequency int, format uint16, channels, chunksize int) error
- func Pause(channel int)
- func PauseMusic()
- func Paused(channel int) int
- func PausedMusic() bool
- func Playing(channel int) int
- func PlayingMusic() bool
- func QuerySpec() (frequency int, format uint16, channels int, open int, err error)
- func Quit()
- func RegisterEffect(channel int, f EffectFuncT, d EffectDoneT) error
- func ReserveChannels(num int) int
- func Resume(channel int)
- func ResumeMusic()
- func RewindMusic()
- func SetDistance(channel int, distance uint8) error
- func SetMusicCMD(command string) error
- func SetMusicPosition(position int64) error
- func SetPanning(channel int, left, right uint8) error
- func SetPosition(channel int, angle int16, distance uint8) error
- func SetPostMix(mix_func func([]uint8))
- func SetReverseStereo(channel, flip int) error
- func SetSoundFonts(paths string) bool
- func SetSynchroValue(value int) bool
- func UnregisterAllEffects(channel int) error
- func Volume(channel, volume int) int
- func VolumeMusic(volume int) int
- type Chunk
- func (chunk *Chunk) FadeIn(channel, loops, ms int) (channel_ int, err error)
- func (chunk *Chunk) FadeInTimed(channel, loops, ms, ticks int) (channel_ int, err error)
- func (chunk *Chunk) Free()
- func (chunk *Chunk) LengthInMs() int
- func (chunk *Chunk) Play(channel, loops int) (channel_ int, err error)
- func (chunk *Chunk) PlayTimed(channel, loops, ticks int) (channel_ int, err error)
- func (chunk *Chunk) Volume(volume int) int
- type EffectDoneT
- type EffectFuncT
- type Fading
- type Music
- type MusicType
Constants ¶
const ( INIT_FLAC = C.MIX_INIT_FLAC INIT_MOD = C.MIX_INIT_MOD INIT_MP3 = C.MIX_INIT_MP3 INIT_OGG = C.MIX_INIT_OGG )
const ( CHANNELS = 8 DEFAULT_FREQUENCY = C.MIX_DEFAULT_FREQUENCY DEFAULT_FORMAT = C.MIX_DEFAULT_FORMAT DEFAULT_CHANNELS = C.MIX_DEFAULT_CHANNELS MAX_VOLUME = C.MIX_MAX_VOLUME CHANNEL_POST = -2 EFFECTSMAXSPEED = "MIX_EFFECTSMAXSPEED" )
Defines (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_91.html)
const DEFAULT_CHUNKSIZE = 1024
Variables ¶
This section is empty.
Functions ¶
func AllocateChannels ¶
AllocateChannels (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_26.html)
func ChannelFinished ¶
func ChannelFinished(channelFinished func(int))
ChannelFinished (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_37.html)
func CloseAudio ¶
func CloseAudio()
CloseAudio (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_12.html)
func ExpireChannel ¶
ExpireChannel (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_35.html)
func FadeOutChannel ¶
FadeOutChannel (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_36.html)
func FadeOutGroup ¶
FadeOutGroup (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_50.html)
func FadeOutMusic ¶
FadeOutMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_68.html)
func GetChunkDecoder ¶
GetChunkDecoder (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_18.html)
func GetMusicDecoder ¶
GetMusicDecoder (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_54.html)
func GetNumChunkDecoders ¶
func GetNumChunkDecoders() int
GetNumChunkDecoders (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_17.html)
func GetNumMusicDecoders ¶
func GetNumMusicDecoders() int
GetNumMusicDecoders (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_53.html)
func GroupAvailable ¶
GroupAvailable (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_47.html)
func GroupChannel ¶
GroupChannel (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_44.html)
func GroupChannels ¶
GroupChannels (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_45.html)
func GroupCount ¶
GroupCount (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_46.html)
func GroupNewer ¶
GroupNewer (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_49.html)
func GroupOldest ¶
GroupOldest (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_48.html)
func HaltChannel ¶
func HaltChannel(channel int)
HaltChannel (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_34.html)
func HaltGroup ¶
func HaltGroup(tag int)
HaltGroup (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_51.html)
func HaltMusic ¶
func HaltMusic()
HaltMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_67.html)
func HookMusic ¶
func HookMusic(music_func func([]uint8))
HookMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_60.html)
func HookMusicFinished ¶
func HookMusicFinished(musicFinished func())
HookMusicFinished (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_69.html)
func OpenAudio ¶
OpenAudio (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_11.html)
func Pause ¶
func Pause(channel int)
Pause (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_32.html)
func PauseMusic ¶
func PauseMusic()
PauseMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_62.html)
func PausedMusic ¶
func PausedMusic() bool
PausedMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_72.html)
func PlayingMusic ¶
func PlayingMusic() bool
PlayingMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_71.html)
func QuerySpec ¶
QuerySpec (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_15.html) open is number of call to OpenAudio or 0 on error
func RegisterEffect ¶
func RegisterEffect(channel int, f EffectFuncT, d EffectDoneT) error
RegisterEffect (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_76.html)
func ReserveChannels ¶
ReserveChannels (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_43.html)
func Resume ¶
func Resume(channel int)
Resume (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_33.html)
func ResumeMusic ¶
func ResumeMusic()
ResumeMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_63.html)
func RewindMusic ¶
func RewindMusic()
RewindMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_64.html)
func SetDistance ¶
SetDistance (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_81.html)
func SetMusicCMD ¶
SetMusicCMD (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_66.html)
func SetMusicPosition ¶
SetMusicPosition (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_65.html)
func SetPanning ¶
SetPanning (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_80.html)
func SetPosition ¶
SetPosition (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_82.html)
func SetPostMix ¶
func SetPostMix(mix_func func([]uint8))
SetPostMix (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_79.html)
func SetReverseStereo ¶
SetReverseStereo (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_83.html)
func UnregisterAllEffects ¶
UnregisterAllEffects (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_78.html)
func VolumeMusic ¶
VolumeMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_61.html)
Types ¶
type Chunk ¶
type Chunk struct {
// contains filtered or unexported fields
}
Chunk (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_85.html)
func LoadWAV_RW ¶
LoadWAV_RW (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_20.html)
func QuickLoad_RAW ¶
QuickLoad_RAW (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_22.html)
func QuickLoad_WAV ¶
QuickLoad_WAV (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_21.html)
func (*Chunk) FadeIn ¶
FadeIn (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_30.html)
func (*Chunk) FadeInTimed ¶
FadeInTimed (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_31.html)
func (*Chunk) Free ¶
func (chunk *Chunk) Free()
Free (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_24.html)
func (*Chunk) LengthInMs ¶
LengthInMs returns the playing time of the chunk in milliseconds.
func (*Chunk) Play ¶
Play (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_28.html)
func (*Chunk) PlayTimed ¶
PlayTimed (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_29.html)
type EffectDoneT ¶
type EffectDoneT func(channel int)
EffectDoneT (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_90.html)
type EffectFuncT ¶
EffectFuncT (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_89.html)
type Fading ¶
type Fading int
Fading (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_88.html)
func FadingChannel ¶
FadingChannel (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_40.html)
func FadingMusic ¶
func FadingMusic() Fading
FadingMusic (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_73.html)
type Music ¶
Music (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_86.html)
func LoadMUSType_RW ¶
undocumented
func (*Music) FadeIn ¶
FadeIn (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_58.html)
func (*Music) FadeInPos ¶
FadeInPos (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_59.html)
func (*Music) Free ¶
func (music *Music) Free()
Free (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_56.html)
func (*Music) Play ¶
Play (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_57.html)
func (*Music) Type ¶
Type (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_70.html)