AudioManager#setVolume() rejects values below 0 and above 100, but non-finite numbers such as NaN, Infinity, and -Infinity can pass the current range check. That can forward invalid volume values to resource.volume.setVolume().
Affected code: src/audio-manager.ts in setVolume().
Acceptance Criteria
setVolume() rejects NaN, Infinity, and -Infinity with AudioManagerConfigError.
Existing valid boundary values still work: 0 and 100.
Add a focused Jest regression test for non-finite volume values.
### Description
`AudioManager#setVolume()` rejects values below `0` and above `100`, but non-finite numbers such as `NaN`, `Infinity`, and `-Infinity` can pass the current range check. That can forward invalid volume values to `resource.volume.setVolume()`.
Affected code: `src/audio-manager.ts` in `setVolume()`.
### Acceptance Criteria
- `setVolume()` rejects `NaN`, `Infinity`, and `-Infinity` with `AudioManagerConfigError`.
- Existing valid boundary values still work: `0` and `100`.
- Add a focused Jest regression test for non-finite volume values.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
AudioManager#setVolume()rejects values below0and above100, but non-finite numbers such asNaN,Infinity, and-Infinitycan pass the current range check. That can forward invalid volume values toresource.volume.setVolume().Affected code:
src/audio-manager.tsinsetVolume().Acceptance Criteria
setVolume()rejectsNaN,Infinity, and-InfinitywithAudioManagerConfigError.0and100.