public class WaveFileObuffer extends Obuffer
MAXCHANNELS, OBUFFERSIZE
Constructor and Description |
---|
WaveFileObuffer(int number_of_channels,
int freq,
java.lang.String FileName)
Creates a new WareFileObuffer instance.
|
Modifier and Type | Method and Description |
---|---|
void |
append(int channel,
short value)
Takes a 16 Bit PCM sample.
|
void |
clear_buffer()
Clears all data in the buffer (for seeking).
|
void |
close() |
void |
set_stop_flag()
Notify the buffer that the user has stopped the stream.
|
void |
write_buffer(int val)
Write the samples to the file or directly to the audio hardware.
|
appendSamples
public WaveFileObuffer(int number_of_channels, int freq, java.lang.String FileName)
number_of_channels
- The number of channels of audio data
this buffer will receive.freq
- The sample frequency of the samples in the buffer.fileName
- The filename to write the data to.public void append(int channel, short value)
public void write_buffer(int val)
Obuffer
write_buffer
in class Obuffer
public void clear_buffer()
Obuffer
clear_buffer
in class Obuffer
public void set_stop_flag()
Obuffer
set_stop_flag
in class Obuffer