chatgui/chatgui-android: уведомления со звуком, флаги и прочие улучшения UI
This commit is contained in:
1 parent
6c857ceab8
commit
0f308fdbd7
20 files changed
+292
-32
No files matched your search
@@ -131,13 +131,17 @@ bool SoundManager::loadSound(const QString& name, const QString& filePath) {
|
||||
}
|
||||
|
||||
void SoundManager::play(const QString& name) {
|
||||
if (!m_enabled || !m_initialized) return;
|
||||
if (!m_enabled) return;
|
||||
if (!m_initialized) { DEBUG_WARN(DEBUG_CATEGORY_DEBUG, "SoundManager::play: not initialized"); return; }
|
||||
|
||||
EventSettings es = m_eventSettings.value(name);
|
||||
if (!es.enabled) return;
|
||||
|
||||
auto it = m_sounds.find(name);
|
||||
if (it == m_sounds.end()) return;
|
||||
if (it == m_sounds.end()) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_DEBUG, "SoundManager::play: sound '%s' not loaded", qPrintable(name));
|
||||
return;
|
||||
}
|
||||
|
||||
ma_sound* s = it->sound;
|
||||
float effectiveVolume = m_volume * es.volume;
|
||||
|
||||
Reference in new issue
Block a user