micromod.output.converters
Class UM8AudioFormatConverter
java.lang.Object
micromod.output.converters.UM8AudioFormatConverter
- All Implemented Interfaces:
- AudioFormatConverter
- public class UM8AudioFormatConverter
- extends java.lang.Object
- implements AudioFormatConverter
Unsigned mono 8 bit cheesy output.
This should allow anyone with an 8 bit soundcard (or just a half-arsed driver)
to get at least some audio out of most of the output devices.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UM8AudioFormatConverter
public UM8AudioFormatConverter()
getBytesPerFrame
public int getBytesPerFrame()
- Specified by:
getBytesPerFrame
in interface AudioFormatConverter
- Returns:
- the number of bytes output per stereo sample of input.
getNumberOfChannels
public int getNumberOfChannels()
- Specified by:
getNumberOfChannels
in interface AudioFormatConverter
- Returns:
- 2 if this converter produces stereo output, 1 if mono
isSigned
public boolean isSigned()
- Specified by:
isSigned
in interface AudioFormatConverter
- Returns:
- true if the converter outputs signed samples
isBigEndian
public boolean isBigEndian()
- Specified by:
isBigEndian
in interface AudioFormatConverter
- Returns:
- true if the converter outputs big endian samples
convert
public void convert(short[] left,
short[] right,
int position,
byte[] output,
int length)
- Description copied from interface:
AudioFormatConverter
- Perform conversion of audio.
length*getBytesPerFrame() bytes are written to the start of the output array.
- Specified by:
convert
in interface AudioFormatConverter
- Parameters:
left
- the left bufferright
- the right bufferposition
- the start position in the input buffers.length
- the number of "frames" or stereo samples to convert