ufg.processing
Class Oscillator
java.lang.Object
java.io.InputStream
javax.sound.sampled.AudioInputStream
ufg.processing.Oscillator
- All Implemented Interfaces:
- java.io.Closeable
public class Oscillator
- extends javax.sound.sampled.AudioInputStream
| Fields inherited from class javax.sound.sampled.AudioInputStream |
format, frameLength, framePos, frameSize |
|
Constructor Summary |
Oscillator(int nWaveformType,
float fSignalFrequency,
float fAmplitude,
javax.sound.sampled.AudioFormat audioFormat,
long lLength)
|
|
Method Summary |
int |
available()
Returns the number of bytes that can be read without blocking. |
int |
read()
|
int |
read(byte[] abData,
int nOffset,
int nLength)
|
| Methods inherited from class javax.sound.sampled.AudioInputStream |
close, getFormat, getFrameLength, mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WAVEFORM_SINE
public static final int WAVEFORM_SINE
- See Also:
- Constant Field Values
WAVEFORM_SQUARE
public static final int WAVEFORM_SQUARE
- See Also:
- Constant Field Values
WAVEFORM_TRIANGLE
public static final int WAVEFORM_TRIANGLE
- See Also:
- Constant Field Values
WAVEFORM_SAWTOOTH
public static final int WAVEFORM_SAWTOOTH
- See Also:
- Constant Field Values
Oscillator
public Oscillator(int nWaveformType,
float fSignalFrequency,
float fAmplitude,
javax.sound.sampled.AudioFormat audioFormat,
long lLength)
available
public int available()
- Returns the number of bytes that can be read without blocking.
Since there is no blocking possible here, we simply try to
return the number of bytes available at all. In case the
length of the stream is indefinite, we return the highest
number that can be represented in an integer. If the length
if finite, this length is returned, clipped by the maximum
that can be represented.
- Overrides:
available in class javax.sound.sampled.AudioInputStream
read
public int read()
throws java.io.IOException
- Overrides:
read in class javax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException
read
public int read(byte[] abData,
int nOffset,
int nLength)
throws java.io.IOException
- Overrides:
read in class javax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException