About This File
Inspired by a feature request on the LaunchBox feedback site by @crusadeRGP
https://feedback.launchbox.gg/p/pause-screen-music-player
"Add option to set custom music tracks and/or game music to be auto played when pause screen is activated and muted/stopped when returning to game"
This plugin will allow you to play music while your game is paused.
This can adapted to any Pause Theme.
Requirements:
- LaunchBox version 13.19 (or newer)
- Game and/or Platform and/or Background music files
- Modified Pause Theme
Installing:
-
Extract the contents of the zip file into /LaunchBox/Plugins/
- e.g. D:\LaunchBox\Plugins\PauseMenuMusic\PauseMenuMusic.dll
Setup (Required for this to work)
- Navigate to your \LaunchBox\PauseThemes\ folder
-
If you don't use a custom pause theme,
- select the Default folder
- Press Ctrl+C, then Ctrl+V
- This will create a copy of the Default pause theme folder (Default - Copy)
- Go into your theme's folder (e.g. D:\LaunchBox\PauseThemes\Default - Copy\)
- Using any text editor, open Default.xaml
-
Add/insert these 3 lines as shown below
- xmlns:playMusic="clr-namespace:PauseMenuMusic;assembly=PauseMenuMusic"
- <playMusic:PauseMenuMusicPlugin x:Key="playMyMusic"/>
- <MediaElement Source="{Binding SelectedGame, Converter={StaticResource playMyMusic}}"/>
- Save and close the file
- Repeat for other xaml files in that folder
-
Go to Tools < Options < Gameplay < Game Pause
- Make sure the Pause Theme you modified above is selected
Insert line #1 here:
Insert line #2 here:
Insert line #3 here:
Optional:
Now that you've read, and have a complete understanding of how to modify your theme... included as an additional download is a pre-modified version of the Default Pause Theme (Default - Music). You can use this instead of doing the above theme modifications if you so wish.
-
After downloading, copy the contents of Default - Music.7z into your \LaunchBox\PauseThemes\ folder
- e.g. D:\LaunchBox\PauseThemes\Default - Music\Default.xaml
- Set Default - Music as your Pause Theme
Settings/Options:
Start LaunchBox
Go to Tools < Pause-Menu Music Player
Default settings (shown):
Look for the games' music file
Use fallback music files
The plugin is enabled
Music types:
Select to play:
- Game specific music
- Platform specific music
- Background music
Fallback order-of-precedence:
With fallback enabled, the plugin will look for music files in the following order, starting with your selected music type:
- Game > Platform > Background
- Platform > Background
- Background: [none]
If fallback is disabled and there is no music file for your selected type, no music will play.
Disable Pause Music:
When checked, no music will play during Pause.
After making any changes, be sure to click Save Changes before closing the window.
Music Files:
-
Only .mp3 and .wma audio files are supported.
- The plugin will search for them in that order.
- If your platform or background folders have music files that are .mp3 and .wma, only the .mp3 file will ever play.
Music folders/files:
As prescribed by LaunchBox, music files should be located respectively in the following folders:
Game: \LaunchBox\Music\[platform]\[game.ext]
Platform: \LaunchBox\Music\Background\Platforms\[Platform Name]\[any_file.ext]
Background: \LaunchBox\Music\Background\[any_file.ext]
Caveats:
Only .mp3 and .wma audio files are supported. (a limitation of the method I chose to play audio files)
When you pause the game, the music (if found) plays. When resuming the game, the music stops.
When you pause the same game-play again later on, the music plays. From the beginning. Again.
With the tools and motivation at hand, there isn't a reasonable workaround for this.
If you have multiple audio files for the game, platform or background, only the 1st one found will ever be played.
There's no volume normalizer feature. Analyzing the media's audio levels programmatically to normalize them would add excess processing. (That, and I don't know how with the tools and motivation at hand.)
Music/song files will not loop. So don't pause for longer than the song. (We're here to play games, after all. Right? )
As always, all thoughts, views, opinions, comments and suggestions are welcome.
What's New in Version 1.0.0 See changelog
Released
No changelog available for this version.