// FadeIn (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_58.html) func (music *Music) FadeIn(loops, ms int) error { _music := (*C.Mix_Music)(unsafe.Pointer(music)) _loops := (C.int)(loops) _ms := (C.int)(ms) if C.Mix_FadeInMusic(_music, _loops, _ms) == -1 { return sdl.GetError() } return nil }
// Play the music and loop a specified number of times. During the first loop, // fade in for the milliseconds specified. Passing -1 makes the music loop // continuously. The fade-in effect only occurs during the first loop. func (m *Music) FadeInMusic(loops, ms int) int { return int(C.Mix_FadeInMusic(m.cmusic, C.int(loops), C.int(ms))) }
// Fade in music or a channel over "ms" milliseconds, same semantics // as the "Play" functions func FadeInMusic(music * C.Mix_Music, loops int, ms int) (int) { return int(C.Mix_FadeInMusic(music, C.int(loops), C.int(ms))) }
func (music *Music) FadeIn(loops, ms int) bool { _music := (*C.Mix_Music)(unsafe.Pointer(music)) _loops := (C.int)(loops) _ms := (C.int)(ms) return int(C.Mix_FadeInMusic(_music, _loops, _ms)) == 0 }
func (t *Music) FadeInLoops(duration float64, loops int) { if C.Mix_FadeInMusic(t.mus, C.int(loops), C.int(duration*1000.0)) == -1 { panic(fmt.Sprintf("Unable to FadeIn Music file (%v): %v", t.name, util.GetMixError())) } }