MCPcopy
hub / github.com/EngoEngine/engo / GetVolume

Method GetVolume

common/audio_player.go:279–285  ·  view source on GitHub ↗

GetVolume gets the Player's volume

()

Source from the content-addressed store, hash-verified

277
278// GetVolume gets the Player's volume
279func (p *Player) GetVolume() float64 {
280 v := 0.0
281 p.sync(func() {
282 v = p.volume
283 })
284 return v
285}
286
287// SetVolume sets the Player's volume
288// volume can only be set from 0 to 1

Callers 2

TestAudioPlayerVolumeFunction · 0.80
UpdateMethod · 0.80

Calls 1

syncMethod · 0.95

Tested by 1

TestAudioPlayerVolumeFunction · 0.64