]> git.sesse.net Git - vlc/blobdiff - modules/codec/fluidsynth.c
codec_fake: use var_CreateGet* when applicable.
[vlc] / modules / codec / fluidsynth.c
index 66c62d0cad9ee9784a5a1e6cc7e62471d743e701..74c44fa3ee7c54d5f42ae110ff546d2139636261 100644 (file)
@@ -66,7 +66,7 @@ static int Open (vlc_object_t *p_this)
     decoder_t *p_dec = (decoder_t *)p_this;
     decoder_sys_t *p_sys;
 
-    if (p_dec->fmt_in.i_codec != VLC_FOURCC ('M', 'I', 'D', 'I'))
+    if (p_dec->fmt_in.i_codec != VLC_CODEC_MIDI)
         return VLC_EGENERIC;
 
     char *font_path = var_CreateGetNonEmptyString (p_this, "soundfont");
@@ -82,7 +82,7 @@ static int Open (vlc_object_t *p_this)
     p_dec->fmt_out.audio.i_original_channels =
     p_dec->fmt_out.audio.i_physical_channels =
         AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('f', 'l', '3', '2');
+    p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
     p_dec->fmt_out.audio.i_bitspersample = 32;
 
     p_dec->pf_decode_audio = DecodeBlock;
@@ -171,8 +171,6 @@ static aout_buffer_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block)
             fluid_synth_pitch_bend (p_sys->synth, channel, (p1 << 7) | p2);
             break;
     }
-    p_block->p_buffer += p_block->i_buffer;
-    p_block->i_buffer = 0;
 
     unsigned samples =
         (p_block->i_pts - aout_DateGet (&p_sys->end_date)) * 441 / 10000;