Class WavExtractor

  • All Implemented Interfaces:

    public final class WavExtractor
    extends Object
    implements Extractor
    Extracts data from WAV byte streams.
    • Constructor Detail

      • WavExtractor

        public WavExtractor()
    • Method Detail

      • sniff

        public boolean sniff​(ExtractorInput input)
                      throws IOException
        Description copied from interface: Extractor
        Returns whether this extractor can extract samples from the ExtractorInput, which must provide data from the start of the stream.

        If true is returned, the input's reading position may have been modified. Otherwise, only its peek position may have been modified.

        Specified by:
        sniff in interface Extractor
        input - The ExtractorInput from which data should be peeked/read.
        Whether this extractor can read the provided input.
        IOException - If an error occurred reading from the input.
      • seek

        public void seek​(long position,
                         long timeUs)
        Description copied from interface: Extractor
        Notifies the extractor that a seek has occurred.

        Following a call to this method, the ExtractorInput passed to the next invocation of, PositionHolder) is required to provide data starting from position in the stream. Valid random access positions are the start of the stream and positions that can be obtained from any SeekMap passed to the ExtractorOutput.

        Specified by:
        seek in interface Extractor
        position - The byte offset in the stream from which data will be provided.
        timeUs - The seek time in microseconds.
      • release

        public void release()
        Description copied from interface: Extractor
        Releases all kept resources.
        Specified by:
        release in interface Extractor