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
Ogg vorbis supported theme background music #836
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I think it might be a better idea to avoid embedding the ogg data in the elf executable, and instead only load ogg from theme.
Otherwise, that's 361kb of EE ram gone (even when loading other ogg files from themes).
Alright what about: a customisable path entry in audio settings “Default Theme Music” users can set so we can still have BGM on default theme. “mass0:bgm.ogg” for example, Fair compromise or pointless option? |
I guess that's fine |
Alright done and tested, if it meets approval I'll rebase the 2 new commits into the 2 old ones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be OK
rebased |
@KrahJohlito It seems that this function can only run on the default opl screen if you try to use it in a custom theme in THM, the song will not continue to play, but opl thinks it does. Any ideas on how to fix it? I have solved it, however, since this option is an optional thing it is not for the background music only plays if it is in the thm_temaX/sound folder where it has the effects sound initialization files would this be a limitation or difficulty to read files in different locations? |
Ogg vorbis supported theme background music
Pull Request checklist
Note: these are not necessarily requirements
Pull Request description
Not the most useful feature but I was bored and saw fjtrujy added libvorbis to ports and thought it might be fun to try get it working.
This adds background music to the internal and external themes in the form of ogg vorbis, just put “bgm.ogg” (all lowercase) into thm/sound folder and enable BGM.
Made some alterations to sound.c to tidy and kind of complete the audio system. There were a couple instances where the music would stutter so I’ve worked around the issue for now by muting playback and left it as a seperate commit in case some improved way is ever found.
Those instances are as follows: Changing video mode, changing language, saving config.
Also added myself to about page.. cause why not..
Can’t seem to find the request review maybe cause I’m on my phone so… requesting review from @uyjulian and @rickgaiser if he’s around.
Big thanks to @sp193 who helped me a lot when I was starting out.