bitfocus / companion-module-discord-api

MIT License
5 stars 2 forks source link

Issue with changing volume of other users #14

Open DeltaGamma-KSP opened 1 year ago

DeltaGamma-KSP commented 1 year ago

Describe the bug Decreasing selected user volume below 100% isn't possible when the volume is already above 100% and the step size is smaller than 10.

To Reproduce Steps to reproduce the behaviour:

  1. Create a Decrease selected user volume button from the presets
  2. Edit the button to decrease the volume with a value smaller than 10. (I found that I also needed to change from "label}" to "discord" under user).
  3. In Discord, set another users volume above 100%
  4. Attempt to decrease volume using the created button
  5. The other users volume will decrease by the step size but will not go below 100%

Expected behaviour The volume of the other user should continue to decrease as it does when the step size is equal or bigger than 10.

System (please complete the following information):

thedist commented 1 year ago

I've found the issue, but it may be a little tricky to fix as it's on Discords end due to the way they handle volume. For example, when volume is at 100, the next lower value is 94.4. so anything between 94.5 and 100 gets rounded up to 100 by Discord itself.

Another example is using intervals of 5, where Discord has no issues from 0 to 90, and 100 to 200, but when increasing at 90 because 95 is higher than 94.4 it gets rounded up to 100 too and goes from 90 to 100. This is not Companion doing this, it's Discord.

I'll see if their developer support has a workaround.