mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
refs #335, added functions for windows platform / mixer
This commit is contained in:
committed by
Roland Winklmeier
parent
e1647cd8fd
commit
11521b2f47
@@ -26,6 +26,7 @@
|
||||
#include <QtNetwork/QHostInfo>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QSysInfo>
|
||||
#include <QProcess>
|
||||
|
||||
/*
|
||||
* Metadata for Math
|
||||
@@ -487,3 +488,10 @@ const QString &BlackMisc::localHostNameEnvVariable()
|
||||
QProcessEnvironment::systemEnvironment().value("HOSTNAME"));
|
||||
return hostName;
|
||||
}
|
||||
|
||||
|
||||
bool BlackMisc::Audio::startWindowsMixer()
|
||||
{
|
||||
QStringList parameterlist;
|
||||
return QProcess::startDetached("SndVol.exe", parameterlist);
|
||||
}
|
||||
|
||||
@@ -78,6 +78,9 @@ namespace BlackMisc
|
||||
{
|
||||
//! Register metadata for audio / voice
|
||||
void registerMetadata();
|
||||
|
||||
//! Start the Windows mixer
|
||||
bool startWindowsMixer();
|
||||
}
|
||||
|
||||
namespace Hardware
|
||||
|
||||
@@ -155,7 +155,15 @@ namespace BlackMisc
|
||||
#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)
|
||||
{
|
||||
|
||||
@@ -72,6 +72,9 @@ namespace BlackMisc
|
||||
//! Release build?
|
||||
static bool isReleaseBuild();
|
||||
|
||||
//! Running on Windows NT platform?
|
||||
static bool isRunningOnWindowsNtPlatform();
|
||||
|
||||
private:
|
||||
//! Constructor
|
||||
CProject() {}
|
||||
|
||||
Reference in New Issue
Block a user