mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 20:56:41 +02:00
Merge pull request #5120 from ctrlaltdavid/20576
DO NOT MERGE - QA for #20576 - Play sound when mic is muted
This commit is contained in:
commit
7ead2bc46b
3 changed files with 14 additions and 6 deletions
|
@ -19,3 +19,4 @@ Script.load("users.js");
|
|||
Script.load("grab.js");
|
||||
Script.load("pointer.js");
|
||||
Script.load("directory.js");
|
||||
Script.load("dialTone.js");
|
||||
|
|
|
@ -11,19 +11,26 @@
|
|||
//
|
||||
|
||||
// setup the local sound we're going to use
|
||||
var connectSound = SoundCache.getSound("file://" + Paths.resources + "sounds/hello.wav");
|
||||
var disconnectSound = SoundCache.getSound("file://" + Paths.resources + "sounds/goodbye.wav");
|
||||
var connectSound = SoundCache.getSound("file:///" + Paths.resources + "sounds/hello.wav");
|
||||
var disconnectSound = SoundCache.getSound("file:///" + Paths.resources + "sounds/goodbye.wav");
|
||||
var micMutedSound = SoundCache.getSound("file:///" + Paths.resources + "sounds/goodbye.wav");
|
||||
|
||||
// setup the options needed for that sound
|
||||
var connectSoundOptions = {
|
||||
var soundOptions = {
|
||||
localOnly: true
|
||||
};
|
||||
|
||||
// play the sound locally once we get the first audio packet from a mixer
|
||||
Audio.receivedFirstPacket.connect(function(){
|
||||
Audio.playSound(connectSound, connectSoundOptions);
|
||||
Audio.playSound(connectSound, soundOptions);
|
||||
});
|
||||
|
||||
Audio.disconnected.connect(function(){
|
||||
Audio.playSound(disconnectSound, connectSoundOptions);
|
||||
Audio.playSound(disconnectSound, soundOptions);
|
||||
});
|
||||
|
||||
AudioDevice.muteToggled.connect(function () {
|
||||
if (AudioDevice.getMuted()) {
|
||||
Audio.playSound(micMutedSound, soundOptions);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -407,7 +407,7 @@ Menu::Menu() {
|
|||
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::MuteFaceTracking,
|
||||
Qt::CTRL | Qt::SHIFT | Qt::Key_F, true, // DDE face tracking is on by default
|
||||
qApp, SLOT(toggleFaceTrackerMute()));
|
||||
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::AutoMuteAudio, 0, true);
|
||||
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::AutoMuteAudio, 0, false);
|
||||
#endif
|
||||
|
||||
auto avatarManager = DependencyManager::get<AvatarManager>();
|
||||
|
|
Loading…
Reference in a new issue