ExperimentalExperimental
Ring buffer from sharedbufferreceived.
Replaces Atomics.load for the seqlock counter; meant for tests.
PcmHeaderError when the buffer is not a ring buffer of a version this reader supports.
Readonly ExperimentalcapacityFrames the ring holds.
Readonly ExperimentalchannelsNumber of audio channels in each frame (e.g. 2 for stereo).
Readonly ExperimentalepochGeneration of this buffer; a format change arrives as a new buffer with a higher epoch.
Readonly ExperimentalsampleSamples per second per channel.
Experimental
true once the host has stopped writing (unsubscribed, format change, page gone or host exit).
Experimental
Copy out the frames written since the previous call, de-interleaved.
Returns null when nothing new was written, or when the host kept
writing during all three attempts; in that case nothing is consumed
and the next call tries again. Each retry halves the window and keeps
only the newest frames, so a slow copy of a large backlog still
completes; the frames given up that way count in dropped.
Experimental
Frames written that no read has returned yet, including any the ring already overwrote.
Pull the frames written since the previous read from one ring buffer.
Construct one reader per buffer (a new epoch comes with a new buffer). Reading starts at frame 0 of the buffer, so the first read also returns what was written before the page received it, up to the capacity.