mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 00:57:31 -05:00
Channel Spectral Display
- 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
This commit is contained in:
39
src/spectrum/menu/FrameRateItem.java
Normal file
39
src/spectrum/menu/FrameRateItem.java
Normal file
@@ -0,0 +1,39 @@
|
||||
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 );
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user