Loading qahw_api/test/qahw_playback_test.c +8 −2 Original line number Diff line number Diff line Loading @@ -374,7 +374,7 @@ void *proxy_read (void* data) qahw_in_buffer_t in_buf; char *buffer; int rc = 0; int bytes_to_read, bytes_written = 0; int bytes_to_read, bytes_written = 0, bytes_wrote = 0; FILE *fp = NULL; qahw_stream_handle_t* in_handle = nullptr; Loading Loading @@ -416,7 +416,13 @@ void *proxy_read (void* data) while (!(params->acp.thread_exit)) { rc = qahw_in_read(in_handle, &in_buf); if (rc > 0) { bytes_written += fwrite((char *)(in_buf.buffer), sizeof(char), (int)in_buf.bytes, fp); bytes_wrote = fwrite((char *)(in_buf.buffer), sizeof(char), (int)in_buf.bytes, fp); bytes_written += bytes_wrote; if(bytes_wrote < in_buf.bytes) { stop_playback = true; fprintf(log_file, "Error in fwrite due to no memory(%d)=%s\n",ferror(fp), strerror(ferror(fp))); break; } } } params->hdr.data_sz = bytes_written; Loading Loading
qahw_api/test/qahw_playback_test.c +8 −2 Original line number Diff line number Diff line Loading @@ -374,7 +374,7 @@ void *proxy_read (void* data) qahw_in_buffer_t in_buf; char *buffer; int rc = 0; int bytes_to_read, bytes_written = 0; int bytes_to_read, bytes_written = 0, bytes_wrote = 0; FILE *fp = NULL; qahw_stream_handle_t* in_handle = nullptr; Loading Loading @@ -416,7 +416,13 @@ void *proxy_read (void* data) while (!(params->acp.thread_exit)) { rc = qahw_in_read(in_handle, &in_buf); if (rc > 0) { bytes_written += fwrite((char *)(in_buf.buffer), sizeof(char), (int)in_buf.bytes, fp); bytes_wrote = fwrite((char *)(in_buf.buffer), sizeof(char), (int)in_buf.bytes, fp); bytes_written += bytes_wrote; if(bytes_wrote < in_buf.bytes) { stop_playback = true; fprintf(log_file, "Error in fwrite due to no memory(%d)=%s\n",ferror(fp), strerror(ferror(fp))); break; } } } params->hdr.data_sz = bytes_written; Loading