Serializable
, Comparable<SamplingRate>
public enum SamplingRate extends Enum<SamplingRate>
SamplingRate
enumeration defines some common sampling rates. Use
getLowestSamplingRate()
for the lowest sampling rate and
getHigestSamplingRate()
for the highest sampling rate. On a
SamplingRate
instance, use getNextHigherSamplingRate()
for
the next higher sampling rate and getPreviousLowerSamplingRate()
for
the previous lower sampling rate. See
"https://github.com/audiojs/sample-rate"Enum Constant | Description |
---|---|
AUDIO_CD |
44,100 Hz: Audio CD, most commonly used rate with MPEG-1 audio (VCD,
SVCD, MP3).
|
DVD_AUDIO |
96,000 Hz: DVD-Audio, LPCM DVD tracks, Blu-ray audio tracks, HD DVD audio
tracks.
|
EXTREME |
352,800 Hz Digital eXtreme Definition.
|
HDC |
176,400 Hz: Used in HDCD recorders and other professional applications
for CD production.
|
HIGH_PROFESSIONAL |
192,000 Hz: Used with audio on professional video equipment.
|
HIGHER_PROFESSIONAL |
88,200 Hz: Used by some professional recording equipment when the
destination is CD, such as mixers, EQs, compressors, reverb, crossovers
and recording devices.
|
HIGHEST |
384,000 Hz: Highest sample rate available for common software.
|
LOW_PCM |
22,050 Hz: Used for lower-quality PCM and MPEG audio and for audio
analysis of low frequency energy.
|
LOWEST_PCM |
11,025 Hz Used for lower-quality PCM, MPEG audio and for audio analysis
of subwoofer bandpasses.
|
PROFESSIONAL |
48,000 Hz: Standard sampling rate used by professional digital video
equipment, could reconstruct frequencies up to 22 kHz.
|
TELEPHONE |
8,000 Hz: Adequate for human speech but without sibilance.
|
VOICE_OVER_IP |
16,000 Hz: Used in most VoIP and VVoIP, extension of telephone
narrowband.
|
Modifier and Type | Method | Description |
---|---|---|
static SamplingRate |
getHigestSamplingRate() |
Retrieves the highest sampling rate.
|
static SamplingRate |
getLowestSamplingRate() |
Retrieves the lowest sampling rate.
|
SamplingRate |
getNextHigherSamplingRate() |
Retrieves the next higher sampling rate or null if it is already the
highest sampling rate.
|
SamplingRate |
getPreviousLowerSamplingRate() |
Retrieves the previous lower sampling rate or null if it is already the
lowest sampling rate.
|
int |
getSamplesPerSecond() |
Returns the sampling rate in samples per second.
|
static SamplingRate |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static SamplingRate[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SamplingRate TELEPHONE
public static final SamplingRate LOWEST_PCM
public static final SamplingRate VOICE_OVER_IP
public static final SamplingRate LOW_PCM
public static final SamplingRate AUDIO_CD
public static final SamplingRate PROFESSIONAL
public static final SamplingRate HIGHER_PROFESSIONAL
public static final SamplingRate DVD_AUDIO
public static final SamplingRate HDC
public static final SamplingRate HIGH_PROFESSIONAL
public static final SamplingRate EXTREME
public static final SamplingRate HIGHEST
public static SamplingRate[] values()
for (SamplingRate c : SamplingRate.values()) System.out.println(c);
public static SamplingRate valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getSamplesPerSecond()
SamplingRate
.public static SamplingRate getLowestSamplingRate()
public static SamplingRate getHigestSamplingRate()
public SamplingRate getNextHigherSamplingRate()
public SamplingRate getPreviousLowerSamplingRate()
Copyright © 2021. All rights reserved.