Adding of Encoded by "Tracker name" (based on file format)<br>Even though EncodedBy is no longer shown in the GUI - might be useful.<br>libmodplug currently does not have these strings in it, and ModType only returns a bit mask.<br>
<br>---<br> modules/demux/mod.c |   40 +++++++++++++++++++++++++++++++++++++++-<br> 1 files changed, 39 insertions(+), 1 deletions(-)<br><br>diff --git a/modules/demux/mod.c b/modules/demux/mod.c<br>index b240444..cf66902 100644<br>
--- a/modules/demux/mod.c<br>+++ b/modules/demux/mod.c<br>@@ -132,6 +132,37 @@ static const char *ppsz_mod_ext[] =<br>     "psm", "abc", NULL<br> };<br> <br>+static const char *ppsz_mod_desc[] =<br>+{<br>
+    "ProTracker",<br>+    "Scream Tracker 3",<br>+    "Fast Tracker 2",<br>+    "OctaMed",<br>+    "MTM",<br>+    "Impulse Tracker",<br>+    "669 Composer / UNIS 669",<br>
+    "ULT",<br>+    "Scream Tracker",<br>+    "Farandole",<br>+    "WAV",<br>+    "DSMI Advanced Module Format",<br>+    "AMS Module",<br>+    "DSIK Internal Format",<br>
+    "DigiTracker",<br>+    "Oktalyzer",<br>+    "MIDI",<br>+    "Delusion Digital Music Fileformat (X-Tracker)",<br>+    "PolyTracker",<br>+    "DigiBooster Pro",<br>
+    "MT2",<br>+    "ASYLUM Music Format V1.0",<br>+    "PSM",<br>+    "J2B",<br>+    "ABC draft 2.0",<br>+    "Gravis Ultrasound Patch",<br>+    "Unknown",<br>
+    NULL<br>+};<br> <br> /* We load the complete file in memory, put a higher bound<br>  * of 500 Mo (which is really big anyway) */<br>@@ -371,7 +402,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )<br>
             i_num_instruments = ModPlug_NumInstruments( p_sys->f );<br>         unsigned i_num_patterns = ModPlug_NumPatterns( p_sys->f ),<br>             i_num_channels = ModPlug_NumChannels( p_sys->f );<br>-//      unsigned modType = ModPlug_GetModuleType( p_sys->f );<br>
+        unsigned i_mod_type = ModPlug_GetModuleType( p_sys->f );<br>         char psz_temp[2048]; /* 32 * 240 max, but only need start  */<br>         char *psz_module_info, *psz_instrument_info;<br>         unsigned i_temp_index = 0;<br>
@@ -384,6 +415,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )<br>     if (psz_name && *psz_name )<br>         vlc_meta_SetDescription( p_meta, psz_name );<br> <br>+        /* Encoded By / Mod Format */<br>
+        for( int i = 0, j = i_mod_type; ppsz_mod_desc[i] != NULL && j; i++, j>>=1 )<br>+        {<br>+            if ( j == 1 )<br>+                 vlc_meta_SetEncodedBy( p_meta, ppsz_mod_desc[i] );<br>+        }<br>
+<br>         /* Instruments only in newer MODs - so don't show if 0 */<br>     if ( asprintf( &psz_instrument_info, ", %i Instruments", i_num_instruments ) )<br>     {<br>-- <br>1.6.0.6<br><br>