Fix float->int(short) clipping issue when playing ogg content 11/177311/1
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 26 Apr 2018 12:47:55 +0000 (21:47 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 27 Apr 2018 04:46:09 +0000 (13:46 +0900)
related reference:
  http://www.mega-nerd.com/libsndfile/api.html#note2
  https://github.com/erikd/libsndfile/issues/194

[Version] 0.12.15
[Issue Type] Bug Fix

Change-Id: I60894d8286c53999c5d907c486a10ca7a88dd95a

packaging/libmm-sound.spec
server/plugin/wav/mm_sound_plugin_codec_wave.c

index 0ba131b..e583ac5 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.12.14
+Version:    0.12.15
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index e97f89a..563f3b1 100644 (file)
@@ -64,6 +64,8 @@ static int _sound_prepare(wave_info_t *h)
                return (sf_error(h->sf) == SF_ERR_SYSTEM) ? MM_ERROR_SOUND_INTERNAL : MM_ERROR_SOUND_UNSUPPORTED_MEDIA_TYPE;
        }
 
+       sf_command(h->sf, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE);
+
        h->spec.rate = h->si.samplerate;
        h->spec.channels = h->si.channels;
        h->spec.format = PA_SAMPLE_S16LE;