Class Alsa.Tuner
java.lang.Object
net.avadeaux.klipspringer.alsa.Alsa
net.avadeaux.klipspringer.alsa.Alsa.Tuner
- All Implemented Interfaces:
Closeable,AutoCloseable,Device.Tuner,PcmReader
- Enclosing class:
Alsa
Class for receiving PCM data from an ALSA device.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.avadeaux.klipspringer.alsa.Alsa
Alsa.Player, Alsa.TunerNested classes/interfaces inherited from interface net.avadeaux.klipspringer.codec.Device.Tuner
Device.Tuner.Factory -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanread(ByteBuffer dest) Reads frames until buffer is full, input is exhausted, or the source is closed.Methods inherited from class net.avadeaux.klipspringer.alsa.Alsa
canPause, close, drain, format, layout, pause, unpauseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.avadeaux.klipspringer.codec.Device.Tuner
close, format
-
Field Details
-
devices
-
-
Constructor Details
-
Tuner
public Tuner(Device device, PcmFormat format, double bufferSecs, int recoveryAttempts) throws IOException Creates a tuner to input PCM from the given device in the given format, specifying the size of the external buffer, and the number of recovery attempts in case of buffer overrun. Available devices are obtained throughdevices. A reasonable number of recovery attempts is 2 if you want to continue receiving after a stutter in the input, or 0 if you want to get an exception as soon as an overrun happens.- Throws:
IOException
-
-
Method Details
-
read
Description copied from interface:PcmReaderReads frames until buffer is full, input is exhausted, or the source is closed. Returns false if input is exhausted, true if the source may provide more data.- Specified by:
readin interfacePcmReader- Throws:
IOException
-