aboutsummaryrefslogtreecommitdiff
path: root/utils/vlc_codec/libadlmidi.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/vlc_codec/libadlmidi.c')
-rw-r--r--utils/vlc_codec/libadlmidi.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/utils/vlc_codec/libadlmidi.c b/utils/vlc_codec/libadlmidi.c
index d3353eb..77341b0 100644
--- a/utils/vlc_codec/libadlmidi.c
+++ b/utils/vlc_codec/libadlmidi.c
@@ -36,6 +36,10 @@
#include <adlmidi.h>
+#define ENABLE_CODEC_TEXT N_("Enable this synthesizer")
+#define ENABLE_CODEC_LONGTEXT N_( \
+ "Enable using of this synthesizer, otherwise, other MIDI synthesizers will be used")
+
#define FMBANK_TEXT N_("Custom bank file")
#define FMBANK_LONGTEXT N_( \
"Custom bank file (in WOPL format) to use for software synthesis." )
@@ -122,6 +126,9 @@ vlc_module_begin ()
set_subcategory (SUBCAT_INPUT_ACODEC)
set_callbacks (Open, Close)
+ add_bool( CONFIG_PREFIX "enable", true, ENABLE_CODEC_TEXT,
+ ENABLE_CODEC_LONGTEXT, false )
+
embedded_bank_count = adl_getBanksCount();
for (embedded_bank_i = 0; embedded_bank_i < embedded_bank_count; embedded_bank_i++)
embedded_bank_values[embedded_bank_i] = embedded_bank_i;
@@ -138,7 +145,7 @@ vlc_module_begin ()
add_integer (CONFIG_PREFIX "volume-model", 0, VOLUME_MODEL_TEXT, VOLUME_MODEL_LONGTEXT, false )
change_integer_list( volume_models_values, volume_models_descriptions )
- add_integer (CONFIG_PREFIX "emulator-type", 0, EMULATOR_TYPE_TEXT, EMULATOR_TYPE_LINGTEXT, true)
+ add_integer (CONFIG_PREFIX "emulator-type", 0, EMULATOR_TYPE_TEXT, EMULATOR_TYPE_LINGTEXT, false)
change_integer_list( emulator_type_values, emulator_type_descriptions )
add_integer (CONFIG_PREFIX "emulated-chips", 6, EMULATED_CHIPS_TEXT, EMULATED_CHIPS_LONGTEXT, true)
@@ -148,10 +155,10 @@ vlc_module_begin ()
change_integer_range (22050, 96000)
add_bool( CONFIG_PREFIX "full-range-brightness", false, FULL_RANGE_CC74_TEXT,
- FULL_RANGE_CC74_LONGTEXT, false )
+ FULL_RANGE_CC74_LONGTEXT, true )
- add_bool( CONFIG_PREFIX "full-panning", false, FULL_PANNING_TEXT,
- FULL_PANNING_LONGTEXT, false )
+ add_bool( CONFIG_PREFIX "full-panning", true, FULL_PANNING_TEXT,
+ FULL_PANNING_LONGTEXT, true )
vlc_module_end ()
@@ -185,6 +192,9 @@ static int Open (vlc_object_t *p_this)
if (p_dec->fmt_in.i_codec != VLC_CODEC_MIDI)
return VLC_EGENERIC;
+ if (!var_InheritBool(p_this, CONFIG_PREFIX "enable"))
+ return VLC_EGENERIC;
+
decoder_sys_t *p_sys = malloc (sizeof (*p_sys));
if (unlikely(p_sys == NULL))
return VLC_ENOMEM;