refs #335, added functions for windows platform / mixer

This commit is contained in:
Klaus Basan
2014-10-22 14:39:00 +02:00
committed by Roland Winklmeier
parent e1647cd8fd
commit 11521b2f47
4 changed files with 23 additions and 1 deletions

View File

@@ -26,6 +26,7 @@
#include <QtNetwork/QHostInfo> #include <QtNetwork/QHostInfo>
#include <QProcessEnvironment> #include <QProcessEnvironment>
#include <QSysInfo> #include <QSysInfo>
#include <QProcess>
/* /*
* Metadata for Math * Metadata for Math
@@ -487,3 +488,10 @@ const QString &BlackMisc::localHostNameEnvVariable()
QProcessEnvironment::systemEnvironment().value("HOSTNAME")); QProcessEnvironment::systemEnvironment().value("HOSTNAME"));
return hostName; return hostName;
} }
bool BlackMisc::Audio::startWindowsMixer()
{
QStringList parameterlist;
return QProcess::startDetached("SndVol.exe", parameterlist);
}

View File

@@ -78,6 +78,9 @@ namespace BlackMisc
{ {
//! Register metadata for audio / voice //! Register metadata for audio / voice
void registerMetadata(); void registerMetadata();
//! Start the Windows mixer
bool startWindowsMixer();
} }
namespace Hardware namespace Hardware

View File

@@ -155,7 +155,15 @@ namespace BlackMisc
#endif #endif
} }
bool CProject::isRunningOnWindowsNtPlatform()
{
#ifdef Q_OS_WIN
// QSysInfo::WindowsVersion only available on Win platforms
return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) ? true : false;
#elif
return false;
#endif
}
int CProject::getMajorMinor(int index) int CProject::getMajorMinor(int index)
{ {

View File

@@ -72,6 +72,9 @@ namespace BlackMisc
//! Release build? //! Release build?
static bool isReleaseBuild(); static bool isReleaseBuild();
//! Running on Windows NT platform?
static bool isRunningOnWindowsNtPlatform();
private: private:
//! Constructor //! Constructor
CProject() {} CProject() {}