Class LineTuner
java.lang.Object
net.avadeaux.klipspringer.codec.LineTuner
- All Implemented Interfaces:
Closeable,AutoCloseable,Device.Tuner,PcmReader
Audio input adapter for reading from a
TargetDataLine.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.avadeaux.klipspringer.codec.Device.Tuner
Device.Tuner.Factory -
Constructor Summary
ConstructorsConstructorDescriptionLineTuner(TargetDataLine line) Constructs a tuner (input) for the given line. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()SeeCloseable.close().format()Gets the audio format data read through the tuner.booleanread(ByteBuffer buffer) Reads frames until buffer is full, input is exhausted, or the source is closed.
-
Constructor Details
-
LineTuner
Constructs a tuner (input) for the given line.- Throws:
UnsupportedFormatException
-
-
Method Details
-
format
Description copied from interface:Device.TunerGets the audio format data read through the tuner.- Specified by:
formatin interfaceDevice.Tuner
-
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
-
close
public void close()Description copied from interface:Device.TunerSeeCloseable.close().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceDevice.Tuner
-