This solution, without using any low pass filters before and after the desimation, will generate a lot of aliasing frequencies, Kjetil!

Here is another solution:
https://github.com/intervigilium/libresample/tree/master/jni/resample

Henrik


On 22.07.2018 22:22, Kjetil Matheussen wrote:
Maybe this will give you an idea:

48khz -> 8khz:
float get_output_sample(get_input_sample){
   static int i=0;
   static float sample;

  if (i % 6 == 0)
     sample = get_input_sample();

  i++;

  return sample;
}

8khz -> 48khz:
float get_output_sample(get_input_sample){

   float ret = get_input_sample();

   for(int i=1;i<6;i++)
      get_input_sample();

   return ret;
}

Not the best sound quality though.

On Sun, Jul 22, 2018 at 9:55 PM, Alex Dashevski <alexd...@gmail.com>
wrote:

real time

On Sun, Jul 22, 2018, 22:52 jpff <j...@codemist.co.uk> wrote:

Were you expecting real-time/time-critical resampling or offline?

_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp [1]

_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp [1]



Links:
------
[1] https://lists.columbia.edu/mailman/listinfo/music-dsp

_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp
_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to