Changeset 2373ba7 in mainline
- Timestamp:
- 2013-04-05T17:26:01Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 353f8cc
- Parents:
- 7e7def5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/audio_data.c
r7e7def5 r2373ba7 36 36 #include <macros.h> 37 37 #include <malloc.h> 38 38 39 #include "audio_data.h" 40 #include "log.h" 39 41 40 42 audio_data_t *audio_data_create(const void *data, size_t size, … … 43 45 audio_data_t *adata = malloc(sizeof(audio_data_t)); 44 46 if (adata) { 47 unsigned overflow = size % pcm_format_frame_size(&format); 48 if (overflow) 49 log_warning("Data not a multiple of frame size, " 50 "clipping."); 51 45 52 adata->data = data; 46 adata->size = size ;53 adata->size = size - overflow; 47 54 adata->format = format; 48 55 atomic_set(&adata->refcount, 1);
Note:
See TracChangeset
for help on using the changeset viewer.