Commit df41ae3f by samrobinson Committed by Ian Baker

Add `FakeSampleStreamItem` to an existing FakeSampleStream.

Allows items to be added to the queue once the sample stream has already been created.
Means tests can simulate data not all being available at the start.

PiperOrigin-RevId: 290613392
parent 04d32533
...@@ -133,6 +133,15 @@ public final class FakeSampleStream implements SampleStream { ...@@ -133,6 +133,15 @@ public final class FakeSampleStream implements SampleStream {
this.timeUs = timeUs; this.timeUs = timeUs;
} }
/**
* Adds an item to the end of the queue of {@link FakeSampleStreamItem items}.
*
* @param item The item to add.
*/
public void addFakeSampleStreamItem(FakeSampleStreamItem item) {
this.fakeSampleStreamItems.add(item);
}
@Override @Override
public boolean isReady() { public boolean isReady() {
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment