+typedef struct snd_buffer_s
+{
+ snd_format_t format;
+ unsigned int nbframes; // current size, in sample frames
+ unsigned int maxframes; // max size (buffer size), in sample frames
+ unsigned char samples[4]; // variable sized
+} snd_buffer_t;
+
+typedef struct snd_ringbuffer_s
+{
+ snd_format_t format;
+ unsigned char* ring;
+ unsigned int maxframes; // max size (buffer size), in sample frames
+ unsigned int startframe; // index of the first frame in the buffer
+ // if startframe == endframe, the bufffer is empty
+ unsigned int endframe; // index of the first EMPTY frame in the "ring" buffer
+ // may be smaller than startframe if the "ring" buffer has wrapped
+} snd_ringbuffer_t;
+