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:
Denny
2018-01-27 15:57:22 -05:00
parent 5a03a0038c
commit 673c8a2423
2 changed files with 13 additions and 8 deletions

View File

@@ -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);
}
}
}
/**

View File

@@ -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()
{