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

First song (nr. "00") in a music set/programme is always skipped #8946

Closed
Vindigo89 opened this issue Apr 4, 2021 · 3 comments
Closed

First song (nr. "00") in a music set/programme is always skipped #8946

Vindigo89 opened this issue Apr 4, 2021 · 3 comments

Comments

@Vindigo89
Copy link

Vindigo89 commented Apr 4, 2021

Version of OpenTTD: 1.10.3.

Expected result

All songs in a music set are played when choosing to play "all"

Actual result

The firste song, marked nr. "00" is always skipped, in a music set, unless it is selected in a "custom" set

Steps to reproduce

Start any music set? The song numbered "00" is always shown in the left-hand "track index" panel, but not included in the right-hand "programme - all" panel. This is also obvious due to one less song being included in the latter panel.

Some added context: I have downloaded several music sets in-game, but never added any of my own music etc.
This isn't a huge issue, of course, but seems like a weird bug that should be fairly easy to fix maybe?

@2TallTyler
Copy link
Member

Number 00 is played on the main menu screen. I don't see why it shouldn't play in-game though.

@glx22
Copy link
Contributor

glx22 commented Apr 4, 2021

It's done intentionally

OpenTTD/src/music_gui.cpp

Lines 109 to 124 in e8a94dc

for (uint i = 0; i < NUM_SONGS_AVAILABLE; i++) {
PlaylistEntry entry(set, i);
if (!entry.IsValid()) continue;
this->music_set.push_back(entry);
/* Add theme song to theme-only playlist */
if (i == 0) this->standard_playlists[PLCH_THEMEONLY].push_back(entry);
/* Don't add the theme song to standard playlists */
if (i > 0) {
this->standard_playlists[PLCH_ALLMUSIC].push_back(entry);
uint theme = (i - 1) / NUM_SONGS_CLASS;
this->standard_playlists[PLCH_OLDSTYLE + theme].push_back(entry);
}
}

But of course you can create a custom playlist with all songs, including "00".

@Vindigo89
Copy link
Author

Vindigo89 commented Apr 4, 2021

Thanks for the help! For some weird reason, I got the impression that there was a limit to the number of songs one could include in a "custom" playlist, but when I checked again, there quite clearly wasn't. I'll just use that as a workaround.

I would note that, as referenced by 2TallTyler above, it might make sense for the original music set, since it skips the "main menu song" by default, but for all the additional, download, music sets, it ends up skipping one the songs. I'm not really able to make heads or tales of the code you pasted, glx22, so this may be redundant, but having the option or setting of including song nr. 00 for all music sets except the original one seems like a good idea to me. Took me a while to notice I had skipped one song in the ten or so music sets I'd been listening to thus far.

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

No branches or pull requests

3 participants