Package net.sourceforge.jaad.aac

Examples of net.sourceforge.jaad.aac.SampleFrequency


    icsR = new ICStream(frameLength);
  }

  void decode(BitStream in, DecoderConfig conf) throws AACException {
    final Profile profile = conf.getProfile();
    final SampleFrequency sf = conf.getSampleFrequency();
    if(sf.equals(SampleFrequency.SAMPLE_FREQUENCY_NONE)) throw new AACException("invalid sample frequency");

    readElementInstanceTag(in);

    commonWindow = in.readBool();
    final ICSInfo info = icsL.getInfo();
View Full Code Here


    ltpData2Present = false;
  }

  /* ========== decoding ========== */
  public void decode(BitStream in, DecoderConfig conf, boolean commonWindow) throws AACException {
    final SampleFrequency sf = conf.getSampleFrequency();
    if(sf.equals(SampleFrequency.SAMPLE_FREQUENCY_NONE)) throw new AACException("invalid sample frequency");

    in.skipBit(); //reserved
    windowSequence = WindowSequence.forInt(in.readBits(2));
    windowShape[PREVIOUS] = windowShape[CURRENT];
    windowShape[CURRENT] = in.readBit();

    windowGroupCount = 1;
    windowGroupLength[0] = 1;
    if(windowSequence.equals(WindowSequence.EIGHT_SHORT_SEQUENCE)) {
      maxSFB = in.readBits(4);
      int i;
      for(i = 0; i<7; i++) {
        if(in.readBool()) windowGroupLength[windowGroupCount-1]++;
        else {
          windowGroupCount++;
          windowGroupLength[windowGroupCount-1] = 1;
        }
      }
      windowCount = 8;
      swbOffsets = SWB_OFFSET_SHORT_WINDOW[sf.getIndex()];
      swbCount = SWB_SHORT_WINDOW_COUNT[sf.getIndex()];
      predictionDataPresent = false;
    }
    else {
      maxSFB = in.readBits(6);
      windowCount = 1;
      swbOffsets = SWB_OFFSET_LONG_WINDOW[sf.getIndex()];
      swbCount = SWB_LONG_WINDOW_COUNT[sf.getIndex()];
      predictionDataPresent = in.readBool();
      if(predictionDataPresent) readPredictionData(in, conf.getProfile(), sf, commonWindow);
    }
  }
View Full Code Here

    }
  }

  public void process(FilterBank filterBank) throws AACException {
    final Profile profile = config.getProfile();
    final SampleFrequency sf = config.getSampleFrequency();
    //final ChannelConfiguration channels = config.getChannelConfiguration();

    int chs = config.getChannelConfiguration().getChannelCount();
    if(chs==1&&psPresent) chs++;
    final int mult = sbrPresent ? 2 : 1;
View Full Code Here

TOP

Related Classes of net.sourceforge.jaad.aac.SampleFrequency

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.