]> git.sesse.net Git - vlc/blobdiff - modules/codec/fluidsynth.c
Removed unused or redondant fields from subpicture.
[vlc] / modules / codec / fluidsynth.c
index 207d5c62e2721f1396e5592fed2f6c3c8f9cd51e..600353fa3ca9604f34bade2c72691a79ce6fecc3 100644 (file)
@@ -23,7 +23,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
 #include <vlc_codec.h>
@@ -38,7 +38,7 @@ static int  Open  (vlc_object_t *);
 static void Close (vlc_object_t *);
 
 vlc_module_begin();
-    set_description (_("FluidSynth MIDI synthetizer"));
+    set_description (N_("FluidSynth MIDI synthetizer"));
     set_capability ("decoder", 100);
     set_category (CAT_INPUT);
     set_subcategory (SUBCAT_INPUT_ACODEC);
@@ -81,8 +81,8 @@ 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 = AOUT_FMT_S16_NE;
-    p_dec->fmt_out.audio.i_bitspersample = 16;
+    p_dec->fmt_out.i_codec = VLC_FOURCC('f', 'l', '3', '2');
+    p_dec->fmt_out.audio.i_bitspersample = 32;
 
     p_dec->pf_decode_audio = DecodeBlock;
     p_sys = p_dec->p_sys = malloc (sizeof (*p_sys));
@@ -186,8 +186,8 @@ static aout_buffer_t *DecodeBlock (decoder_t *p_dec, block_t **pp_block)
 
     p_out->start_date = aout_DateGet (&p_sys->end_date );
     p_out->end_date   = aout_DateIncrement (&p_sys->end_date, samples);
-    fluid_synth_write_s16 (p_sys->synth, samples,
-                           (int16_t *)p_out->p_buffer, 0, 2,
-                           (int16_t *)p_out->p_buffer, 1, 2);
+    fluid_synth_write_float (p_sys->synth, samples,
+                             p_out->p_buffer, 0, 2,
+                             p_out->p_buffer, 1, 2);
     return p_out;
 }