com.groovemanager.sampled.waveform
Interface WaveFormProvider

All Known Implementing Classes:
WaveTab

public interface WaveFormProvider

A WaveFormProvider acts as a source for a WaveFormDisplay. Each time the WaveFormDisplay needs to be updated, it asks, its provider for the WaveForm.

Author:
Manu Robledo

Method Summary
 int getChannels()
          Get the channels of the audio data represented by the provider
 int getTotalLength()
          Get the total length of the audio data represented by the provider in sample frames
 WaveForm getWaveForm(AbstractWaveFormDisplay display, int start, int length, int width)
          Get a WaveForm for the specified display
 

Method Detail

getChannels

int getChannels()
Get the channels of the audio data represented by the provider

Returns:
The providerīs audio dataīs channels

getTotalLength

int getTotalLength()
Get the total length of the audio data represented by the provider in sample frames

Returns:
The providerīs audio dataīs length in sample frames

getWaveForm

WaveForm getWaveForm(AbstractWaveFormDisplay display,
                     int start,
                     int length,
                     int width)
Get a WaveForm for the specified display

Parameters:
display - The WaveFormDisplay that asks for the WaveForm
start - The start position of the WaveForm inside the source data in sample frames
length - The length of the audio data that should be represented by the WaveForm
width - The width of the resulting WaveForm.
Returns:
A WaveForm representing length sample frames of the providerīs audio data beginning at position start to be displayed in the width of width.