Avisoft logo

RECORDER Manual


Ring Buffer Settings


The ring buffer (circular buffer) functionality will permanently save the incoming data of each device into a fixed-sized ring buffer on disk, which allows reading the data by other third-party (custom-made) applications in real-time. The ring buffer contains at any time the most recent data (it is something like a flight recorder), which could also be useful for some other applications.



The option enable ring buffer on disk will activate the ring buffer functionality. The buffer size list box determines the duration of the buffer expressed in Msamples (million samples). The option indicate oldest sample will mark the position of the oldest sample in the buffer by inserting two full-scale samples (32767 and -32768).

The ring buffer resides in a common .wav file (ring.wav, located in the RECORDER base directly) that has an additional custom RING RIFF chunk, which itself has three sub chunks:

last : Represents the write pointer index (expressed in bytes) relative to the first data sample in the WAVE data chunk
loop : The number of write pointer loops since the start of the monitoring
offs : The file offset address of the waveform data in the WAVE data chunk expressed in bytes from the begin of the .wav file
size : The total size of the ring buffer in bytes

For convenience, the information stored in the RING chunk is also regularly written into the ring.ini file, which might be easier to access by custom applications. This .ini file could be easily read by the GetPrivateProfileString() API function.

When polling and reading the files ring.wav and ring.ini be prepared that they can occasionally be locked (FileOpen fails) due to the write access by the RECORDER software. The files must be opened with the READ access attribute only and should be closed immediately after reading the data.
Avisoft Bioacoustics

last modified on 12 December 2018