qahw: Add condition to check bytes written to hal
- playback is not stopped even bytes written is < 0. - Add condition to check bytes written and exit playback if bytes written is < 0. Change-Id: Id80c05f324b36e47a733ac441934bde115502ce2
This commit is contained in:
parent
3b58780aa7
commit
adc3756641
|
@ -739,6 +739,10 @@ void *start_stream_playback (void* stream_data)
|
|||
fprintf(log_file, "stream %d: writing to hal %zd bytes, offset %d, write length %zd\n",
|
||||
params->stream_index, bytes_remaining, offset, write_length);
|
||||
bytes_written = write_to_hal(params->out_handle, data_ptr+offset, bytes_remaining, params);
|
||||
if (bytes_written == -1) {
|
||||
fprintf(stderr, "proxy_write failed in usb hal");
|
||||
break;
|
||||
}
|
||||
bytes_remaining -= bytes_written;
|
||||
|
||||
latency = qahw_out_get_latency(params->out_handle);
|
||||
|
|
Loading…
Reference in New Issue