View Issue Details

IDProjectCategoryView StatusLast Update
0001113OpenMPT[All Projects] Generalpublic2018-05-28 18:03
ReportermanxAssigned To 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status newResolutionopen 
Product Version 
Target VersionOpenMPT 1.?? (long term goals)Fixed in Version 
Summary0001113: Avoid delay-loading of libraries that we ship
Description

OpenMPT currently delay-loads soundtouch, lame and mpg123.

This has the advantage of allowing to start mptrack.exe even without them being available.

However, in my opinion the disadvantages far outweigh the advantages:

  • We need to handle errors when soundtouch is not available, requiring code that would otherwise be completely unnecessary because it would be simply impossible to start OpenMPT without soundtouch. This incurs also GUI elements that need to notify the user and explain the problem. It reduces functionality without the user being necessarily aware of the fact that starting mptrack.exe without soundtouch in fact does not implement the complete advertised functionality.
  • Not knowing which MP3 decoder will be used complicates code and introduces inconsistencies when loading MP3s. mpg123 is by far the most flexible MP3 decoder library which allows for the most fine-grained control with regard to loading weird or corrupt MP3 files. Using external MP3 samples can thus change behaviour significantly depending on whether mpg13 is available or not (in which case we fall back to MediaFoundation).
TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Relationships

related to 0001097 resolvedmanx Remove dynamic loading support in libopenmpt, and in particular for libmpg123. 
related to 0001095 resolvedmanx Ship LAME MP3 encoder 

Activities

manx

manx

2018-04-11 07:13

administrator   ~0003498

We should also consider avoiding delay-loading MediaFoundation.

MediaFoundation is only enabled in modern OpenMPT builds which require Windows 7 which has MediaFoundation always available. All supported Wine versions at least implement a stub that properly exports all symbols and fails initialization, so we can detect that and continue. For Windows Server, MediaFoundation can be installed via a download from Microsoft. For the remote case of someone desiring to not have MediaFoundation installed for whatever reasons, they can always use the Win32old or Win64old builds.

Not delay-loading MediaFoundation has the advantage of completely avoiding the dependency on delayimp.lib.

manx

manx

2018-04-11 08:41

administrator   ~0003499

Importance of having mpg123 non-optional increased in particular for OpenMPT with r10069 .

manx

manx

2018-05-02 06:08

administrator   ~0003514

Component blocking support for mpg123 and soundtouch is removed in r10194.

manx

manx

2018-05-28 18:02

administrator   ~0003537

Since r10317, this also affects Lame.

Issue History

Date Modified Username Field Change
2018-04-11 06:59 manx New Issue
2018-04-11 07:13 manx Note Added: 0003498
2018-04-11 08:41 manx Note Added: 0003499
2018-04-15 16:49 manx Relationship added related to 0001097
2018-05-02 06:02 manx Target Version => OpenMPT 1.?? (long term goals)
2018-05-02 06:08 manx Note Added: 0003514
2018-05-28 18:02 manx Note Added: 0003537
2018-05-28 18:02 manx Description Updated View Revisions
2018-05-28 18:03 manx Relationship added related to 0001095