25 QSoundEffect *effect = m_effects.value(notification,
nullptr);
28 if (!m_playingEffect && effect->isLoaded() && !effect->isPlaying())
30 const int currentEffect = ++m_playingEffectCounter;
31 const qreal v = volume / 100.0f;
32 m_playingEffect = effect;
39 if (!myself || !m_playingEffect)
43 if (currentEffect != m_playingEffectCounter)
47 m_playingEffect->stop();
55 if (directory == m_directory && !m_effects.
isEmpty())
59 m_directory = directory;
61 const QStringList types = QSoundEffect::supportedMimeTypes();
64 this->updateEffect(CNotificationSounds::NotificationLogin, directory,
"login.wav");
65 this->updateEffect(CNotificationSounds::NotificationLogoff, directory,
"logoff.wav");
66 this->updateEffect(CNotificationSounds::NotificationTextMessageFrequency, directory,
"frequencymessage.wav");
67 this->updateEffect(CNotificationSounds::NotificationTextMessagePrivate, directory,
"privatemessage.wav");
68 this->updateEffect(CNotificationSounds::NotificationTextMessageSupervisor, directory,
"supervisormessage.wav");
69 this->updateEffect(CNotificationSounds::NotificationTextMessageUnicom, directory,
"unicommessage.wav");
70 this->updateEffect(CNotificationSounds::NotificationTextCallsignMentioned, directory,
"callsignmentioned.wav");
71 this->updateEffect(CNotificationSounds::PTTClickKeyDown, directory,
"pttclick.wav");
72 this->updateEffect(CNotificationSounds::PTTClickKeyUp, directory,
"pttclick.wav");
75 this->updateEffect(CNotificationSounds::AFVClicked, directory,
Samples::fnClick());
120 connect(effect, &QSoundEffect::playingChanged,
this, &CNotificationPlayer::onPlayingChanged,