From 544c15be1d1a4b206e56b9a73b4b51b2681ff431 Mon Sep 17 00:00:00 2001 From: Deathsbreed Date: Wed, 8 Oct 2014 19:40:27 -0500 Subject: [PATCH] Now supporting smaller durations. --- build.xml | 2 ++ src/freqsample/Generator.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index f5f346c..d601bad 100644 --- a/build.xml +++ b/build.xml @@ -22,4 +22,6 @@ + + diff --git a/src/freqsample/Generator.java b/src/freqsample/Generator.java index acb25b2..c170cc0 100644 --- a/src/freqsample/Generator.java +++ b/src/freqsample/Generator.java @@ -35,7 +35,7 @@ public class Generator { ByteBuffer cBuf = ByteBuffer.allocate(line.getBufferSize()); - int ctSamplesTotal = SAMPLE_RATE * (int)(msecs / 1000); + int ctSamplesTotal = (int)(SAMPLE_RATE * msecs / 1000); while(ctSamplesTotal > 0) { double fCycleInc = fFreq/SAMPLE_RATE;