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

Add "Audio.MusicGetFilepath" and "Audio.MusicGetFilepathArguments" #72

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

SpencerlyEverly
Copy link
Contributor

@SpencerlyEverly SpencerlyEverly commented Jan 29, 2024

2024-06-22 15-27-54

Today, I made a pull request with new functions added: "Audio.MusicGetFilepath" and "Audio.MusicGetFilepathArguments"!

With the functions, you can now see what music is currently playing on the engine, along with getting the SDL Mixer X arguments at the end! The functions should support all of these instances:

  • Level Music (Including custom music on slot 24)
  • World Music (Including, which isn't on the official branch yet, custom music on slot 17)
  • Special Music (P-Switch, Stopwatch, Credits)
  • Music played when sections are seized (Using "Audio.SeizeStream", "Audio.MusicOpen", and "Audio.MusicPlay" in that order)
  • Music played with the Lua function "Audio.MusicChange" (Though the function is just replace the custom music ID filepath and play it)

Here's the function information below:

  • Audio.MusicGetFilepath(shouldHaveArgumentsOrBlank): Gets the current playing music on the engine. If "shouldHaveArgumentsOrBlank" is false or not specified, any SDL Mixer X arguments at the end of the filepath will be removed.
  • Audio.MusicGetFilepathArguments(): Gets the current playing music's SDL Mixer X arguments located at the end of the filepath.

Hope this pull request gets accepted!

@SpencerlyEverly SpencerlyEverly changed the title Music ID overriding (Audio.sounds equalivent) Music ID related things + Audio.MusicGet() Jan 30, 2024
@SpencerlyEverly SpencerlyEverly changed the title Music ID related things + Audio.MusicGet() Add "Audio.MusicGetFilepath()" Jun 22, 2024
…playing SDL Mixer X arguments, and have a boolean argument for "Audio.MusicGetFilepath", that if true, will keep the arguments intact (False to remove them)
@SpencerlyEverly SpencerlyEverly changed the title Add "Audio.MusicGetFilepath()" Add "Audio.MusicGetFilepath" and "Audio.MusicGetFilepathArguments" Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant