Hello,
i'm resampling a channel from 48Kto 192K, but the output (resampled) signal
still contains spectral replicas of the low rate input.
The replicas are only -10 to -20dB down in respect to the 24KHz bandwidth input
spectrum, and their level barely changes for any BASS_SetConfig(BASS_CONFIG_SRC, X).
I tried every setting from 0 to 6, and, though the 24KHz passband cutoff become sharper,
the replicas are always present, just like a linear interpolator is always used.
The only way to get rid of them is to filter the 192KHz stream, but it is no solution.
I'm using the last 2.4.13.8 version for arm-linux in hard-fp.
Here's the startup code:
BASS_Init(-1,192000,0,0,NULL);
BASS_SetConfig(BASS_CONFIG_FLOATDSP,TRUE);
BASS_SetConfig( BASS_CONFIG_SRC, 3 );
handlemixer48 = BASS_Mixer_StreamCreate(48000,2,BASS_MIXER_NONSTOP | BASS_STREAM_DECODE | BASS_SAMPLE_FLOAT);
handlepush = BASS_StreamCreate(48000,2,BASS_SAMPLE_FLOAT | BASS_STREAM_DECODE,STREAMPROC_PUSH,NULL);
BASS_Mixer_StreamAddChannel(handlemixer48,handlepush,0); //put the udp - data stream into the 48K mixer
HDSP48 = BASS_ChannelSetDSP(handlemixer48,AudioDsp48,NULL,1);//dsp on 48K audio
handlemixer192 = BASS_Mixer_StreamCreate(192000,2,BASS_MIXER_NONSTOP | BASS_SAMPLE_FLOAT);
BASS_Mixer_StreamAddChannel(handlemixer192,handlemixer48,0);//plug 48K channel into 192K mixer
lpf24k = BASS_ChannelSetDSP(handlemixer192,lpf_192k,NULL,1);//24K lpf filter to clean out replicas at 192KHz
dsp192k = BASS_ChannelSetDSP(handlemixer192,AudioDsp192,NULL,1);//192K DSP
Other 2 question on the same argument:
1- assuming that the resampler was working fine, is it possible to perform multi rate processing such as, into a DSP callback running at 48K, upsample to X, process, then downsample to 48K ?
If so, what the latency of upsampling/downsampling process would be, in order to match the resampled data to the non-resampled ones ?
I'm asking this because, for some special effects, i've to upsample some 48K data to avoid aliasing, process them then downsample, but i have then to combine the resampled data with non resampled
ones with exact time alignment.
2- may i write my own resampler ? In such case, i 'll have my 48K stream, then i can upsample it, and how then i send it to the 192K stream ?
Have i to setup a STREAMPROC_PUSH channel ?
Thanks in advance for any support.