|
YAACC - UPNP Client and Server
|
The platform output as StreamingSink needs it: an AudioTrack on Android, a simulated device in tests.
More...

Public Member Functions | |
| int | bufferFrames () |
| The size of the output buffer in frames. | |
| int | startThresholdFrames () |
| The number of frames that must be queued before a started track really plays (the streaming start threshold). | |
| int | requestStartThresholdFrames (int frames) |
| Asks for a smaller start threshold where the platform allows it (Android 12 and later); returns the effective one. | |
| int | write (byte[] data, int offset, int length) throws AudioSinkException |
| Queues frames without blocking; returns the bytes taken. | |
| void | play () throws AudioSinkException |
| void | pauseAndFlush () |
| Pauses, then discards everything queued. | |
| boolean | timestamp (long[] out) |
The newest timestamp of the platform: out[0] is the frame position (the low 32 bits count, wrapping), out[1] the time it is presented in nanoseconds on the clock of nanoTime(). | |
| long | nanoTime () |
| The monotonic clock (nanoseconds) the platform's timestamps are in. | |
| long | headPosition () |
| The playback head position as an unsigned 32 bit number (wraps). | |
| int | underrunCount () |
| void | setGain (float gain) |
| default String | describe () |
| Facts about the output for the status line (performance mode, buffer sizes); empty when there are none. | |
| void | release () |
The platform output as StreamingSink needs it: an AudioTrack on Android, a simulated device in tests.
Every method is a thin call; the decisions (what a position means, when to fall back, how a 32 bit counter is unwrapped) are in StreamingSink, which is pure and tested.
| int de.yaacc.multiroom.engine.TrackPort.startThresholdFrames | ( | ) |
The number of frames that must be queued before a started track really plays (the streaming start threshold).
Before Android 12 this is the whole buffer or a device specific level the app can not see, so the buffer is assumed.
Referenced by de.yaacc.multiroom.engine.StreamingSink.describe(), and de.yaacc.multiroom.engine.StreamingSink.startThresholdFrames().

| boolean de.yaacc.multiroom.engine.TrackPort.timestamp | ( | long[] | out | ) |
The newest timestamp of the platform: out[0] is the frame position (the low 32 bits count, wrapping), out[1] the time it is presented in nanoseconds on the clock of nanoTime().
Referenced by de.yaacc.multiroom.engine.StreamingSink.position().
