diff options
author | Wohlstand <admin@wohlnet.ru> | 2020-08-10 11:07:31 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2020-08-10 11:07:31 +0300 |
commit | e94ddef0fbf9b62c76d4fa18bf1b2cb01b3aa44e (patch) | |
tree | 0131c3a66eccbb918e7f5d0055f8d9a124dfb75f /utils/vlc_codec | |
parent | 5b8376c1e8ffc9a52214a4e42bea088a5a0c615a (diff) | |
download | libADLMIDI-e94ddef0fbf9b62c76d4fa18bf1b2cb01b3aa44e.tar.gz libADLMIDI-e94ddef0fbf9b62c76d4fa18bf1b2cb01b3aa44e.tar.bz2 libADLMIDI-e94ddef0fbf9b62c76d4fa18bf1b2cb01b3aa44e.zip |
VLC Plugin: Add persistent 2x gain for output
Diffstat (limited to 'utils/vlc_codec')
-rw-r--r-- | utils/vlc_codec/libadlmidi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/vlc_codec/libadlmidi.c b/utils/vlc_codec/libadlmidi.c index 3d5e5fe..8de3d34 100644 --- a/utils/vlc_codec/libadlmidi.c +++ b/utils/vlc_codec/libadlmidi.c @@ -274,12 +274,14 @@ static void Flush (decoder_t *p_dec) #if (LIBVLC_VERSION_MAJOR >= 3) static int DecodeBlock (decoder_t *p_dec, block_t *p_block) { + size_t it; decoder_sys_t *p_sys = p_dec->p_sys; block_t *p_out = NULL; #else static block_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block) { + size_t it; block_t *p_block; decoder_sys_t *p_sys = p_dec->p_sys; block_t *p_out = NULL; @@ -398,6 +400,10 @@ static block_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block) (ADL_UInt8*)p_out->p_buffer, (ADL_UInt8*)(p_out->p_buffer + g_output_format.containerSize), &g_output_format); + + for (it = 0; it < samples; ++it) + ((float*)p_out->p_buffer)[it] *= 2.0f; + samples /= 2; p_out->i_length = date_Increment (&p_sys->end_date, samples) - p_out->i_pts; |