ALSA Source

Hello,

 I have acoustic modem which uses ALSA source as interface to outside
world. I use a preamble based time synchronization technique to find
start of data in the frame. But my synchronization method is taking too
long and in the process i think i am loosing incoming samples from ALSA
source.
Is there a way to buffer samples from ALSA source , until i finish
synchronization.
Please provide me some suggestions.

Thanks in advance,
Ram