- java.lang.Object
-
- java.lang.Enum<CsvDeltaMode>
-
- org.refcodes.audio.CsvDeltaMode
-
- All Implemented Interfaces:
Serializable
,Comparable<CsvDeltaMode>
public enum CsvDeltaMode extends Enum<CsvDeltaMode>
TheCsvDeltaMode
defines for which values of aSoundSample
only the delta between the currentSoundSample
being written and the previousSoundSample
being written are written to the next row of the CSV file.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL
Delta for all applicable values: Write only the changes for all values between the previousSoundSample
and the currentSoundSample
to the next CSV row.NONE
Always write the fullSoundSample
's value to the next CSV row.SAMPLE_DATA
Delta only for the channels' sample data: Write only the changes regarding the previousSoundSample
's sample data and the currentSoundSample
's sample data to the next CSV row.SAMPLING_RATE
Delta only for the sampling rate: Write only the changes regarding the previousSoundSample
's sample rate and the currentSoundSample
's rate to the next CSV row.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSampleDataDelta()
Determines whether to write only the sampling data's deltas per row or explicitly the sampling data to each row, even when it does not change.boolean
isSamplingRateDelta()
Determines whether to write only the sampling rate's deltas per row or explicitly the sampling rate to each row, even when it does not change.static CsvDeltaMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static CsvDeltaMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALL
public static final CsvDeltaMode ALL
Delta for all applicable values: Write only the changes for all values between the previousSoundSample
and the currentSoundSample
to the next CSV row.
-
SAMPLING_RATE
public static final CsvDeltaMode SAMPLING_RATE
Delta only for the sampling rate: Write only the changes regarding the previousSoundSample
's sample rate and the currentSoundSample
's rate to the next CSV row. Recommended when you are working with a fixed sampling rate.
-
SAMPLE_DATA
public static final CsvDeltaMode SAMPLE_DATA
Delta only for the channels' sample data: Write only the changes regarding the previousSoundSample
's sample data and the currentSoundSample
's sample data to the next CSV row.
-
NONE
public static final CsvDeltaMode NONE
Always write the fullSoundSample
's value to the next CSV row. May produce some redundancy overhead.
-
-
Method Detail
-
values
public static CsvDeltaMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CsvDeltaMode c : CsvDeltaMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CsvDeltaMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isSamplingRateDelta
public boolean isSamplingRateDelta()
Determines whether to write only the sampling rate's deltas per row or explicitly the sampling rate to each row, even when it does not change.- Returns:
- True when only the deltas of the sampling rate are to be written, else false.
-
isSampleDataDelta
public boolean isSampleDataDelta()
Determines whether to write only the sampling data's deltas per row or explicitly the sampling data to each row, even when it does not change.- Returns:
- True when only the deltas of the sampling data are to be written, else false.
-
-