mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +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 <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);
|
||||||
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user