source: trunk/src/org/apollo/gui/WaveFormRenderer.java@ 1102

Last change on this file since 1102 was 1102, checked in by davidb, 6 years ago

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 size: 1007 bytes
Line 
1package org.apollo.gui;
2
3/**
4 * Provides waveform rendering services.
5 *
6 * @author Brook Novak
7 */
8public interface WaveFormRenderer {
9
10 /**
11 * Renders waveforms in a given array of audio samples - producing an array of wave-form
12 * amplitutes ranging for -1.0 to 1.0.
13 *
14 * A single height is calculated for one or more frames, which is specified by the
15 * aggregationSize. The way in which waveforms are rendered is implementation dependent.
16 *
17 * @param audioBytes
18 * The array of pure samples.
19 *
20 * @param startFrame
21 * The starting frame to begin rendering
22 *
23 * @param frameLength
24 * The number of frames to consider for rendering.
25 *
26 * @param aggregationSize
27 * The amount of frames to aggregate.
28 *
29 * @return
30 * An array of wave-form amplitutes ranging for -1.0 to 1.0.
31 * Note that this will be empty if aggregationSize > frameLength.
32 */
33 public float[] getSampleAmplitudes(byte[] audioBytes, int startFrame, int frameLength, int aggregationSize);
34}
Note: See TracBrowser for help on using the repository browser.