Changes in uspace/srv/audio/hound/hound_ctx.c [541eb67:df13836] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/hound_ctx.c
r541eb67 rdf13836 35 35 */ 36 36 37 #include <malloc.h> 37 38 #include <macros.h> 38 39 #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 size_t ret =342 const int ret = 343 343 audio_pipe_mix_data(&stream->fifo, data, size, &stream->format); 344 344 fibril_mutex_unlock(&stream->guard); 345 if (ret > 0) {345 if (ret == EOK) 346 346 fibril_condvar_signal(&stream->change); 347 return EOK; 348 } 349 return EEMPTY; 347 return ret; 350 348 } 351 349 … … 356 354 * @param size Size of the @p data buffer. 357 355 * @param format Destination data format. 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, 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, 361 360 size_t size, const pcm_format_t *f) 362 361 { 363 362 assert(stream); 364 363 fibril_mutex_lock(&stream->guard); 365 const size_t ret = audio_pipe_mix_data(&stream->fifo, data, size, f);364 const int ret = audio_pipe_mix_data(&stream->fifo, data, size, f); 366 365 fibril_condvar_signal(&stream->change); 367 366 fibril_mutex_unlock(&stream->guard); … … 458 457 list_foreach(sink->connections, source_link, connection_t, conn) { 459 458 /* This should not trigger data update on the source */ 460 con nection_add_source_data(459 const size_t copied = connection_add_source_data( 461 460 conn, buffer, bsize, sink->format); 461 if (copied != bsize) 462 log_error("Copied less than advertised data, " 463 "something is wrong"); 462 464 } 463 465 /* push to all streams */
Note:
See TracChangeset
for help on using the changeset viewer.