Package ipsk.audio.capture
Class TargetDataLineInputStream2
- java.lang.Object
-
- java.io.InputStream
-
- ipsk.audio.capture.TargetDataLineInputStream2
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class TargetDataLineInputStream2 extends java.io.InputStream
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_MAX_BUFFER_FILL
static boolean
ERROR_ON_BUFFER_OVER_UNDERRUN
-
Constructor Summary
Constructors Constructor Description TargetDataLineInputStream2(javax.sound.sampled.TargetDataLine line)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
void
flushAndCloseStream()
long
getFramePosition()
TargetDataLineListener
getListener()
double
getMaxBufferFill()
boolean
isActive()
int
read()
int
read(byte[] b, int off, int len)
void
resetStream()
void
setListener(TargetDataLineListener listener)
void
setMaxBufferFill(double maxBufferFill)
void
stop()
-
-
-
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
-
resetStream
public void resetStream()
-
stop
public void stop()
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
getFramePosition
public long getFramePosition()
-
getMaxBufferFill
public double getMaxBufferFill()
-
setMaxBufferFill
public void setMaxBufferFill(double maxBufferFill)
-
flushAndCloseStream
public void flushAndCloseStream()
-
-