Changeset 432327d in buchla-68k for ram/libdsp.c
- Timestamp:
- 09/17/2017 09:27:29 PM (7 years ago)
- Branches:
- master
- Children:
- 6099cac
- Parents:
- 8c8b4e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/libdsp.c
r8c8b4e5 r432327d 157 157 */ 158 158 159 uint16_t exp_c(uint16_t c) 160 { 161 c &= 0x000F; /* use low 4 bits as the basis */ 162 c |= c << 4; /* turn them into 8 bits */ 163 c |= c << 8; /* make it a full 16 bits */ 164 165 return(c); 159 uint16_t exp_c(int16_t c) 160 { 161 uint16_t r; 162 163 r = (uint16_t)c & 0x000F; /* use low 4 bits as the basis */ 164 r |= r << 4; /* turn them into 8 bits */ 165 r |= r << 8; /* make it a full 16 bits */ 166 167 return(r); 166 168 } 167 169
Note:
See TracChangeset
for help on using the changeset viewer.