Changeset ab07cf0 in mainline for uspace/srv/audio/hound/audio_format.c
- Timestamp:
- 2012-07-13T16:11:05Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 13df13c8
- Parents:
- 6424800
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/audio_format.c
r6424800 rab07cf0 55 55 return EINVAL; 56 56 const size_t sample_size = pcm_sample_format_size(f->sample_format); 57 if ( !(size % sample_size == 0))57 if ((size % sample_size) != 0) 58 58 return EINVAL; 59 59 … … 65 65 const type *src_buff = src; \ 66 66 type *dst_buff = dst; \ 67 for (size_t i = 0; i < size / s ample_size; ++i) { \68 type a = type ## _ ## endian ##2host(dst_buff[i]); \69 type b = type ## _ ## endian ##2host(src_buff[i]); \70 type c = a + b; \67 for (size_t i = 0; i < size / sizeof(type); ++i) { \ 68 const type a = type ## _ ## endian ##2host(dst_buff[i]); \ 69 const type b = type ## _ ## endian ##2host(src_buff[i]); \ 70 const type c = a + b; \ 71 71 dst_buff[i] = host2 ## type ## _ ## endian(c); \ 72 72 } \
Note:
See TracChangeset
for help on using the changeset viewer.