diff options
author | Minijackson <minijackson@riseup.net> | 2018-10-17 15:55:42 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-10-17 15:55:42 +0200 |
commit | df5fc6f82071f5eb2d28a9cedb2bd4e5133090b1 (patch) | |
tree | 824a76c499cf1674db0525e3fe82ab48c34d1889 | |
parent | 10c04fab9aab651cc525ff777bab5f27805c493d (diff) | |
download | set_eq-df5fc6f82071f5eb2d28a9cedb2bd4e5133090b1.tar.gz set_eq-df5fc6f82071f5eb2d28a9cedb2bd4e5133090b1.zip |
Add dB test + long awaited README
-rw-r--r-- | README.md | 36 | ||||
-rw-r--r-- | src/parsing/mod.rs | 2 | ||||
-rw-r--r-- | src/utils.rs | 13 |
3 files changed, 51 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..7902bae --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,36 @@ | |||
1 | # set_eq: A command-line tool to manipulate PulseAudio's equalizers | ||
2 | |||
3 | This tool will allow you to use a configuration file to send to your favorite | ||
4 | PulseAudio's equalizer. | ||
5 | |||
6 | It was originally made to work with | ||
7 | [AutoEq](https://github.com/jaakkopasanen/AutoEq)'s | ||
8 | [database](https://github.com/jaakkopasanen/AutoEq/tree/master/results), but if | ||
9 | you have ideas on how to extend `set_eq`'s domain, please start a discussion in | ||
10 | a new issue! | ||
11 | |||
12 | Supported configuration format: | ||
13 | |||
14 | - EqualizerAPO (very partial) | ||
15 | |||
16 | Supported equalizer: | ||
17 | |||
18 | - PulseAudio's built-in equalizer (deprecated and buggy, should not use) | ||
19 | - PulseEffects | ||
20 | |||
21 | ## Quick start | ||
22 | |||
23 | - Install [PulseEffects](https://github.com/wwmm/pulseeffects) | ||
24 | - Find or create an EqualizerAPO configuration file | ||
25 | - If you have a some headphones, try to find it | ||
26 | [here](https://github.com/jaakkopasanen/AutoEq/tree/master/results) | ||
27 | and either download the `<headphone> GraphicEQ.txt` file or save the | ||
28 | EqualizerAPO snippet from the README | ||
29 | - Run the following command: | ||
30 | |||
31 | ``` | ||
32 | set_eq pa-effects export-preset <EqualizerAPO file> > MyPreset.json | ||
33 | ``` | ||
34 | |||
35 | - Load the new preset in PulseEffects' interface | ||
36 | - Profit! | ||
diff --git a/src/parsing/mod.rs b/src/parsing/mod.rs index 3aedb2c..4454b04 100644 --- a/src/parsing/mod.rs +++ b/src/parsing/mod.rs | |||
@@ -2,3 +2,5 @@ | |||
2 | pub mod equalizer_apo; | 2 | pub mod equalizer_apo; |
3 | 3 | ||
4 | pub use self::equalizer_apo::MainParser as EqualizerApoParser; | 4 | pub use self::equalizer_apo::MainParser as EqualizerApoParser; |
5 | |||
6 | // TODO: test parsing filters with real examples | ||
diff --git a/src/utils.rs b/src/utils.rs index 24df0ce..b966a3b 100644 --- a/src/utils.rs +++ b/src/utils.rs | |||
@@ -85,3 +85,16 @@ fn introspect(conn: &dbus::ConnPath<&Connection>) { | |||
85 | println!("{}", thing.iter_init().read::<String>().unwrap()); | 85 | println!("{}", thing.iter_init().read::<String>().unwrap()); |
86 | } | 86 | } |
87 | */ | 87 | */ |
88 | |||
89 | #[cfg(test)] | ||
90 | mod tests { | ||
91 | |||
92 | #[test] | ||
93 | fn decibel_to_ratio() { | ||
94 | assert_eq!(super::decibel_to_ratio(0f64), 1f64); | ||
95 | assert_eq!(super::decibel_to_ratio(20f64), 10f64); | ||
96 | assert_eq!(super::decibel_to_ratio(40f64), 100f64); | ||
97 | assert_eq!(super::decibel_to_ratio(60f64), 1000f64); | ||
98 | } | ||
99 | |||
100 | } | ||