Changeset aef1799 in mainline for uspace/lib/pcm/src/format.c
- Timestamp:
- 2012-07-17T10:57:41Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1f7da3b
- Parents:
- cd8f19d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcm/src/format.c
rcd8f19d raef1799 219 219 { 220 220 assert(f); 221 assert(buffer); 221 222 if (channel >= f->channels) 222 223 return 0.0f; … … 232 233 /* This makes it positive */ \ 233 234 sample -= (float)(type)low; \ 234 if (sample < 0.0f) { \235 printf("SUB MIN failed\n"); \236 } \237 235 /* This makes it <0,2> */ \ 238 236 sample /= (((float)(type)high - (float)(type)low) / 2.0f); \ 239 if (sample > 2.0) { \240 printf("DIV RANGE failed\n"); \241 } \242 237 return sample - 1.0f; \ 243 238 } while (0)
Note:
See TracChangeset
for help on using the changeset viewer.