APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.media.sound

public final Class SoftMidiAudioFileReader

extends SunFileReader
Class Inheritance
Imports
java.io.EOFException, .IOException, .InputStream, javax.sound.midi.InvalidMidiDataException, .MetaMessage, .MidiEvent, .MidiMessage, .MidiSystem, .MidiUnavailableException, .Receiver, .Sequence, .Track, javax.sound.sampled.AudioFileFormat.Type, .AudioFormat, .AudioInputStream, .UnsupportedAudioFileException

MIDI File Audio Renderer/Reader.
Author
Karl Helgason

Field Summary

Modifier and TypeField and Description
private static final AudioFormat
private static final AudioFileFormat.Type

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static StandardFileFormat
pack-priv StandardFileFormat
getAudioFileFormatImpl(final InputStream stream)

Implements abstract com.sun.media.sound.SunFileReader.getAudioFileFormatImpl.

Obtains the audio file format of the input stream provided.

private AudioInputStream
public AudioInputStream
getAudioInputStream(final InputStream stream)

Overrides com.sun.media.sound.SunFileReader.getAudioInputStream.

Obtains an audio input stream from the input stream provided.

Inherited from com.sun.media.sound.SunFileReader:
big2littlebig2littleShortcalculatePCMFrameSizegetAudioFileFormatgetAudioFileFormatgetAudioFileFormatgetAudioInputStreamgetAudioInputStreamrllongrlshort

Field Detail

formatback to summary
private static final AudioFormat format
MIDIback to summary
private static final AudioFileFormat.Type MIDI

Constructor Detail

SoftMidiAudioFileReaderback to summary
public SoftMidiAudioFileReader()

Method Detail

getAudioFileFormatback to summary
private static StandardFileFormat getAudioFileFormat(final Sequence seq)
getAudioFileFormatImplback to summary
pack-priv StandardFileFormat getAudioFileFormatImpl(final InputStream stream) throws UnsupportedAudioFileException, IOException

Implements abstract com.sun.media.sound.SunFileReader.getAudioFileFormatImpl.

Doc from com.sun.media.sound.SunFileReader.getAudioFileFormatImpl.

Obtains the audio file format of the input stream provided. The stream must point to valid audio file data. Note that default implementation of getAudioInputStream(InputStream) assume that this method leaves the input stream at the beginning of the audio data.

Annotations
@Override
Exceptions
UnsupportedAudioFileException:
if the stream does not point to valid audio file data recognized by the system
IOException:
if an I/O exception occurs
getAudioInputStreamback to summary
private AudioInputStream getAudioInputStream(final Sequence seq) throws InvalidMidiDataException
getAudioInputStreamback to summary
public AudioInputStream getAudioInputStream(final InputStream stream) throws UnsupportedAudioFileException, IOException

Overrides com.sun.media.sound.SunFileReader.getAudioInputStream.

Doc from javax.sound.sampled.spi.AudioFileReader.getAudioInputStream.

Obtains an audio input stream from the input stream provided. The stream must point to valid audio file data. In general, audio file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.

Annotations
@Override
Exceptions
UnsupportedAudioFileException:
if the stream does not point to valid audio file data recognized by the system
IOException:
if an I/O exception occurs