Count the params as we add them to the param arrays and use that to update the stream params instead of using hardcoded indexes and sizes. This makes it easier to add params and it also revealed a miscounted param.
Write the remaining samples in the ringbuffer and fill up the rest with silence. Add some more comments.
Add an example of a stream that plays data from a ringbuffer that is filled from some other thread.