Closed Alex-DMC closed 6 months ago
@Alex-DMC These are great changes, thank you!
I finally got a chance to sit down and test these. At first glance they look really good, the only issue I have is that it looks like every time the "timer" activates, there's an audible "ding" noise ever 5 seconds. I barely noticed it, but if I toggle the lock off, the dinging goes away.
I'm looking into if there's a way to silence it.
AH, the setValue() function literally has a playSound function in the first line.
I think if we change the setValue function to something like this:
const setValue = async (address: string, match_index: number, silence: boolean = false) => {
And then wrap the playSound in a silence check:
if ( !silence ) {
playSound("https://steamloopback.host/sounds/deck_ui_default_activation.wav");
}
And update your code to include a "true" parameter, it should disable that activation sound every 5 seconds...
const onAutoChange = async () => {
if (locked) onCancelAutoChange();
else {
setValue("0x00000", 999, true);
const timer: any = setInterval(() => {
setValue("0x00000", 999, true);
}, 5000);
setLocked(timer);
}
}
okay i'm done reviewing this. i think if you make those slight adjustments i mentioned, i'm good with merging this.
sorry for all the notifications!
This resolves issue #22
@Alex-DMC These a great changes, thank you!
I finally got a chance to sit down and test these. At first glance they look really good, the only issue I have is that it looks like every time the "timer" activates, there's an audible "ding" noise ever 5 seconds. I barely noticed it, but if I toggle the lock off, the dinging goes away.
I'm looking into if there's a way to silence it.
LOL
Yes, To verify that the function is running properly, I kept a prompt sound. Because I found that if running in the background for a long time, the process will be killed by Steam.