mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
ant to gradle. Removes linux and windows application launch scripts and produces an executable jar with all resources included.
32 lines
550 B
Java
32 lines
550 B
Java
package io.github.dsheirer.dsp.gain;
|
|
|
|
import io.github.dsheirer.sample.Listener;
|
|
import io.github.dsheirer.sample.complex.Complex;
|
|
|
|
public class ComplexGain implements Listener<Complex>
|
|
{
|
|
private float mGain;
|
|
private Listener<Complex> mListener;
|
|
|
|
public ComplexGain( float gain )
|
|
{
|
|
mGain = gain;
|
|
}
|
|
|
|
@Override
|
|
public void receive( Complex sample )
|
|
{
|
|
if( mListener != null )
|
|
{
|
|
sample.multiply( mGain );
|
|
|
|
mListener.receive( sample );
|
|
}
|
|
}
|
|
|
|
public void setListener( Listener<Complex> listener )
|
|
{
|
|
mListener = listener;
|
|
}
|
|
}
|