diff --git a/src/freqsample/FreqSample.java b/src/freqsample/FreqSample.java index 503239d..3c17d58 100644 --- a/src/freqsample/FreqSample.java +++ b/src/freqsample/FreqSample.java @@ -4,9 +4,14 @@ import java.awt.event.*; import javax.swing.*; import javax.sound.sampled.*; +/** + * @author Nicolás A. Ortega + * @copyright Nicolás A. Ortega + * @license GNU GPLv3 + * @year 2014 + * + */ public class FreqSample { - public static final String version = "v0.2"; - private JFrame frame; private JPanel panel; private JTextField hzField, msField; diff --git a/src/freqsample/Generator.java b/src/freqsample/Generator.java index c170cc0..c0e671f 100644 --- a/src/freqsample/Generator.java +++ b/src/freqsample/Generator.java @@ -7,7 +7,7 @@ import javax.swing.*; /** * @author Nicolás A. Ortega * @copyright Nicolás A. Ortega - * @license GPLv3 + * @license GNU GPLv3 * @year 2014 * */ @@ -35,7 +35,8 @@ public class Generator { ByteBuffer cBuf = ByteBuffer.allocate(line.getBufferSize()); - int ctSamplesTotal = (int)(SAMPLE_RATE * msecs / 1000); + int ctSamplesTotal = (int)(SAMPLE_RATE * (msecs / 1000)); + if(ctSamplesTotal < 150) ctSamplesTotal = 150; while(ctSamplesTotal > 0) { double fCycleInc = fFreq/SAMPLE_RATE;