From 25d5938d4f69911eb2628b1bc4c816e4194bae6e Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Fri, 22 Jun 2018 03:36:15 +0300 Subject: VLC Plugin: Add missing Note-AfterTouch event support --- utils/vlc_codec/libadlmidi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'utils/vlc_codec/libadlmidi.c') diff --git a/utils/vlc_codec/libadlmidi.c b/utils/vlc_codec/libadlmidi.c index aedd718..efc2bb8 100644 --- a/utils/vlc_codec/libadlmidi.c +++ b/utils/vlc_codec/libadlmidi.c @@ -276,7 +276,9 @@ static block_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block) case 0x90: adl_rt_noteOn(p_sys->synth, channel, p1, p2); break; - /*case 0xA0: note aftertouch not implemented */ + case 0xA0: + adl_rt_noteAfterTouch(p_sys->synth, channel, p1, p2); + break; case 0xB0: adl_rt_controllerChange(p_sys->synth, channel, p1, p2); break; -- cgit v1.2.3 From 1f4b59dd86a5a66f3af9693f988482c0ff57724e Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Fri, 22 Jun 2018 03:48:08 +0300 Subject: VLC Codec: Make passing of SysEx events --- utils/vlc_codec/libadlmidi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'utils/vlc_codec/libadlmidi.c') diff --git a/utils/vlc_codec/libadlmidi.c b/utils/vlc_codec/libadlmidi.c index efc2bb8..24a519e 100644 --- a/utils/vlc_codec/libadlmidi.c +++ b/utils/vlc_codec/libadlmidi.c @@ -257,8 +257,9 @@ static block_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block) msg_Warn (p_dec, "fragmented SysEx not implemented"); goto drop; } - //fluid_synth_sysex (p_sys->synth, (char *)p_block->p_buffer + 1, - // p_block->i_buffer - 2, NULL, NULL, NULL, 0); + adl_rt_systemExclusive(p_sys->synth, + (const ADL_UInt8 *)p_block->p_buffer + 1, + p_block->i_buffer - 2); break; case 0xF: adl_rt_resetState(p_sys->synth); -- cgit v1.2.3 From e6aef92c235bd9ab37e6ff7816f11d7a668ed92e Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sat, 23 Jun 2018 23:47:05 +0300 Subject: VLC Plugin: Fixed SysEx passing --- utils/vlc_codec/libadlmidi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils/vlc_codec/libadlmidi.c') diff --git a/utils/vlc_codec/libadlmidi.c b/utils/vlc_codec/libadlmidi.c index 24a519e..396d059 100644 --- a/utils/vlc_codec/libadlmidi.c +++ b/utils/vlc_codec/libadlmidi.c @@ -258,8 +258,8 @@ static block_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block) goto drop; } adl_rt_systemExclusive(p_sys->synth, - (const ADL_UInt8 *)p_block->p_buffer + 1, - p_block->i_buffer - 2); + (const ADL_UInt8 *)p_block->p_buffer, + p_block->i_buffer); break; case 0xF: adl_rt_resetState(p_sys->synth); -- cgit v1.2.3 From 9b5990e2fc92f3461a7242dded1c42bb957a2bcf Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sun, 24 Jun 2018 00:25:49 +0300 Subject: Small fix of VLC codec --- utils/vlc_codec/libadlmidi.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'utils/vlc_codec/libadlmidi.c') diff --git a/utils/vlc_codec/libadlmidi.c b/utils/vlc_codec/libadlmidi.c index 396d059..64909f3 100644 --- a/utils/vlc_codec/libadlmidi.c +++ b/utils/vlc_codec/libadlmidi.c @@ -77,12 +77,14 @@ vlc_module_begin () set_callbacks (Open, Close) add_loadfile ("adlmidi-custombank", "", SOUNDFONT_TEXT, SOUNDFONT_LONGTEXT, false) - //add_bool ("synth-chorus", true, CHORUS_TEXT, CHORUS_TEXT, false) - //add_float ("synth-gain", .5, GAIN_TEXT, GAIN_LONGTEXT, false) - // change_float_range (0., 10.) - //add_integer ("synth-polyphony", 256, POLYPHONY_TEXT, POLYPHONY_LONGTEXT, false) - // change_integer_range (1, 65535) - //add_bool ("synth-reverb", true, REVERB_TEXT, REVERB_TEXT, true) + /* + add_bool ("synth-chorus", true, CHORUS_TEXT, CHORUS_TEXT, false) + add_float ("synth-gain", .5, GAIN_TEXT, GAIN_LONGTEXT, false) + change_float_range (0., 10.) + add_integer ("synth-polyphony", 256, POLYPHONY_TEXT, POLYPHONY_LONGTEXT, false) + change_integer_range (1, 65535) + add_bool ("synth-reverb", true, REVERB_TEXT, REVERB_TEXT, true) + */ add_integer ("adlmidi-sample-rate", 44100, SAMPLE_RATE_TEXT, SAMPLE_RATE_TEXT, true) change_integer_range (22050, 96000) add_integer ("adlmidi-emulated-chips", 6, EMULATED_CHIPS_TEXT, EMULATED_CHIPS_TEXT, true) @@ -107,7 +109,6 @@ static const struct ADLMIDI_AudioFormat g_output_format = 2 * sizeof(float) }; -//static int DecodeBlock (decoder_t *p_dec, block_t *p_block); //For different version #if (LIBVLC_VERSION_MAJOR >= 3) static int DecodeBlock (decoder_t *p_dec, block_t *p_block); #else @@ -162,7 +163,7 @@ static int Open (vlc_object_t *p_this) #else p_dec->pf_decode_audio = DecodeBlock; #endif - return VLC_SUCCESS;//VLCDEC_SUCCESS + return VLC_SUCCESS; } @@ -177,6 +178,7 @@ static void Close (vlc_object_t *p_this) static void Flush (decoder_t *p_dec) { decoder_sys_t *p_sys = p_dec->p_sys; + #if (LIBVLC_VERSION_MAJOR >= 3) date_Set (&p_sys->end_date, VLC_TS_INVALID); #else @@ -326,3 +328,4 @@ drop: return p_out; #endif } + -- cgit v1.2.3