mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Attempt to fix certain ping sound issues on Arch Linux (#4285)
This commit is contained in:
parent
9255374720
commit
d5a0420f74
|
@ -106,12 +106,15 @@ void NotificationController::playSound()
|
|||
getSettings()->notificationPathSound.getValue())
|
||||
: QUrl("qrc:/sounds/ping2.wav");
|
||||
|
||||
if (currentPlayerUrl != highlightSoundUrl)
|
||||
// Set media if the highlight sound url has changed, or if media is buffered
|
||||
if (currentPlayerUrl != highlightSoundUrl ||
|
||||
player->mediaStatus() == QMediaPlayer::BufferedMedia)
|
||||
{
|
||||
player->setMedia(highlightSoundUrl);
|
||||
|
||||
currentPlayerUrl = highlightSoundUrl;
|
||||
}
|
||||
|
||||
player->play();
|
||||
}
|
||||
|
||||
|
|
|
@ -234,8 +234,9 @@ void SharedMessageBuilder::triggerHighlights()
|
|||
{
|
||||
if (auto player = getPlayer())
|
||||
{
|
||||
// update the media player url if necessary
|
||||
if (currentPlayerUrl != this->highlightSoundUrl_)
|
||||
// Set media if the highlight sound url has changed, or if media is buffered
|
||||
if (currentPlayerUrl != this->highlightSoundUrl_ ||
|
||||
player->mediaStatus() == QMediaPlayer::BufferedMedia)
|
||||
{
|
||||
player->setMedia(this->highlightSoundUrl_);
|
||||
|
||||
|
|
Loading…
Reference in a new issue