public class IrAudioDevice extends Object implements IHarcHardware, IRawIrSender
repeatMax
Constructor and Description |
---|
IrAudioDevice(int sampleFrequency,
int channels,
boolean omitTail,
boolean verbose) |
IrAudioDevice(int sampleFrequency,
int sampleSize,
int channels,
boolean bigEndian,
boolean omitTail,
boolean square,
boolean divide,
boolean verbose) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Transmitter |
getTransmitter()
Returns a default Transmitter for the device.
|
String |
getVersion()
Returns the hardware version (not the version of the driver software).
|
boolean |
isValid()
Tries to identify instances that are not valid.
|
void |
open()
Opens the device with previously set parameters.
|
boolean |
sendIr(IrSignal irSignal,
int count,
Transmitter transmitter) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setTimeout(int timeout)
Set timeout in milliseconds.
|
void |
setVerbosity(boolean verbose)
Sets a verbosity flag, causing commands to be executed verbosely.
|
public IrAudioDevice(int sampleFrequency, int sampleSize, int channels, boolean bigEndian, boolean omitTail, boolean square, boolean divide, boolean verbose)
sampleFrequency
- sampleSize
- channels
- bigEndian
- omitTail
- square
- divide
- verbose
- public IrAudioDevice(int sampleFrequency, int channels, boolean omitTail, boolean verbose)
sampleFrequency
- channels
- omitTail
- verbose
- public boolean sendIr(IrSignal irSignal, int count, Transmitter transmitter) throws NoSuchTransmitterException, IrpMasterException, IOException
sendIr
in interface IRawIrSender
NoSuchTransmitterException
IrpMasterException
IOException
public String getVersion() throws IOException
IHarcHardware
getVersion
in interface IHarcHardware
IOException
public void setVerbosity(boolean verbose)
IHarcHardware
setVerbosity
in interface IHarcHardware
verbose
- on or offpublic void setTimeout(int timeout)
IHarcHardware
setTimeout
in interface IHarcHardware
timeout
- Timeout in milliseconds.public boolean isValid()
IHarcHardware
isValid
in interface IHarcHardware
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void open() throws IOException
IHarcHardware
open
in interface IHarcHardware
IOException
public Transmitter getTransmitter()
IRawIrSender
getTransmitter
in interface IRawIrSender
public void setDebug(int debug)
IHarcHardware
setDebug
in interface IHarcHardware
Copyright © 2016. All rights reserved.