aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README1
-rw-r--r--README.RUS1
-rw-r--r--src/qmmp/CMakeLists.txt8
-rw-r--r--src/qmmp/output.cpp5
-rw-r--r--src/qmmp/outputwriter.cpp2
5 files changed, 16 insertions, 1 deletions
diff --git a/README b/README
index 5f9d69071..71ba8a94e 100644
--- a/README
+++ b/README
@@ -132,6 +132,7 @@ Available options:
- USE_SKINNED (standard skinned UI);
- USE_QSUI (simple UI);
- USE_DIR_ASSOC (inode/directory mime type association);
+- QMMP_DEFAULT_OUTPUT (default output plugin, example: -DQMMP_DEFAULT_OUTPUT=pulse).
Also you can use ccmake for changing plugins configuration.
By default program will be installed in /usr/local. You can change default path by running:
diff --git a/README.RUS b/README.RUS
index ce7d6f7b9..04cd8a730 100644
--- a/README.RUS
+++ b/README.RUS
@@ -130,6 +130,7 @@ cmake ./ -DUSE_JACK:BOOL=FALSE
- USE_SKINNED (стандартный пользовательский интерфейс);
- USE_QSUI (простой интерфейс);
- USE_DIR_ASSOC (привязка к mime-типу inode/directory);
+- QMMP_DEFAULT_OUTPUT (модуль вывода по умолчанию, пример использования: -DQMMP_DEFAULT_OUTPUT=pulse).
Также вы можете использовать ccmake для изменения конфигурации модулей.
По умолчанию программа будет установлена в /usr/local. Вы можете изменить этот путь командой:
diff --git a/src/qmmp/CMakeLists.txt b/src/qmmp/CMakeLists.txt
index 0945faa8b..813d0bd39 100644
--- a/src/qmmp/CMakeLists.txt
+++ b/src/qmmp/CMakeLists.txt
@@ -28,6 +28,14 @@ ENDIF(NOT QMMP_VERSION_STABLE)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+SET(QMMP_DEFAULT_OUTPUT "" CACHE STRING "default output plugin")
+IF(QMMP_DEFAULT_OUTPUT)
+ ADD_DEFINITIONS(-DQMMP_DEFAULT_OUTPUT=\\\"${QMMP_DEFAULT_OUTPUT}\\\")
+ MESSAGE(STATUS "Default output: ${QMMP_DEFAULT_OUTPUT}")
+ENDIF(QMMP_DEFAULT_OUTPUT)
+
+
SET(libqmmp_SRCS
visual.cpp
recycler.cpp
diff --git a/src/qmmp/output.cpp b/src/qmmp/output.cpp
index 9228a0c0e..e2474c676 100644
--- a/src/qmmp/output.cpp
+++ b/src/qmmp/output.cpp
@@ -143,7 +143,11 @@ void Output::setCurrentFactory(OutputFactory* factory)
OutputFactory *Output::currentFactory()
{
loadPlugins();
+
QSettings settings (Qmmp::configFile(), QSettings::IniFormat);
+#ifdef QMMP_DEFAULT_OUTPUT
+ QString name = settings.value("Output/current_plugin", QMMP_DEFAULT_OUTPUT).toString();
+#else
#ifdef Q_OS_LINUX
QString name = settings.value("Output/current_plugin", "alsa").toString();
#elif defined Q_WS_WIN
@@ -153,6 +157,7 @@ OutputFactory *Output::currentFactory()
#else
QString name = settings.value("Output/current_plugin", "oss4").toString();
#endif
+#endif //QMMP_DEFAULT_OUTPUT
foreach(QmmpPluginCache *item, *m_cache)
{
if (item->shortName() == name && item->outputFactory())
diff --git a/src/qmmp/outputwriter.cpp b/src/qmmp/outputwriter.cpp
index 5c542e771..d5a19d561 100644
--- a/src/qmmp/outputwriter.cpp
+++ b/src/qmmp/outputwriter.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012-2015 by Ilya Kotov *
+ * Copyright (C) 2012-2016 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *