source: trunk/src_apollo/org/apollo/gui/WaveFormRenderer.java@ 315

Last change on this file since 315 was 315, checked in by bjn8, 16 years ago

Apollo spin-off added

File size: 1006 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 dependant.
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 amount of frames to consider for rendering.
25 *
26 * @param aggregationSize
27 * The amout 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.