+ if(uaudio_signed) {
+ if(uaudio_bits == 16) {
+ const int16_t *ptr = (int16_t *)input;
+ while(got > 0) {
+ --got;
+ *samples++ = *ptr++ * (0.5 / 32767);
+ }
+ } else {
+ const int8_t *ptr = (int8_t *)input;
+ while(got > 0) {
+ --got;
+ *samples++ = *ptr++ * (0.5 / 127);
+ }
+ }
+ } else {
+ if(uaudio_bits == 16) {
+ const uint16_t *ptr = (uint16_t *)input;
+ while(got > 0) {
+ --got;
+ *samples++ = ((int)*ptr++ - 32768) * (0.5 / 32767);
+ }
+ } else {
+ const uint8_t *ptr = (uint8_t *)input;
+ while(got > 0) {
+ --got;
+ *samples++ = ((int)*ptr++ - 128) * (0.5 / 127);
+ }
+ }