How to build a delayed / buffered pipe?

Is it possible to create a buffer channel that stores data (for a certain number of bytes or for a given time) from standard linux tools like cat, dd, etc.?

For example, to collect a certain number of packets, audio data, or something else.

Eg. to create a script delaybufferto do something like this:

arecord | delaybuffer 16000 | aplay

to play recorded sound with a delay of 16,000 bytes.

+3
source share
2 answers

There is a tool called bufferthat does the job. ( Link to Debian package - may also be available in other distributions.).

.

+5

dd ( dist ).

    arecord | dd ibs=16000 iflag=fullblock oflag=dsync | aplay

, , , .

+5

All Articles