comparison jssmod.c @ 51:36e2f910219c

A non-working implementation of floating point audio mixing.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 01 Oct 2012 03:48:21 +0300
parents 033c660c25f5
children 8725853609db
comparison
equal deleted inserted replaced
50:4cbdaa3f5d74 51:36e2f910219c
220 else 220 else
221 { 221 {
222 Uint8 *in = (Uint8 *) src; 222 Uint8 *in = (Uint8 *) src;
223 while (count--) 223 while (count--)
224 { 224 {
225 *(out++) = (float) (*(in++) - 128) / 128.0f; 225 *(out++) = ((float) *(in++) - 128.0f) / 56.0f;
226 } 226 }
227 } 227 }
228 228
229 return DMERR_OK; 229 return DMERR_OK;
230 } 230 }
278 278
279 if ((res = jssConvertSampleToFP(&data, inst->data, inst->size, inst->flags)) != DMERR_OK) 279 if ((res = jssConvertSampleToFP(&data, inst->data, inst->size, inst->flags)) != DMERR_OK)
280 return res; 280 return res;
281 281
282 inst->flags &= !(jsf16bit); 282 inst->flags &= !(jsf16bit);
283 inst->flags |= jfsFP; 283 inst->flags |= jsfFP;
284 #else 284 #else
285 if (inst->flags & jsf16bit) 285 if (inst->flags & jsf16bit)
286 continue; 286 continue;
287 287
288 if ((res = jssConvertSampleTo16(&data, inst->data, inst->size)) != DMERR_OK) 288 if ((res = jssConvertSampleTo16(&data, inst->data, inst->size)) != DMERR_OK)