|
YAACC - UPNP Client and Server
|
The audio output as the engine sees it (an AudioTrack in streaming mode on Android, a simulation in tests).
More...


Public Member Functions | |
| void | open (SinkFormat format) throws AudioSinkException |
| Creates the output. | |
| int | write (byte[] data, int offset, int length) throws AudioSinkException |
| Queues whole frames without blocking. | |
| void | start () throws AudioSinkException |
| Starts playback of what was written; does nothing when it already runs. | |
| void | flush () |
| Throws away everything queued and stops. | |
| PlaybackPosition | position () |
| The latest position the platform knows, or null when there is none (yet). | |
| int | underrunCount () |
| How often the output ran empty since it was opened. | |
| void | setGain (float gain) |
| A linear gain, 0 to 1. | |
| default int | startThresholdFrames () |
| How many frames the engine must have written before the output really starts playing (the streaming start threshold of the platform); 0 when the output starts at once. | |
| default void | attachTrace (EventTrace trace) |
| Lets the output note its own events (position source changes) in the engine's trace. | |
| default String | describe () |
| One line about the output (buffer, threshold, timestamp health) for the status and the trace. | |
| String | positionSource () |
A label of where position() comes from, for the status line. | |
| void | release () |
| Frees the output. | |
The audio output as the engine sees it (an AudioTrack in streaming mode on Android, a simulation in tests).
It is used from the engine's thread only. Frames are 16 bit interleaved PCM in the byte order of the platform.
| default void de.yaacc.multiroom.engine.AudioSink.attachTrace | ( | EventTrace | trace | ) |
Lets the output note its own events (position source changes) in the engine's trace.
Implemented in de.yaacc.multiroom.engine.StreamingSink.
| default String de.yaacc.multiroom.engine.AudioSink.describe | ( | ) |
One line about the output (buffer, threshold, timestamp health) for the status and the trace.
Implemented in de.yaacc.multiroom.engine.StreamingSink.
Referenced by de.yaacc.multiroom.engine.ClientEngine.status().

| void de.yaacc.multiroom.engine.AudioSink.flush | ( | ) |
Throws away everything queued and stops.
The counting of PlaybackPosition#getFrames() starts again at 0 and start() is needed again. The output itself is kept (it is not re-created).
Implemented in de.yaacc.multiroom.engine.StreamingSink.
| void de.yaacc.multiroom.engine.AudioSink.open | ( | SinkFormat | format | ) | throws AudioSinkException |
| PlaybackPosition de.yaacc.multiroom.engine.AudioSink.position | ( | ) |
The latest position the platform knows, or null when there is none (yet).
Implemented in de.yaacc.multiroom.engine.StreamingSink.
| String de.yaacc.multiroom.engine.AudioSink.positionSource | ( | ) |
A label of where position() comes from, for the status line.
Implemented in de.yaacc.multiroom.engine.StreamingSink.
Referenced by de.yaacc.multiroom.engine.ClientEngine.status().

| void de.yaacc.multiroom.engine.AudioSink.release | ( | ) |
| void de.yaacc.multiroom.engine.AudioSink.setGain | ( | float | gain | ) |
A linear gain, 0 to 1.
Implemented in de.yaacc.multiroom.engine.StreamingSink.
| void de.yaacc.multiroom.engine.AudioSink.start | ( | ) | throws AudioSinkException |
Starts playback of what was written; does nothing when it already runs.
Implemented in de.yaacc.multiroom.engine.StreamingSink.
| default int de.yaacc.multiroom.engine.AudioSink.startThresholdFrames | ( | ) |
How many frames the engine must have written before the output really starts playing (the streaming start threshold of the platform); 0 when the output starts at once.
Implemented in de.yaacc.multiroom.engine.StreamingSink.
| int de.yaacc.multiroom.engine.AudioSink.underrunCount | ( | ) |
How often the output ran empty since it was opened.
Implemented in de.yaacc.multiroom.engine.StreamingSink.
| int de.yaacc.multiroom.engine.AudioSink.write | ( | byte[] | data, |
| int | offset, | ||
| int | length ) throws AudioSinkException |
Queues whole frames without blocking.
Implemented in de.yaacc.multiroom.engine.StreamingSink.