-
Notifications
You must be signed in to change notification settings - Fork 27
feat: Modify the volume of the music #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Sound 类的更新后的类图classDiagram
class Sound {
-float musicVolume$
+PlayPrefix(SoundManager.AcbID acbID, SoundManager.PlayerID playerID, int cueID, bool prepare, int target, int startTime, ref float volume) void$
}
note for Sound "Sound 类是静态的。"
文件级别更改
提示和命令与 Sourcery 互动
自定义您的体验访问您的 仪表板 以:
获得帮助Original review guide in EnglishReviewer's GuideIntroduces a configurable musicVolume setting via ConfigEntry and applies it in a Harmony prefix on SoundManager.Play to override the in-game music volume, alongside a minor import reordering. Sequence Diagram for Music Volume Adjustment via Harmony PatchsequenceDiagram
participant EC as ExternalCaller
participant P as Sound.PlayPrefix
participant SM as SoundManager
EC->>SM: Play(acbID=Music, playerID=Music, ..., volume)
activate SM
SM->>P: PlayPrefix(acbID, playerID, ..., ref volume)
activate P
alt acbID == SoundManager.AcbID.Music && playerID == SoundManager.PlayerID.Music
P-->>P: volume = musicVolume (newly configured value)
end
P-->>SM: return (volume parameter is updated)
deactivate P
SM-->>SM: Original Play method executes with (potentially) modified volume
SM-->>EC: (Music plays with new volume)
deactivate SM
Updated Class Diagram for the Sound ClassclassDiagram
class Sound {
-float musicVolume$
+PlayPrefix(SoundManager.AcbID acbID, SoundManager.PlayerID playerID, int cueID, bool prepare, int target, int startTime, ref float volume) void$
}
note for Sound "The Sound class is static."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嘿 @wuyu8512 - 我已经查看了你的更改,它们看起来很棒!
以下是我在审查期间查看的内容
- 🟡 一般问题:发现 1 个问题
- 🟢 安全性:一切看起来都很好
- 🟢 测试:一切看起来都很好
- 🟢 复杂性:一切看起来都很好
- 🟢 文档:一切看起来都很好
帮助我变得更有用!请点击每个评论上的👍或👎,我将使用反馈来改进你的评论。
Original comment in English
Hey @wuyu8512 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
{ | ||
if (acbID == SoundManager.AcbID.Music && playerID == SoundManager.PlayerID.Music) | ||
{ | ||
volume = musicVolume; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议: 覆盖音量可能会忽略游戏基础音量
考虑将当前音量按 musicVolume
缩放(例如,volume *= musicVolume
),以保留其他音量调整。
{ | |
if (acbID == SoundManager.AcbID.Music && playerID == SoundManager.PlayerID.Music) | |
{ | |
volume = musicVolume; | |
} | |
} | |
{ | |
if (acbID == SoundManager.AcbID.Music && playerID == SoundManager.PlayerID.Music) | |
{ | |
volume *= musicVolume; | |
} | |
} |
Original comment in English
suggestion: Override volume may ignore base game volume
Consider scaling the current volume by musicVolume
(e.g., volume *= musicVolume
) to preserve other volume adjustments.
{ | |
if (acbID == SoundManager.AcbID.Music && playerID == SoundManager.PlayerID.Music) | |
{ | |
volume = musicVolume; | |
} | |
} | |
{ | |
if (acbID == SoundManager.AcbID.Music && playerID == SoundManager.PlayerID.Music) | |
{ | |
volume *= musicVolume; | |
} | |
} |
@clansty 这个不考虑合一下吗,对我来说游戏的正解音即使调到最大还是嫌小,此PR可以让用户调整游戏BGM的音量大小,变相放大正解音 |
好的,这是翻译成中文的 pull request 总结:
Sourcery 总结
添加了自定义音乐音量控制的支持,通过引入一个新的配置项并通过 Harmony 前缀补丁应用于音乐播放来实现。
新特性:
musicVolume
配置项以调整背景音乐音量。增强功能:
SoundManager.Play
以使用配置的musicVolume
覆盖音乐提示音量。Original summary in English
Summary by Sourcery
Add support for custom music volume control by introducing a new configuration entry and applying it via a Harmony prefix patch on music playback.
New Features:
musicVolume
config entry to adjust background music volume.Enhancements:
SoundManager.Play
to override music cue volume using the configuredmusicVolume
.