Ignore:
Timestamp:
05/10/18 16:04:51 (6 years ago)
Author:
davidb
Message:

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/apollo/gui/DualPeakTroughWaveFormRenderer.java

    r1007 r1102  
    3030         *                      If audioformat is not supported. See SampledAudioManager.isFormatSupportedForPlayback
    3131         */
    32         public DualPeakTroughWaveFormRenderer(AudioFormat audioFormat) {
     32        public DualPeakTroughWaveFormRenderer(AudioFormat audioFormat)
     33        {
    3334                if (audioFormat == null) throw new NullPointerException("audioFormat");
    3435               
    35                 if (!SampledAudioManager.getInstance().isFormatSupportedForPlayback(audioFormat))
    36                         throw new IllegalArgumentException();
     36                if (!SampledAudioManager.getInstance().isFormatSupportedForPlayback(audioFormat)) throw new IllegalArgumentException();
    3737
    3838                sampleSize = audioFormat.getSampleSizeInBits();
     
    7070         *              interleaves in rendering order)
    7171         */
    72         public float[] getSampleAmplitudes(byte[] audioBytes, int startFrame, int frameLength, int aggregationSize) {
     72        public float[] getSampleAmplitudes(byte[] audioBytes, int startFrame, int frameLength, int aggregationSize)
     73        {
    7374                assert(audioBytes != null);
    7475                assert(startFrame >= 0);
     
    7778                int aggregationCount = frameLength / aggregationSize;
    7879               
    79                 float[] amplitudes = (aggregationSize == 1) ?
    80                         new float[aggregationCount] :
    81                                 new float[aggregationCount * 2];
     80                float[] amplitudes = (aggregationSize == 1) ? new float[aggregationCount] : new float[aggregationCount * 2];
    8281               
    8382                if (sampleSize == 16) {
Note: See TracChangeset for help on using the changeset viewer.