fix(audio): implement IsPlaying() correctly
cant use rl.IsSoundPlaying() because we create sound aliases. so we must look at the sm.active slice instead
This commit is contained in:
parent
cb6e66bc45
commit
1b187d7412
1 changed files with 3 additions and 1 deletions
|
|
@ -55,7 +55,9 @@ func (sm *Manager) Stop(id SoundID) {
|
|||
}
|
||||
|
||||
func (sm Manager) IsPlaying(id SoundID) bool {
|
||||
return rl.IsSoundPlaying(*sm.library.Get(id))
|
||||
return slices.ContainsFunc(sm.active, func(e audio) bool {
|
||||
return e.id == id
|
||||
})
|
||||
}
|
||||
|
||||
// Pause all active sounds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue