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 double
DEFAULT_MAX_BUFFER_FILL
static boolean
ERROR_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 int
available()
void
close()
long
getFramePosition()
TargetDataLineListener
getListener()
double
getMaxBufferFill()
boolean
isActive()
int
read()
int
read(byte[] b, int off, int len)
void
reset()
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
-
reset
public void reset()
- Overrides:
reset
in classjava.io.InputStream
-
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)
-
-