Package ipsk.audio.capture
Class TargetDataLineInputStream
- java.lang.Object
-
- java.io.InputStream
-
- ipsk.audio.capture.TargetDataLineInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class TargetDataLineInputStream extends java.io.InputStream
-
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_MAX_BUFFER_FILLstatic booleanERROR_ON_BUFFER_OVER_UNDERRUN
-
Constructor Summary
Constructors Constructor Description TargetDataLineInputStream(javax.sound.sampled.TargetDataLine line)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()longgetFramePosition()TargetDataLineListenergetListener()doublegetMaxBufferFill()booleanisActive()intread()intread(byte[] b, int off, int len)voidreset()voidsetListener(TargetDataLineListener listener)voidsetMaxBufferFill(double maxBufferFill)voidstop()
-
-
-
Field Detail
-
ERROR_ON_BUFFER_OVER_UNDERRUN
public static final boolean ERROR_ON_BUFFER_OVER_UNDERRUN
- See Also:
- Constant Field Values
-
DEFAULT_MAX_BUFFER_FILL
public static double DEFAULT_MAX_BUFFER_FILL
-
-
Method Detail
-
isActive
public boolean isActive()
- Returns:
- the active
-
getListener
public TargetDataLineListener getListener()
- Returns:
- the listener
-
setListener
public void setListener(TargetDataLineListener listener)
- Parameters:
listener- the listener to set
-
reset
public void reset()
- Overrides:
resetin classjava.io.InputStream
-
stop
public void stop()
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
getFramePosition
public long getFramePosition()
-
getMaxBufferFill
public double getMaxBufferFill()
-
setMaxBufferFill
public void setMaxBufferFill(double maxBufferFill)
-
-