IsSoundReady has been renamed

This commit is contained in:
JupiterRider 2024-11-24 15:54:51 +01:00
parent f3553fea29
commit 3282ea28f2
2 changed files with 8 additions and 8 deletions

View file

@ -209,10 +209,10 @@ func LoadSoundAlias(source Sound) Sound {
return v return v
} }
// IsSoundReady - Checks if a sound is ready // IsSoundValid - Checks if a sound is valid (data loaded and buffers initialized)
func IsSoundReady(sound Sound) bool { func IsSoundValid(sound Sound) bool {
csound := sound.cptr() csound := sound.cptr()
ret := C.IsSoundReady(*csound) ret := C.IsSoundValid(*csound)
v := bool(ret) v := bool(ret)
return v return v
} }

View file

@ -475,7 +475,7 @@ var isWaveValid func(wave uintptr) bool
var loadSound func(sound uintptr, fileName string) var loadSound func(sound uintptr, fileName string)
var loadSoundFromWave func(sound uintptr, wave uintptr) var loadSoundFromWave func(sound uintptr, wave uintptr)
var loadSoundAlias func(sound uintptr, source uintptr) var loadSoundAlias func(sound uintptr, source uintptr)
var isSoundReady func(sound uintptr) bool var isSoundValid func(sound uintptr) bool
var updateSound func(sound uintptr, data []byte, sampleCount int32) var updateSound func(sound uintptr, data []byte, sampleCount int32)
var unloadWave func(wave uintptr) var unloadWave func(wave uintptr)
var unloadSound func(sound uintptr) var unloadSound func(sound uintptr)
@ -991,7 +991,7 @@ func init() {
purego.RegisterLibFunc(&loadSound, raylibDll, "LoadSound") purego.RegisterLibFunc(&loadSound, raylibDll, "LoadSound")
purego.RegisterLibFunc(&loadSoundFromWave, raylibDll, "LoadSoundFromWave") purego.RegisterLibFunc(&loadSoundFromWave, raylibDll, "LoadSoundFromWave")
purego.RegisterLibFunc(&loadSoundAlias, raylibDll, "LoadSoundAlias") purego.RegisterLibFunc(&loadSoundAlias, raylibDll, "LoadSoundAlias")
purego.RegisterLibFunc(&isSoundReady, raylibDll, "IsSoundReady") purego.RegisterLibFunc(&isSoundValid, raylibDll, "IsSoundValid")
purego.RegisterLibFunc(&updateSound, raylibDll, "UpdateSound") purego.RegisterLibFunc(&updateSound, raylibDll, "UpdateSound")
purego.RegisterLibFunc(&unloadWave, raylibDll, "UnloadWave") purego.RegisterLibFunc(&unloadWave, raylibDll, "UnloadWave")
purego.RegisterLibFunc(&unloadSound, raylibDll, "UnloadSound") purego.RegisterLibFunc(&unloadSound, raylibDll, "UnloadSound")
@ -3624,9 +3624,9 @@ func LoadSoundAlias(source Sound) Sound {
return sound return sound
} }
// IsSoundReady - Checks if a sound is ready // IsSoundValid - Checks if a sound is valid (data loaded and buffers initialized)
func IsSoundReady(sound Sound) bool { func IsSoundValid(sound Sound) bool {
return isSoundReady(uintptr(unsafe.Pointer(&sound))) return isSoundValid(uintptr(unsafe.Pointer(&sound)))
} }
// UpdateSound - Update sound buffer with new data // UpdateSound - Update sound buffer with new data