Author Topic: 80% of custom music wouldn't play  (Read 514 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 2485
    • View Profile
    • Lix
80% of custom music wouldn't play
« 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
« Last Edit: December 18, 2017, 12:25:55 pm by Simon »

Offline Simon

  • Administrator
  • Posts: 2485
    • View Profile
    • Lix
Re: 80% of custom music wouldn't play
« Reply #1 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

Offline ccexplore

  • Administrator
  • Posts: 4786
    • View Profile
Re: 80% of custom music wouldn't play
« Reply #2 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".

Offline Simon

  • Administrator
  • Posts: 2485
    • View Profile
    • Lix
Re: 80% of custom music wouldn't play
« Reply #3 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

Offline namida

  • Administrator
  • Posts: 8347
    • View Profile
    • NeoLemmix Website
Re: 80% of custom music wouldn't play
« Reply #4 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?
My released level packs:
Lemmings Plus Series | Doomsday Lemmings

Offline Simon

  • Administrator
  • Posts: 2485
    • View Profile
    • Lix
Re: 80% of custom music wouldn't play
« Reply #5 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).

--  Simon

Offline namida

  • Administrator
  • Posts: 8347
    • View Profile
    • NeoLemmix Website
Re: 80% of custom music wouldn't play
« Reply #6 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).

--  Simon

A better question: Could support not be added, now that the MP3 patent has expired?
My released level packs:
Lemmings Plus Series | Doomsday Lemmings

Offline Simon

  • Administrator
  • Posts: 2485
    • View Profile
    • Lix
Re: 80% of custom music wouldn't play
« Reply #7 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:
  • I haven't asked whether they'd appreciate MP3 support in the first place. They're kitchen-sink-flavored, thus the chance is reasonable that they want it.
  • I haven't checked what MP3 lib should ideally be called by Allegro.
  • I don't know how hard it is, either to add it to Lix or to Allegro.
  • I don't consider the support worthy enough of my time: I have several large issues on the menu for when I when I feel like attacking one. In a pinch, people could always convert to OGG and accept the quality drop from the recompression; the main benefit is that I wouldn't annoy the user.
-- Simon

Offline Simon

  • Administrator
  • Posts: 2485
    • View Profile
    • Lix
Re: 80% of custom music wouldn't play
« Reply #8 on: October 09, 2018, 04:46:52 am »
Existing Allegro 5 github issue: Implement MP3 support 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