Class MediaAudioDecoder

java.lang.Object
javaforce.media.MediaCoder
javaforce.media.MediaAudioDecoder

public class MediaAudioDecoder extends MediaCoder
  • Constructor Details

    • MediaAudioDecoder

      public MediaAudioDecoder()
      Create a stand-alone audio decoder for raw audio.
    • MediaAudioDecoder

      public MediaAudioDecoder(MediaInput input)
      Create an audio decoder for a stream in a container format.
  • Method Details

    • start

      public boolean start(int codec_id, int new_chs, int new_freq)
      Starts a stand-alone audio decoder.
    • stop

      public void stop()
      Stops a stand-alone audio decoder.
    • decode

      public short[] decode(byte[] data, int offset, int length)
      Decodes codec packet into raw audio frame.
    • decode

      public short[] decode(Packet packet)
      Decodes codec packet into raw audio frame.
    • getChannels

      public int getChannels()
      Returns number of audio channels.
    • getSampleRate

      public int getSampleRate()
      Returns audio sample rate.
    • change

      public boolean change(CodecInfo info)
      Changes output chs/freq only. All other fields ignored.