Update C sources, add new functions
This commit is contained in:
parent
ac3cb63287
commit
2f90318d30
17 changed files with 332 additions and 242 deletions
|
@ -112,6 +112,12 @@ func IsAudioDeviceReady() bool {
|
|||
return v
|
||||
}
|
||||
|
||||
// Set master volume (listener)
|
||||
func SetMasterVolume(volume float32) {
|
||||
cvolume := (C.float)(volume)
|
||||
C.SetMasterVolume(cvolume)
|
||||
}
|
||||
|
||||
// Load wave data from file into RAM
|
||||
func LoadWave(fileName string) Wave {
|
||||
cfileName := C.CString(fileName)
|
||||
|
@ -321,6 +327,14 @@ func SetMusicPitch(music Music, pitch float32) {
|
|||
C.SetMusicPitch(cmusic, cpitch)
|
||||
}
|
||||
|
||||
// Set music loop count (loop repeats)
|
||||
// NOTE: If set to -1, means infinite loop
|
||||
func SetMusicLoopCount(music Music, count float32) {
|
||||
cmusic := *(*C.Music)(unsafe.Pointer(&music))
|
||||
ccount := (C.float)(count)
|
||||
C.SetMusicLoopCount(cmusic, ccount)
|
||||
}
|
||||
|
||||
// Get music time length (in seconds)
|
||||
func GetMusicTimeLength(music Music) float32 {
|
||||
cmusic := *(*C.Music)(unsafe.Pointer(&music))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue