예제 #1
0
// SetMusicPosition
// (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_65.html)
func SetMusicPosition(position int64) error {
	_position := (C.double)(position)
	if C.Mix_SetMusicPosition(_position) == -1 {
		return sdl.GetError()
	}
	return nil
}
예제 #2
0
func SetPosition(pos float64) {
	t := C.Mix_GetMusicType(nil)
	if t == C.MUS_MP3 {
		Rewind()
	}
	C.Mix_SetMusicPosition(C.double(pos))
}
예제 #3
0
// Sets the position of the currently playing music.
func SetMusicPosition(position float32) int {
	return int(C.Mix_SetMusicPosition(C.double(position)))
}
예제 #4
0
func SetMusicPosition(position int64) bool {
	_position := (C.double)(position)
	return int(C.Mix_SetMusicPosition(_position)) == 0
}
예제 #5
0
파일: mixer.go 프로젝트: beoran/fungo
// Set the current position in the music stream.
// This returns 0 if successful, or -1 if it failed or isn't implemented.
// This function is only implemented for MOD music formats (set pattern
// order number) and for OGG music (set position in seconds), at the
// moment.
func SetMusicPosition(position float64) (int) {
  return int(C.Mix_SetMusicPosition(C.double(position)))
}