I am working with esp8266 and xmega256a3bu to transfer voice from mic on one xmega to another over wifi using esp8266. When I transfer it from adc to dac via dma directly, it works quite well. When I use a buffer instead, (ADC ->DMA-> BUFFER & BUFFER -> DMA-> DAC) It works better if the samples are less but works still. However, when I transfer samples from this very buffer over wifi and send the received data (also stored in a buffer) to DAC, it simply can't recreate the signal. I suspect it's because it is too slow which effectively decreases the sample rate since number of samples are the same but time to process and transfer them is longer. slower sample rate means lower nyquist frequency which means I would get an alias instead of the original signal. Of course this is just a theory.
Either way, could someone tell me if there is a way around this problem? or is the problem something entirely different?