earswideopen / ewo-core

Open source hearing aid system
http://earswideopen.net
GNU General Public License v2.0
7 stars 3 forks source link

Add a config file #9

Closed mattberjon closed 8 years ago

mattberjon commented 8 years ago

It could be interesting to load some default parameters through a configuration file and be able to store the user parameters set in another file (presets).

mattberjon commented 8 years ago

The syntax of the config file could be YAML, JSON or XML. It would be interesting to compare the different existing library to pick up one and stick to it. The config file would be used to load the default configuration and save/load presets.

mattberjon commented 8 years ago

XML is definitely too verbose and hard to read by a human. INI files are very nice but because the idea will be to handle complex configuration files (parameters of all the plugins/processing modules). The choice were YAML or JSON. I decided to try JSON because it's well documented, it exists libraries for almost any language and used heavily these days.

mattberjon commented 8 years ago

A JSON parser has been added using the library yajl. It's possible to change the parameters related to the audio device using a configuration file. You can refer to the following main commits: 3d6898204afcb4c82f2d06d5286372d98e65670e 6b204c55129884046ef65a98e24ee3cfbd805759 f1387db68a55b3fd3ee223a578cb87c2d63fa818