OpenComputers II

OpenComputers II

27.1k Downloads

Sound card not playing correctly

squoshi opened this issue ยท 2 comments

commented
8mb.video-ioJ-tsMx3VCB.mp4

Sound card not playing correctly

commented

Sound card plays correctly in the reality of Minecraft, and they Sound Engine. Because inside the playSound sound card method hides the default Minecraft JE playSound function, for example it's used in /playsound command. And pitch values above 2.0 will be clamped to 2.0.

https://github.com/fnuecke/oc2/blob/1.18-forge/src/main/java/li/cil/oc2/common/bus/device/rpc/item/SoundCardItemDevice.java#L70

Here is Minecraft Wiki quote about pitches in /playsound command:

Specifies the pitch of the sound. If not specified, defaults to 1.
Must be a Single-precision floating-point format number. In Java Edition, it must be between 0.0 and 2.0 (inclusive).

commented

I guess it would make sense to either clamp the values or report an error.