コード例 #1
0
ファイル: chunks.go プロジェクト: paul-lalonde/Go-SDL
//Returns: Pointer to the Mix Chunk. nil is returned if the channel is not allocated, or
//if the channel has not played any samples yet
func GetChunk(channel int) *Chunk {
	out := C.Mix_GetChunk(C.int(channel))
	if out == nil {
		return nil
	}
	return &Chunk{out}
}
コード例 #2
0
ファイル: sdl_mixer.go プロジェクト: flazz/go-sdl2
func GetChunk(channel int) *Chunk {
	_channel := (C.int)(channel)
	return (*Chunk)(unsafe.Pointer(C.Mix_GetChunk(_channel)))
}
コード例 #3
0
ファイル: mixer.go プロジェクト: beoran/fungo
// Get the Mix_Chunk currently associated with a mixer channel
// Returns NULL if it's an invalid channel, or there's no chunk associated.
func GetChunk(channel int) (* C.Mix_Chunk) {
  return C.Mix_GetChunk(C.int(channel))
}