Holds the producer of audio at real time (issue #325, the source role): the player of the app hands over audio as fast as it decodes it unless something waits for it, and a source has no player at the other end that does.
More...
|
|
| RealTimePacer (LongSupplier nanos, Sleeper sleeper) |
| |
|
void | reset () |
| | Starts the schedule again (the next piece is a new start).
|
| |
| void | pace (long durationNanos) throws InterruptedException |
| |
Holds the producer of audio at real time (issue #325, the source role): the player of the app hands over audio as fast as it decodes it unless something waits for it, and a source has no player at the other end that does.
Each piece says how long it lasts; the writer waits so that the audio handed over is never more than a short head start ahead of the clock. A gap (a pause, a seek) starts the schedule again. Not thread safe: one writer.
◆ pace()
| void de.yaacc.sendspin.client.RealTimePacer.pace |
( |
long | durationNanos | ) |
throws InterruptedException |
- Parameters
-
| durationNanos | how long the piece that was just handed over lasts; waits as long as the writer is ahead |
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/sendspin/client/RealTimePacer.java