Fixed duration error.

This commit is contained in:
Deathsbreed 2014-10-09 17:47:26 -05:00
parent 7b23946e44
commit 69e9fa695c

View File

@ -35,8 +35,8 @@ public class Generator {
ByteBuffer cBuf = ByteBuffer.allocate(line.getBufferSize());
if(msecs < 150) msecs = 150;
int ctSamplesTotal = (int)(SAMPLE_RATE * (msecs / 1000));
if(ctSamplesTotal < 150) ctSamplesTotal = 150;
while(ctSamplesTotal > 0) {
double fCycleInc = fFreq/SAMPLE_RATE;