X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Ffluidsynth.c;h=74c44fa3ee7c54d5f42ae110ff546d2139636261;hb=5c3baadb587765cf71c8881d56053bd49579b1fd;hp=66c62d0cad9ee9784a5a1e6cc7e62471d743e701;hpb=d7c8cf59f3f31faaa3cdb29ca95ed488e84cedb7;p=vlc diff --git a/modules/codec/fluidsynth.c b/modules/codec/fluidsynth.c index 66c62d0cad..74c44fa3ee 100644 --- a/modules/codec/fluidsynth.c +++ b/modules/codec/fluidsynth.c @@ -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;