ForNeVeR/overtone

Load sounds only once and reuse in `SoundManager`

开放

#106 创建于 2026年2月9日

 (0 条评论) (0 个反应) (0 位负责人)F# (1 个派生)auto 404
enhancementgood first issuehelp wanted

仓库指标

星标
 (18 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南