Skip to content
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

Tweaks: Added option to mute BGM in MainUI #1236

Merged
merged 9 commits into from
Dec 21, 2023

Conversation

theUnBurn
Copy link
Contributor

@theUnBurn theUnBurn commented Oct 25, 2023

This commit adds the ability to mute music, independently of the volume set. This is done so users can mute bgm while still having menuing sounds play.

The toggle will live in tweaks, in "Appearance --> Theme Overrides... --> Mute background music"

Tweaks_000

@theUnBurn theUnBurn marked this pull request as draft October 25, 2023 04:01
@theUnBurn theUnBurn changed the title FEAT: Mute BGM in Tweaks [WIP] FEAT: Mute BGM in Tweaks Oct 25, 2023
@theUnBurn theUnBurn force-pushed the feat-mute-bgm branch 2 times, most recently from 44f2218 to bb66eeb Compare October 25, 2023 04:06
@Aemiii91 Aemiii91 added the enhancement New or improved feature label Oct 25, 2023
@theUnBurn theUnBurn marked this pull request as ready for review October 28, 2023 05:49
@XK9274
Copy link
Member

XK9274 commented Dec 3, 2023

Built & tested earlier. Works great and does what it says - thanks for the first contribution!

I have noticed when you change theme with mute active the mute status is reset and the json key is removed from system.json so the theme you had muted previously is no longer muted, the tweaks menu item is also reset to 0

/ # cat /appconfigs/system.json
{
        "vol":  15,
        "keymap":       "L2,L,R2,R,X,A,B,Y",
        "mute": 0,
        "bgmmute":      1,
        "bgmvol":       20,
        "brightness":   10,
        "language":     "en.lang",
        "hibernate":    15,
        "lumination":   6,
        "hue":  10,
        "saturation":   10,
        "contrast":     10,
        "theme":        "/mnt/SDCARD/Themes/Silky by DiMo/",
        "fontsize":     24,
        "audiofix":     1,
        "wifi": 1
}

becomes:

 # cat /appconfigs/system.json
{
        "vol":  15,
        "keymap":       "L2,L,R2,R,X,A,B,Y",
        "mute": 0,
        "bgmvol":       20,
        "brightness":   10,
        "language":     "en.lang",
        "hibernate":    15,
        "lumination":   6,
        "hue":  10,
        "saturation":   10,
        "contrast":     10,
        "theme":        "/mnt/SDCARD/Themes/Onion Boy DX by PixelShift/",
        "fontsize":     24,
        "audiofix":     1,
        "wifi": 1
}/ #

(and also the copy on the SDCARD):

/ # cat /mnt/SDCARD/system.json
{
        "vol":  15,
        "keymap":       "L2,L,R2,R,X,A,B,Y",
        "mute": 0,
        "bgmmute":      1,
        "bgmvol":       20,
        "brightness":   10,
        "language":     "en.lang",
        "hibernate":    15,
        "lumination":   6,
        "hue":  10,
        "saturation":   10,
        "contrast":     10,
        "theme":        "/mnt/SDCARD/Themes/Onion Boy DX by PixelShift/",
        "fontsize":     24,
        "audiofix":     1,
        "wifi": 1
}
/ # cat /mnt/SDCARD/system.json
{
        "vol":  15,
        "keymap":       "L2,L,R2,R,X,A,B,Y",
        "mute": 0,
        "bgmvol":       20,
        "brightness":   10,
        "language":     "en.lang",
        "hibernate":    15,
        "lumination":   6,
        "hue":  10,
        "saturation":   10,
        "contrast":     10,
        "theme":        "/mnt/SDCARD/Themes/Silky by DiMo/",
        "fontsize":     24,
        "audiofix":     1,
        "wifi": 1
}

I'm happy to approve but is this something you wanted to address or are you happy with the way it is? It would be great if the mute was persistent.

The system.json file does get moved around a bit, runtime.sh may hold the answers to why this happens :)

@theUnBurn
Copy link
Contributor Author

Hi @XK9274 ! Thanks for taking a look; I updated the *_system.jsons to have bgmmute; do notice that the bgms are now muted globally. Please let me know if this is what you were referring to!

@XK9274
Copy link
Member

XK9274 commented Dec 6, 2023

Hi @XK9274 ! Thanks for taking a look; I updated the *_system.jsons to have bgmmute; do notice that the bgms are now muted globally. Please let me know if this is what you were referring to!

Hi! No worries, apologies for that - i spoke with Schmurtz and he's happy with it not being persistent and the reasoning was that it potentially undermines the theme authors work if we turn it off permanently which does make sense, it should be a choice at discovery of the theme which is fine by me.

If you agree, you can revert your last commit of 2d1bb9b and @ me and i'll approve as i've already tested.

@theUnBurn
Copy link
Contributor Author

This makes sense to me too! Thanks @XK9274 , I have reverted the last commit and should be ready to go!

@XK9274 XK9274 self-requested a review December 6, 2023 15:06
Copy link
Member

@XK9274 XK9274 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested & approving, does what it says with the caveat that when themes are changed the mute is reverted, but this has been discussed (see above for context) - we can revisit in the future based on feedback from the community if it comes up. Thanks again for the contribution @theUnBurn!

@schmurtzm schmurtzm added this pull request to the merge queue Dec 21, 2023
Merged via the queue into OnionUI:main with commit 3fa2f89 Dec 21, 2023
3 checks passed
@Aemiii91 Aemiii91 changed the title FEAT: Mute BGM in Tweaks Tweaks: Added option to mute BGM in MainUI Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or improved feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants