justin = { main feed , music , code , askjf , social , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.

Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [all]

Question: Cheers for the answers Justin! Another question - how do you deal with going from -32768 to 32767 (one less than the negative side!?) with silence being a load of zeros, to -1.0 to 1.0 with silence being a load of 0.0s?
Asked by Tommy G (82.132.226.x) on March 28 2017, 7:10am
Reply on March 28 2017, 1:31pm (edited at March 28 2017, 1:32pm):
    Have a look at WDL, specifically WDL/pcmfmtcvt.h:
    #define INT16_TO_float(out,in) { (out) = (float)(((double)in)/32768.0);  }
    You'll note that there is no +1.0 output possible from the conversion (since 32767 is the maximum input). This is normal.
[back to index] | [unreplied] | [replied] | [all]
Copyright 2018 Justin Frankel. | RSS