fmt: fix and enable f32 -> s16 conversion

This commit is contained in:
Wim Taymans 2018-10-30 08:37:07 +00:00
parent 4432db4fa7
commit ef7a111611
2 changed files with 39 additions and 36 deletions

View file

@ -29,6 +29,7 @@
#define S16_MIN -32767
#define S16_MAX 32767
#define S16_MAX_F 32767.0f
#define S16_SCALE 32767
#define S24_MIN -8388607
@ -716,7 +717,7 @@ static const struct conv_info {
{ SPA_AUDIO_FORMAT_F32, SPA_AUDIO_FORMAT_S16, 0, conv_f32_to_s16 },
{ SPA_AUDIO_FORMAT_F32, SPA_AUDIO_FORMAT_S16P, 0, conv_f32_to_s16d },
#if defined (__SSE2__)
// { SPA_AUDIO_FORMAT_F32P, SPA_AUDIO_FORMAT_S16, FEATURE_SSE, conv_f32d_to_s16_sse },
{ SPA_AUDIO_FORMAT_F32P, SPA_AUDIO_FORMAT_S16, FEATURE_SSE, conv_f32d_to_s16_sse },
#endif
{ SPA_AUDIO_FORMAT_F32P, SPA_AUDIO_FORMAT_S16, 0, conv_f32d_to_s16 },