Lemmings Forums

Lix => Lix Main => Topic started by: Simon on December 18, 2017, 06:48:31 AM

Title: 80% of custom music wouldn't play
Post by: Simon on December 18, 2017, 06:48:31 AM
Solved: The unplayable music was .mp3, which Lix doesn't support



From IRC:

Flopsy: SimonN: question about music compatibility in Lix, I'm guessing there are some file types which are not compatible like .ogg?
Flopsy: Just recorded a session and about 80% of my music wasn't playing :(


Ogg should play perfecly.

What is the exact issue: In some levels, Lix played no track at all? Or Lix played a track in every level, but the track selection was a few tracks over and over?

Check data/log.txt near the end for complaints about unplayable music files: Ctrl+F for "unplayable music" without quotes.

If data/log.txt lacks any entries about unplayable music, you might have had bad luck with the random track selection. Lix might play the same track in every level, omitting all others. Maybe the purely random track selection is bad, and it should be a random permutation that doesn't repeat unless all tracks have played once.

-- Simon
Title: Re: 80% of custom music wouldn't play
Post by: Simon on December 18, 2017, 12:24:36 PM
Flopsy: I'm getting mp3 file errors, not .ogg
SimonN: mp3 is not supported
Flopsy: ah ok
Flopsy: guess it's a good job I converted some
Flopsy: SimonN: what about .it?
SimonN: wav, ogg, it, xm, s3m, mod should all work


-- Simon
Title: Re: 80% of custom music wouldn't play
Post by: ccexplore on December 19, 2017, 01:49:19 AM
Maybe there needs to be a more user friendly way to surface the information about music files that are not in compatible formats, beyond "checking data/log.txt".
Title: Re: 80% of custom music wouldn't play
Post by: Simon on December 25, 2017, 05:49:33 AM
more user friendly way to surface the information about music files that are not in compatible formats, beyond "checking data/log.txt".

0.9.5 doesn't look at every file, but filters the tree for compatible formats. It never considers to play mp3 in the first place.

I could, at program start, find all files in the music tree, filter for common unsupported formats, and, if any found, warn in the UI about unplayable formats.

-- Simon
Title: Re: 80% of custom music wouldn't play
Post by: namida on December 25, 2017, 08:59:16 AM
Could you simply use (insert D equivalent of FindFirst / etc here) to look for any file in the music folder with an unrecognised extension?
Title: Re: 80% of custom music wouldn't play
Post by: Simon on October 09, 2018, 02:38:46 AM
I apologize for my lousy public relations last year. Shocking to see how I left namida's post completely unanswered.

Yes, the D standard library has functions to list directory trees, and they're fast because no files are opened. I can check for all unrecognized extensions and display a warning in the main menu.

I've opened github issue #362: Warn about MP3 in main menu (unsupported but common format) (https://github.com/SimonN/LixD/issues/362).

--  Simon
Title: Re: 80% of custom music wouldn't play
Post by: namida on October 09, 2018, 02:47:20 AM
I apologize for my lousy public relations last year. Shocking to see how I left namida's post completely unanswered.

Yes, the D standard library has functions to list directory trees, and they're fast because no files are opened. I can check for all unrecognized extensions and display a warning in the main menu.

I've opened github issue #362: Warn about MP3 in main menu (unsupported but common format) (https://github.com/SimonN/LixD/issues/362).

--  Simon

A better question: Could support not be added, now that the MP3 patent has expired?
Title: Re: 80% of custom music wouldn't play
Post by: Simon on October 09, 2018, 04:20:05 AM
MP3 requires an extra library because Allegro doesn't support it. I could call a library directly and write extra support for that.

MP3 support should ideally go directly into Allegro. They don't have it and haven't planned for it (searched their forum). I've written music code for Allegro before. Allegro builds support for many different specialized platform-independent libraries according to which libs are installed.

Possible problems:
-- Simon
Title: Re: 80% of custom music wouldn't play
Post by: Simon on October 09, 2018, 04:46:52 AM
Existing Allegro 5 github issue: Implement MP3 support (https://github.com/liballeg/allegro5/issues/900) by fatcerberus, he's more deeply involved with A5 than I am. But there's no guarantee that A5 will get MP3 support anytime soon.

-- Simon