[vlc-devel] commit: Fluidsynth: use native FL32 format, avoid converting to 16 bits and back ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Aug 17 09:46:53 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Aug 17 10:49:05 2008 +0300| [1cbb7548d4020817e588359ce8cc5eb99abddc5c] | committer: Rémi Denis-Courmont
Fluidsynth: use native FL32 format, avoid converting to 16 bits and back
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1cbb7548d4020817e588359ce8cc5eb99abddc5c
---
modules/codec/fluidsynth.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/codec/fluidsynth.c b/modules/codec/fluidsynth.c
index 07648b7..600353f 100644
--- a/modules/codec/fluidsynth.c
+++ b/modules/codec/fluidsynth.c
@@ -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;
}
More information about the vlc-devel
mailing list