commit | db29e694d15e4993ccbacd897bec3b531c3989a9 | [log] [tgz] |
---|---|---|
author | Andy Hung <hunga@google.com> | Mon Feb 24 18:36:35 2014 -0800 |
committer | Andy Hung <hunga@google.com> | Wed Feb 26 17:48:54 2014 -0800 |
tree | fac42fb5a562c6e7409cb076d0e3237018684eb1 | |
parent | 68d41418bd3e7df36b6b5c35fbc07dc1fedbe883 [diff] |
Fix float to i16 conversion in primitives.c Updated memcpy_to_i16_from_float(): Made bit-accurate invertible with power of 2 scaling. Also removed discontinuity around 0 (round versus truncate). Added clamp16FromFloat() to clamp float audio range of [-1.0, 1.0) to int16_t. Change-Id: I45b23f32ae46a4d7f86c8e5482ee43538298ce89 Signed-off-by: Andy Hung <hunga@google.com>