mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
- Adds Channel Spectrum tab to display FFT of the audio output of the currently selected channel - Upgrades to JTransforms 3.0 FFT library - Adds three new context menus to main and channel spectral displays: -- Baseline - affects the vertical rendering baseline of the FFT -- Amplification - affects the vertical height of each FFT bin -- Averaging - affects how many FFTs are averaged to produce the display
40 lines
846 B
Java
40 lines
846 B
Java
package spectrum.menu;
|
|
|
|
import java.awt.event.ActionEvent;
|
|
import java.awt.event.ActionListener;
|
|
|
|
import javax.swing.JCheckBoxMenuItem;
|
|
|
|
import spectrum.DFTProcessor;
|
|
|
|
public class FrameRateItem extends JCheckBoxMenuItem
|
|
{
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private DFTProcessor mDFTProcessor;
|
|
private int mFrameRate;
|
|
|
|
public FrameRateItem( DFTProcessor processor, int frameRate )
|
|
{
|
|
super( String.valueOf( frameRate ) );
|
|
|
|
mDFTProcessor = processor;
|
|
mFrameRate = frameRate;
|
|
|
|
if( processor.getFrameRate() == mFrameRate )
|
|
{
|
|
setSelected( true );
|
|
}
|
|
|
|
addActionListener( new ActionListener()
|
|
{
|
|
@Override
|
|
public void actionPerformed( ActionEvent arg0 )
|
|
{
|
|
mDFTProcessor.setFrameRate( mFrameRate );
|
|
}
|
|
} );
|
|
}
|
|
}
|
|
|