Changeset 132ab5d1 in mainline for uspace/srv/audio/hound/hound_ctx.c
- Timestamp:
- 2018-01-30T03:20:45Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5a6cc679
- Parents:
- 8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
uspace/srv/audio/hound/hound_ctx.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/hound_ctx.c
r8bfb163 r132ab5d1 35 35 */ 36 36 37 #include <malloc.h>38 37 #include <macros.h> 39 38 #include <errno.h> 39 #include <stdlib.h> 40 40 #include <str_error.h> 41 41 … … 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.
