45 lines
999 B
Java
45 lines
999 B
Java
package nodomain.freeyourgadget.gadgetbridge.entities;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* Created by Nicolò Balzarotti on 10/9/17.
|
|
*/
|
|
|
|
public enum AudioEffectType {
|
|
// Volume
|
|
VOLUME(0, 0),
|
|
// Equalizer
|
|
EQ(10, 0),
|
|
// Effects
|
|
ECHO(20, 1), REVERB(21, 2), NOISEMASK(22, 3), FUZZ(23, 4),
|
|
// TAPE(24, 5), // disabled in real app too, probably not implemented
|
|
FLANGE(26, 7),
|
|
CHORUS(27, 8),
|
|
BITCRUSHER(28, 9),
|
|
BASSBOOST(29, 10);
|
|
|
|
private final int key;
|
|
private final int effect_id;
|
|
|
|
public int getKey() { return key; }
|
|
|
|
public int getId() { return effect_id; }
|
|
|
|
AudioEffectType(int key, int effect_id) {
|
|
this.key = key;
|
|
this.effect_id = effect_id;
|
|
}
|
|
|
|
public static AudioEffectType getByEffectId(int id) {
|
|
for (AudioEffectType e : AudioEffectType.values()) {
|
|
if (e.effect_id == id) {
|
|
return e;
|
|
}
|
|
}
|
|
return null;// not found
|
|
}
|
|
}
|
|
|