diff options
Diffstat (limited to 'test/RunChromaprint.cxx')
-rw-r--r-- | test/RunChromaprint.cxx | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/test/RunChromaprint.cxx b/test/RunChromaprint.cxx index ab68d2aa4..dcbd75d2e 100644 --- a/test/RunChromaprint.cxx +++ b/test/RunChromaprint.cxx @@ -17,9 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "config/File.hxx" -#include "config/Migrate.hxx" -#include "config/Data.hxx" +#include "ConfigGlue.hxx" #include "tag/Chromaprint.hxx" #include "pcm/PcmConvert.hxx" #include "event/Thread.hxx" @@ -90,18 +88,13 @@ ParseCommandLine(int argc, char **argv) } class GlobalInit { - ConfigData config; + const ConfigData config; EventThread io_thread; public: - GlobalInit(Path config_path, bool verbose) { - SetLogThreshold(verbose ? LogLevel::DEBUG : LogLevel::INFO); - - if (!config_path.IsNull()) { - ReadConfigFile(config, config_path); - Migrate(config); - } - + explicit GlobalInit(Path config_path) + :config(AutoLoadConfigFile(config_path)) + { io_thread.Start(); input_stream_global_init(config, @@ -245,7 +238,8 @@ int main(int argc, char **argv) try { const auto c = ParseCommandLine(argc, argv); - const GlobalInit init(c.config_path, c.verbose); + SetLogThreshold(c.verbose ? LogLevel::DEBUG : LogLevel::INFO); + const GlobalInit init(c.config_path); const DecoderPlugin *plugin = decoder_plugin_from_name(c.decoder); if (plugin == nullptr) { |