Changeset c799138 in mainline for uspace/srv/audio/hound/audio_data.h


Ignore:
Timestamp:
2013-04-11T01:34:41Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
250828a
Parents:
f0a647c
Message:

hound: doxygen and cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/audio/hound/audio_data.h

    rf0a647c rc799138  
    4343#include <pcm/format.h>
    4444
     45/** Reference counted audio buffer */
    4546typedef struct {
     47        /** Audio data */
    4648        const void *data;
     49        /** Size of the buffer pointer to by data */
    4750        size_t size;
     51        /** Format of the audio data */
    4852        pcm_format_t format;
     53        /** Reference counter */
    4954        atomic_t refcount;
    5055} audio_data_t;
    5156
     57/** Audio data pipe structure */
    5258typedef struct {
     59        /** List of audio data buffers */
    5360        list_t list;
     61        /** Total size of all buffers */
    5462        size_t bytes;
     63        /** Total frames stored in all buffers */
    5564        size_t frames;
     65        /** List access synchronization */
    5666        fibril_mutex_t guard;
    5767} audio_pipe_t;
     
    7181    const pcm_format_t *f);
    7282
     83/**
     84 * Total bytes getter.
     85 * @param pipe The audio pipe.
     86 * @return Total size of buffer stored in the pipe.
     87 */
    7388static inline size_t audio_pipe_bytes(audio_pipe_t *pipe)
    7489{
     
    7792}
    7893
     94/**
     95 * Total bytes getter.
     96 * @param pipe The audio pipe.
     97 * @return Total number of frames stored in the pipe.
     98 */
    7999static inline size_t audio_pipe_frames(audio_pipe_t *pipe)
    80100{
     
    83103}
    84104
     105/**
     106 * Push data form buffer directly to pipe.
     107 * @param pipe The target pipe.
     108 * @param data audio buffer.
     109 * @param size size of the @p data buffer
     110 * @param f format of the audio data.
     111 * @return Error code.
     112 *
     113 * Reference counted buffer is created automatically.
     114 */
    85115static inline int audio_pipe_push_data(audio_pipe_t *pipe,
    86116    const void *data, size_t size, pcm_format_t f)
Note: See TracChangeset for help on using the changeset viewer.