Changes in uspace/srv/audio/hound/audio_data.h [c799138:33b8d024] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/audio_data.h
rc799138 r33b8d024 45 45 /** Reference counted audio buffer */ 46 46 typedef struct { 47 /** Audio data */48 const void *data;49 47 /** Size of the buffer pointer to by data */ 50 48 size_t size; … … 53 51 /** Reference counter */ 54 52 atomic_t refcount; 53 /** Audio data */ 54 const uint8_t data[]; 55 55 } audio_data_t; 56 56 … … 75 75 void audio_pipe_fini(audio_pipe_t *pipe); 76 76 77 int audio_pipe_push(audio_pipe_t *pipe, audio_data_t *data);77 errno_t audio_pipe_push(audio_pipe_t *pipe, audio_data_t *data); 78 78 audio_data_t *audio_pipe_pop(audio_pipe_t *pipe); 79 79 80 s size_t audio_pipe_mix_data(audio_pipe_t *pipe, void *buffer, size_t size,80 size_t audio_pipe_mix_data(audio_pipe_t *pipe, void *buffer, size_t size, 81 81 const pcm_format_t *f); 82 82 … … 113 113 * Reference counted buffer is created automatically. 114 114 */ 115 static inline int audio_pipe_push_data(audio_pipe_t *pipe,115 static inline errno_t audio_pipe_push_data(audio_pipe_t *pipe, 116 116 const void *data, size_t size, pcm_format_t f) 117 117 { 118 118 audio_data_t *adata = audio_data_create(data, size, f); 119 119 if (adata) { 120 const int ret = audio_pipe_push(pipe, adata);120 const errno_t ret = audio_pipe_push(pipe, adata); 121 121 audio_data_unref(adata); 122 122 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.