Ejemplo n.º 1
0
func (music *Music) FadeInPos(loops, ms int, position float64) bool {
	_music := (*C.Mix_Music)(unsafe.Pointer(music))
	_loops := (C.int)(loops)
	_ms := (C.int)(ms)
	_position := (C.double)(position)
	return int(C.Mix_FadeInMusicPos(_music, _loops, _ms, _position)) == 0
}
Ejemplo n.º 2
0
// FadeInPos (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_59.html)
func (music *Music) FadeInPos(loops, ms int, position float64) error {
	_music := (*C.Mix_Music)(unsafe.Pointer(music))
	_loops := (C.int)(loops)
	_ms := (C.int)(ms)
	_position := (C.double)(position)
	if C.Mix_FadeInMusicPos(_music, _loops, _ms, _position) == -1 {
		return sdl.GetError()
	}
	return nil
}
Ejemplo n.º 3
0
// Same as FadeInMusic, only with a specified position to start the music at.
func (m *Music) FadeInMusicPos(loops, ms int, position float32) int {
	return int(C.Mix_FadeInMusicPos(m.cmusic, C.int(loops), C.int(ms),
		C.double(position)))
}
Ejemplo n.º 4
0
func FadeInMusicPos(music * C.Mix_Music, loops int, 
                    ms int, pos float) (int) {
  return int(C.Mix_FadeInMusicPos(music, C.int(loops), C.int(ms), C.double(pos)))
}
Ejemplo n.º 5
0
func (t *Music) FadeInLoopsPos(duration float64, loops int, pos float64) {
	if C.Mix_FadeInMusicPos(t.mus, C.int(loops), C.int(duration*1000.0), C.double(pos)) == -1 {
		panic(fmt.Sprintf("Unable to FadeIn Music file (%v): %v", t.name, util.GetMixError()))
	}
}