mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
WIP - two-channel output processor is correctly synthesizing a channel
and translating it by -FS/4 to correctly center the synthesized channel. The low-pass filter is currently disabled to better troubleshoot/view the state of the synthesized channel. It appears that the synthesizer is not correctly joining the channel ... instead of down-sampling and then synthesizing the two channels, it appears to be synthesizing and then down-sampling. The synthesized channel has a null in the middle which would render it unusable.
This commit is contained in:
@@ -521,15 +521,21 @@ public class ChannelCalculator
|
||||
|
||||
int index = indexes.get(centerIndex);
|
||||
|
||||
if(index == getWrapAroundIndex())
|
||||
if(indexes.size() % 2 == 0)
|
||||
{
|
||||
return (long)getIndexCenterFrequency(indexes.get(centerIndex), IndexBoundaryPolicy.ADJUST_NEGATIVE);
|
||||
return (long)getIndexMaximumFrequency(index, IndexBoundaryPolicy.ADJUST_NEGATIVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (long)getIndexCenterFrequency(indexes.get(centerIndex), IndexBoundaryPolicy.ADJUST_POSITIVE);
|
||||
if(index == getWrapAroundIndex())
|
||||
{
|
||||
return (long)getIndexCenterFrequency(index, IndexBoundaryPolicy.ADJUST_NEGATIVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (long)getIndexCenterFrequency(index, IndexBoundaryPolicy.ADJUST_POSITIVE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,14 +68,13 @@ public abstract class ChannelOutputProcessor implements IPolyphaseChannelOutputP
|
||||
@Override
|
||||
public void setFrequencyOffset(long frequencyOffset)
|
||||
{
|
||||
long offset = frequencyOffset;
|
||||
mLog.debug("Setting frequency offset to: " + offset);
|
||||
// mFrequencyCorrectionMixer.setFrequency(offset);
|
||||
mLog.debug("Setting frequency offset to: " + frequencyOffset);
|
||||
mFrequencyCorrectionMixer.setFrequency(frequencyOffset);
|
||||
mFrequencyCorrectionEnabled = (frequencyOffset != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Oscillator/mixer to use for frequency correction against incominb sample stream
|
||||
* Oscillator/mixer to use for frequency correction against incoming sample stream
|
||||
*/
|
||||
protected IOscillator getFrequencyCorrectionMixer()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user