|
YAACC - UPNP Client and Server
|
The client side of the source@v1 role without the network (issue #325): the phone has audio to offer (setSignal), the server asks for it (onServerCommand), then the audio of the phone's player is sent in chunks of at most 150 ms that carry the server's clock (write).
More...

Classes | |
| interface | Wire |
| Where the messages go: the secure channel of the session. More... | |
Public Member Functions | |
| SourceUplink (int sampleRate, LongSupplier serverMicros) | |
| synchronized void | attach (Wire wire) |
The role is active on this connection (the session tells the state, see signalName()). | |
| synchronized String | signalName () |
present or absent: the signal for the client/state. | |
| synchronized void | detach () |
| The connection is gone or the role is not active any more: nothing is sent; the audio is dropped. | |
| synchronized void | setSignal (boolean present) |
| Whether the phone has audio to offer now (its player plays). | |
| synchronized boolean | hasSignal () |
| synchronized boolean | isStreaming () |
| synchronized void | onServerCommand (String command) |
A server/command of the source role: start opens the stream, stop ends it. | |
| synchronized boolean | write (byte[] data, int offset, int length) |
| Audio of the player (16 bit stereo at the rate of this uplink). | |
The client side of the source@v1 role without the network (issue #325): the phone has audio to offer (setSignal), the server asks for it (onServerCommand), then the audio of the phone's player is sent in chunks of at most 150 ms that carry the server's clock (write).
The audio is 16 bit stereo PCM at the rate given. Audio that arrives while the server has not asked for it is dropped. A write may wait for the line (it paces the player that produces the audio).
| synchronized void de.yaacc.sendspin.client.SourceUplink.setSignal | ( | boolean | present | ) |
Whether the phone has audio to offer now (its player plays).
Told to the server when it changes.

| synchronized boolean de.yaacc.sendspin.client.SourceUplink.write | ( | byte[] | data, |
| int | offset, | ||
| int | length ) |
Audio of the player (16 bit stereo at the rate of this uplink).
