ForNeVeR/overtone

Load sounds only once and reuse in `SoundManager`

Offen

#106 geöffnet am 09.02.2026

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)F# (1 Fork)auto 404
enhancementgood first issuehelp wanted

Repository-Metriken

Stars
 (18 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Currently, we have this line: https://github.com/ForNeVeR/overtone/blob/156c60d9336b14c7464b36c5adc1db614980811d/Overtone.Game/UI/Controls.fs#L26

It will load the same sound again and again for each loaded control.

We should reuse the loaded sound somehow.

I propose to introduce a separate class, SoundManager, that would manage the loading of sounds — either load everything at once before running the game (for ultimate performance), or load it lazily on the fly. For our amount of data, probably both would work fine.

Contributor Guide