You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a retain-release-logic to SoundEffect so it is possible to keep handles to played sounds and modify stuff like volume or panning while the sound plays.
basic idea is that there's a atomic reference counter and release() requires a EventPool where the sound is freed with when the refcount goes to zero.
consthandle=tryaudio.playSound(sound, .{
.keep_reference=true, // this is opt-in behaviour, we would not retain the sound handle by defaul
});
…
handle.pan+=0.2*delta_time;
…
audio.releaseSound(handle);
Expose the following features to the user:
is_playing
pan
volume
The text was updated successfully, but these errors were encountered:
Add a
retain
-release
-logic toSoundEffect
so it is possible to keep handles to played sounds and modify stuff like volume or panning while the sound plays.basic idea is that there's a atomic reference counter and
release()
requires aEventPool
where the sound is freed with when the refcount goes to zero.Expose the following features to the user:
is_playing
pan
volume
The text was updated successfully, but these errors were encountered: