Changeset 541eb67 in mainline for uspace/srv/audio/hound/hound_ctx.c
- Timestamp:
- 2017-12-20T16:08:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d4a829e
- Parents:
- d9f0894
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/hound_ctx.c
rd9f0894 r541eb67 340 340 341 341 pcm_format_silence(data, size, &stream->format); 342 const int ret =342 const size_t ret = 343 343 audio_pipe_mix_data(&stream->fifo, data, size, &stream->format); 344 344 fibril_mutex_unlock(&stream->guard); 345 if (ret == EOK)345 if (ret > 0) { 346 346 fibril_condvar_signal(&stream->change); 347 return ret; 347 return EOK; 348 } 349 return EEMPTY; 348 350 } 349 351 … … 354 356 * @param size Size of the @p data buffer. 355 357 * @param format Destination data format. 356 * @return Size of the destination buffer touch with stream's data, 357 * error code on failure. 358 */ 359 ssize_t hound_ctx_stream_add_self(hound_ctx_stream_t *stream, void *data, 358 * @return Size of the destination buffer touch with stream's data. 359 */ 360 size_t hound_ctx_stream_add_self(hound_ctx_stream_t *stream, void *data, 360 361 size_t size, const pcm_format_t *f) 361 362 { 362 363 assert(stream); 363 364 fibril_mutex_lock(&stream->guard); 364 const int ret = audio_pipe_mix_data(&stream->fifo, data, size, f);365 const size_t ret = audio_pipe_mix_data(&stream->fifo, data, size, f); 365 366 fibril_condvar_signal(&stream->change); 366 367 fibril_mutex_unlock(&stream->guard); … … 457 458 list_foreach(sink->connections, source_link, connection_t, conn) { 458 459 /* This should not trigger data update on the source */ 459 con st size_t copied = connection_add_source_data(460 connection_add_source_data( 460 461 conn, buffer, bsize, sink->format); 461 if (copied != bsize)462 log_error("Copied less than advertised data, "463 "something is wrong");464 462 } 465 463 /* push to all streams */
Note:
See TracChangeset
for help on using the changeset viewer.