Add new core and audio functions
This commit is contained in:
parent
1ffd9fb3ca
commit
c0b171213e
3 changed files with 31 additions and 1 deletions
|
@ -52,6 +52,13 @@ func SetMasterVolume(volume float32) {
|
|||
C.SetMasterVolume(cvolume)
|
||||
}
|
||||
|
||||
// GetMasterVolume - Set master volume (listener)
|
||||
func GetMasterVolume() float32 {
|
||||
ret := C.GetMasterVolume()
|
||||
v := float32(ret)
|
||||
return v
|
||||
}
|
||||
|
||||
// LoadWave - Load wave data from file into RAM
|
||||
func LoadWave(fileName string) Wave {
|
||||
cfileName := C.CString(fileName)
|
||||
|
@ -97,6 +104,14 @@ func LoadSoundFromWave(wave Wave) Sound {
|
|||
return v
|
||||
}
|
||||
|
||||
// LoadSoundAlias - Create a new sound that shares the same sample data as the source sound, does not own the sound data
|
||||
func LoadSoundAlias(source Sound) Sound {
|
||||
csound := source.cptr()
|
||||
ret := C.LoadSoundAlias(*csound)
|
||||
v := newSoundFromPointer(unsafe.Pointer(&ret))
|
||||
return v
|
||||
}
|
||||
|
||||
// IsSoundReady - Checks if a sound is ready
|
||||
func IsSoundReady(sound Sound) bool {
|
||||
csound := sound.cptr()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue