0

guys. I am studying AEC for android and more specificly,I am studying HAL for tuna project. code: audio_hw.c

static void get_capture_delay(struct tuna_stream_in *in,
                   size_t frames,
                   struct echo_reference_buffer *buffer)
...
    delay_ns = kernel_delay + buf_delay + rsmp_delay;
...

I found get_capture_delay includes rsmp_delay.I do not think it is true. I believe there is not any relation between rsmp_delay and delay_ns . Because delay_ns is calculated by buffered audio capture data(both in Linux kernel and HAL buffer) and sampling rate.

Thank you very much for your great help.

Dongguo
  • 379
  • 2
  • 4
  • 14

1 Answers1

0

Here they are calculating over all delay.delay that will take for re-sample too.But later they will subtract re-sample delay from delay_ns.if you see mEchoReference->read() function,you will get clarity.

swetha
  • 67
  • 8
  • But later they will subtract re-sample delay from delay_ns ------------>Thanks for your help. Now I think i understood why they add rsmp_delay. But why will they subtract re-sample delay from delay_ns. – Dongguo Aug 20 '14 at 09:08