mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Ref T730, adjusted audio settings for new notification sounds
* utility functions, find most appropriate file * PTT blocked, removed voice rooms
This commit is contained in:
committed by
Mat Sutcliffe
parent
e33e06b21e
commit
b207c9c944
@@ -11,7 +11,9 @@
|
||||
#include <QChar>
|
||||
#include <QtGlobal>
|
||||
#include <QStringBuilder>
|
||||
#include <QDir>
|
||||
|
||||
#include "blackmisc/directoryutils.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
|
||||
using namespace BlackMisc::Audio;
|
||||
@@ -55,6 +57,22 @@ namespace BlackMisc
|
||||
m_notificationSoundDir = d;
|
||||
}
|
||||
|
||||
const QString &CSettings::getNotificationSoundDirectoryOrDefault() const
|
||||
{
|
||||
if (!m_notificationSoundDir.isEmpty())
|
||||
{
|
||||
const QDir d(m_notificationSoundDir);
|
||||
if (d.exists()) { return m_notificationSoundDir; }
|
||||
}
|
||||
return CDirectoryUtils::soundFilesDirectory();
|
||||
}
|
||||
|
||||
QString CSettings::getNotificationFilePath(const QString &fileName) const
|
||||
{
|
||||
if (fileName.isEmpty()) { return {}; }
|
||||
return CFileUtils::soundFilePathOrDefaultPath(m_notificationSoundDir, fileName);
|
||||
}
|
||||
|
||||
void CSettings::setNotificationVolume(int volume)
|
||||
{
|
||||
m_notificationVolume = volume;
|
||||
|
||||
Reference in New Issue
Block a user