Changeset bee5349 in mainline for uspace/srv/audio/hound/connection.c


Ignore:
Timestamp:
2013-04-11T21:32:28Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4eff63c
Parents:
d1f144a
Message:

hound: add data available callback

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/audio/hound/connection.c

    rd1f144a rbee5349  
    123123        return ret > 0 ? EOK : ret;
    124124}
     125/**
     126 * Add new data to the connection buffer.
     127 * @param connection Target conneciton.
     128 * @aparam adata Reference counted audio data buffer.
     129 * @return Error code.
     130 */
     131int connection_push_data(connection_t *connection,
     132    audio_data_t *adata)
     133{
     134        assert(connection);
     135        assert(adata);
     136        const int ret = audio_pipe_push(&connection->fifo, adata);
     137        if (ret == EOK && connection->sink->data_available)
     138                connection->sink->data_available(connection->sink);
     139        return ret;
     140}
    125141
    126142/**
Note: See TracChangeset for help on using the changeset viewer.