Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2672dca6 authored by Varun Balaraj's avatar Varun Balaraj Committed by Garmond Leung
Browse files

hal_play_test: Fix for glitch while playback of DTS clip

 Increased the size of input data sent to dts module for
 decoding.

Change-Id: Ife00750496597fefa3b2cce01722363fa20de64a
parent 0ab6b185
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1342,8 +1342,7 @@ void *qap_wrapper_start_stream (void* stream_data)
            }
            ALOGV("%s %d feeding Input of size %d  and bytes_cosumed is %d",
                      __FUNCTION__, __LINE__,bytes_read, bytes_consumed);
            if ((format == QAP_AUDIO_FORMAT_DTS) ||
                 (format == QAP_AUDIO_FORMAT_DTS_HD)) {
            if (stream_info->filetype == FILE_DTS) {
                  if (bytes_consumed < 0) {
                      while (!is_buffer_available) {
                          usleep(1000);
@@ -1428,6 +1427,9 @@ qap_module_handle_t qap_wrapper_stream_open(void* stream_data)
    input_config->channels = stream_info->channels;
    input_config->bit_width = stream_info->config.offload_info.bit_width;

    if (stream_info->filetype == FILE_DTS)
        stream_info->bytes_to_read = 10*1024;
    else
        stream_info->bytes_to_read = 1024;
    input_streams_count++;
    if (input_streams_count == 2) {