Package javazoom.jl.converter
Class WaveFileObuffer
java.lang.Object
javazoom.jl.decoder.Obuffer
javazoom.jl.converter.WaveFileObuffer
Implements an Obuffer by writing the data to
a file in RIFF WAVE format.
- Since:
- 0.0
-
Field Summary
Fields inherited from class javazoom.jl.decoder.Obuffer
MAXCHANNELS, OBUFFERSIZE -
Constructor Summary
ConstructorsConstructorDescriptionWaveFileObuffer(int number_of_channels, int freq, String FileName) Creates a new WareFileObuffer instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(int channel, short value) Takes a 16 Bit PCM sample.voidClears all data in the buffer (for seeking).voidclose()voidNotify the buffer that the user has stopped the stream.voidwrite_buffer(int val) Write the samples to the file or directly to the audio hardware.Methods inherited from class javazoom.jl.decoder.Obuffer
appendSamples
-
Constructor Details
-
WaveFileObuffer
Creates a new WareFileObuffer instance.- Parameters:
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.
-
-
Method Details
-
append
public void append(int channel, short value) Takes a 16 Bit PCM sample. -
write_buffer
public void write_buffer(int val) Description copied from class:ObufferWrite the samples to the file or directly to the audio hardware.- Specified by:
write_bufferin classObuffer
-
close
public void close() -
clear_buffer
public void clear_buffer()Description copied from class:ObufferClears all data in the buffer (for seeking).- Specified by:
clear_bufferin classObuffer
-
set_stop_flag
public void set_stop_flag()Description copied from class:ObufferNotify the buffer that the user has stopped the stream.- Specified by:
set_stop_flagin classObuffer
-