diff options
Diffstat (limited to 'src/Main.cxx')
-rw-r--r-- | src/Main.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/Main.cxx b/src/Main.cxx index b45e2c3ae..2d25297c9 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -50,11 +50,12 @@ #include "IOThread.hxx" #include "fs/AllocatedPath.hxx" #include "fs/Config.hxx" +#include "fs/StandardDirectory.hxx" #include "PlaylistRegistry.hxx" #include "ZeroconfGlue.hxx" #include "DecoderList.hxx" #include "AudioConfig.hxx" -#include "pcm/PcmResample.hxx" +#include "pcm/PcmConvert.hxx" #include "Daemon.hxx" #include "system/FatalError.hxx" #include "util/Error.hxx" @@ -80,10 +81,7 @@ #include <glib.h> -#include <unistd.h> #include <stdlib.h> -#include <errno.h> -#include <string.h> #ifdef HAVE_LOCALE_H #include <locale.h> @@ -135,13 +133,9 @@ glue_mapper_init(Error &error) return false; if (music_dir.IsNull()) { - const char *path = - g_get_user_special_dir(G_USER_DIRECTORY_MUSIC); - if (path != nullptr) { - music_dir = AllocatedPath::FromUTF8(path, error); - if (music_dir.IsNull()) - return false; - } + music_dir = GetUserMusicDir(); + if (music_dir.IsNull()) + return false; } mapper_init(std::move(music_dir), std::move(playlist_dir)); @@ -372,8 +366,8 @@ int mpd_main(int argc, char *argv[]) g_thread_init(nullptr); #endif - io_thread_init(); winsock_init(); + io_thread_init(); config_global_init(); success = parse_cmdline(argc, argv, &options, error); @@ -431,7 +425,7 @@ int mpd_main(int argc, char *argv[]) archive_plugin_init_all(); #endif - if (!pcm_resample_global_init(error)) { + if (!pcm_convert_global_init(error)) { LogError(error); return EXIT_FAILURE; } @@ -544,7 +538,6 @@ int mpd_main(int argc, char *argv[]) playlist_list_global_finish(); input_stream_global_finish(); audio_output_all_finish(); - volume_finish(); mapper_finish(); delete instance->partition; command_finish(); @@ -554,7 +547,6 @@ int mpd_main(int argc, char *argv[]) archive_plugin_deinit_all(); #endif config_global_finish(); - stats_global_finish(); io_thread_deinit(); SignalHandlersFinish(); delete instance; |