|
Sharkysoft home | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
PcmWaveFormatChunk | Format chunk for Microsoft PCM .wav files. |
PcmWaveStreamReader | Reads standard Microsoft PCM .wav file. |
PcmWaveStreamWriter | Writes standard Microsoft PCM wave files. |
RIFF_WAVE | RIFF-wave file constants. |
WaveAdtlChunkReader | Parses associated data list chunk. |
WaveCuePoint | Single cue point from cue points chunk. |
WaveCuePointList | Parses cue point list. |
WaveFormatChunk | Base format chunk. |
WaveSampleClipper | Clips wave sample data. |
WaveSampleConverter | Casts samples from one type to another. |
WaveSampleRounder | Rounds wave sample data. |
WaveStreamReader | Base class for all .wav stream decoders. |
WaveStreamWriter | Base class for .wav file encoders. |
Wave file processing.
Details: This package contains classes for reading and writing RIFF-
Detailed information on the RIFF-
The method names and related documentation in this package differentiate between the terms (regular) samples and channel samples. A channel sample is considered to be a single measurement of a single channel at a single point in time. A (regular) "sample," however, without the "channel" qualification, refers to the set of samples taken from all channels at the same time. For single channel audio files, of course, there is no difference. The main reason for making this distinction is to avoid ambiguity when discussing bits per sample, sample rate, etc.
In methods that read, write, or convert sample data, samples are stored in arrays of byte
s, short
s, int
s, long
s, float
s, and double
s. The sample array's primitive type implies the sample resolution of the data stored in the arrays. Each method that can reasonably be expected to do so is able to produce and consume each of these array types, even if the .wav file being processed has a fixed resolution. (Samples are automatically converted if necessary.) The resolution represented by each array types is described in the following table:
array type | resolution | minimum value | maximum value |
---|---|---|---|
byte[] | 8-bit samples |
0
|
255
|
short[] | 16-bit samples |
-32768
Short.MIN_VALUE
|
32767
Short.MIN_VALUE
|
int[] | 32-bit samples |
-2147483648
Integer.MIN_VALUE
|
+2147483647
Integer.MAX_VALUE
|
long[] | 64-bit samples |
-9223372036854775808
Long.MIN_VALUE
|
-9223372036854775807
Long.MAX_VALUE
|
float[] | real-valued samples | -1.0 | +1.0 |
double[] | real-valued samples | -1.0 | +1.0 |
When samples are converted from one integer resolution to another integer resolution, simple bit shifting is used. When samples are converted from a real resolution to an integer resolution, the real values are multiplied by the integer resolution's maximum value. When samples are converted from an integer resolution to a real resolution, the values are divided by the integer resolution's maximum value.
If this wave source contains multiple channels, the individual channel samples are interleaved.
|
Sharkysoft home | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |