|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qtunes.speaker.spi.justeport.javasoundspi.RAOPClient
public class RAOPClient
The raw RAOP client. Pared down version of C# original
Field Summary | |
---|---|
static int |
DEFAULTPORT
The default port to connect RAOP client to |
static float |
MAXGAIN
The maximum valid value for setGain(double) |
static float |
MINGAIN
The minimum valid value for setGain(double) |
Constructor Summary | |
---|---|
RAOPClient(String host)
Create a new RAOPClient |
|
RAOPClient(String host,
int port)
Create a new RAOPClient |
Method Summary | |
---|---|
void |
connect()
Connect to the airport |
void |
disconnect()
Disconnect from the Airport |
void |
flush()
Flush any buffered data on the Airport - used to stop audio immediately |
double |
getGain()
Get the gain from the Airport |
String |
getServerType()
Get the server type (only valid after connection) |
boolean |
isAudioJackConnected()
Return true if the audio-jack on the Airport is connected |
boolean |
isAudioJackDigital()
Return true if the audio-jack on the Airport is digital (false=analog) |
void |
setGain(double gain)
Set the gain on the Airport |
void |
write(byte[] buf,
int off,
int len,
boolean bigendian)
Write a block of data to the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULTPORT
public static final float MINGAIN
setGain(double)
public static final float MAXGAIN
setGain(double)
Constructor Detail |
---|
public RAOPClient(String host)
host
- the host to connect to, eg "airport.local"public RAOPClient(String host, int port)
host
- the host to connect to, eg "airport.local"port
- the port to connect to, eg 5000Method Detail |
---|
public String getServerType()
public boolean isAudioJackConnected()
public boolean isAudioJackDigital()
public void connect() throws IOException, GeneralSecurityException
IOException
- if the connection fails
GeneralSecurityException
- if the encryption fails for any reasonpublic void flush() throws IOException
IOException
public void disconnect() throws IOException
IOException
public double getGain()
MINGAIN
and MAXGAIN
public void setGain(double gain) throws IOException
gain
- a value between MINGAIN
and MAXGAIN
IOException
public void write(byte[] buf, int off, int len, boolean bigendian) throws IOException
IllegalStateException
is thrown.
buf
- the bufferoff
- the offset into the buffer to read data fromlen
- the value 16384
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |