Added a few things.
This commit is contained in:
parent
2ae030df92
commit
c0f48964ca
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user