- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/apollo/gui/DualPeakTroughWaveFormRenderer.java
r1007 r1102 30 30 * If audioformat is not supported. See SampledAudioManager.isFormatSupportedForPlayback 31 31 */ 32 public DualPeakTroughWaveFormRenderer(AudioFormat audioFormat) { 32 public DualPeakTroughWaveFormRenderer(AudioFormat audioFormat) 33 { 33 34 if (audioFormat == null) throw new NullPointerException("audioFormat"); 34 35 35 if (!SampledAudioManager.getInstance().isFormatSupportedForPlayback(audioFormat)) 36 throw new IllegalArgumentException(); 36 if (!SampledAudioManager.getInstance().isFormatSupportedForPlayback(audioFormat)) throw new IllegalArgumentException(); 37 37 38 38 sampleSize = audioFormat.getSampleSizeInBits(); … … 70 70 * interleaves in rendering order) 71 71 */ 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 { 73 74 assert(audioBytes != null); 74 75 assert(startFrame >= 0); … … 77 78 int aggregationCount = frameLength / aggregationSize; 78 79 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]; 82 81 83 82 if (sampleSize == 16) {
Note:
See TracChangeset
for help on using the changeset viewer.