2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add sound override support by codes in Settings.

This commit is contained in:
John Preston
2017-05-08 12:08:24 +03:00
parent 23874a0a26
commit 530a385d4e
7 changed files with 100 additions and 26 deletions

View File

@@ -73,7 +73,7 @@ void Instance::playSound(Sound sound) {
case Sound::Busy: {
if (!_callBusyTrack) {
_callBusyTrack = Media::Audio::Current().createTrack();
_callBusyTrack->fillFromFile(qsl(":/sounds/call_busy.mp3"));
_callBusyTrack->fillFromFile(AuthSession::Current().data().getSoundPath(qsl("call_busy")));
}
_callBusyTrack->playOnce();
} break;
@@ -81,7 +81,7 @@ void Instance::playSound(Sound sound) {
case Sound::Ended: {
if (!_callEndedTrack) {
_callEndedTrack = Media::Audio::Current().createTrack();
_callEndedTrack->fillFromFile(qsl(":/sounds/call_end.mp3"));
_callEndedTrack->fillFromFile(AuthSession::Current().data().getSoundPath(qsl("call_end")));
}
_callEndedTrack->playOnce();
} break;
@@ -89,7 +89,7 @@ void Instance::playSound(Sound sound) {
case Sound::Connecting: {
if (!_callConnectingTrack) {
_callConnectingTrack = Media::Audio::Current().createTrack();
_callConnectingTrack->fillFromFile(qsl(":/sounds/call_connect.mp3"));
_callConnectingTrack->fillFromFile(AuthSession::Current().data().getSoundPath(qsl("call_connect")));
}
_callConnectingTrack->playOnce();
} break;