| 938 | } |
| 939 | } |
| 940 | void Window::onAllSoundsFinished() |
| 941 | { |
| 942 | if (!Globals::gSettings.pushToTalkKeys.empty()) |
| 943 | { |
| 944 | Globals::gHotKeys.releaseKeys(Globals::gSettings.pushToTalkKeys); |
| 945 | } |
| 946 | |
| 947 | #if defined(__linux__) |
| 948 | if (Globals::gAudioBackend) |
| 949 | { |
| 950 | if (Globals::gSettings.muteDuringPlayback) |
| 951 | { |
| 952 | if (!Globals::gAudioBackend->muteInput(false)) |
| 953 | { |
| 954 | onError(Enums::ErrorCode::FailedToMute); |
| 955 | } |
| 956 | } |
| 957 | if (Globals::gAudioBackend->currentlyPassedThrough().empty()) |
| 958 | { |
| 959 | if (!Globals::gAudioBackend->stopSoundInput()) |
| 960 | { |
| 961 | onError(Enums::ErrorCode::FailedToMoveBack); |
| 962 | } |
| 963 | } |
| 964 | } |
| 965 | #elif defined(_WIN32) |
| 966 | if (Globals::gSettings.muteDuringPlayback) |
| 967 | { |
| 968 | if (Globals::gWinSound && Globals::gWinSound->getMic()) |
| 969 | { |
| 970 | if (!Globals::gWinSound->getMic()->mute(false)) |
| 971 | { |
| 972 | onError(Enums::ErrorCode::FailedToMute); |
| 973 | } |
| 974 | } |
| 975 | } |
| 976 | #endif |
| 977 | } |
| 978 | void Window::onSoundPlayed([[maybe_unused]] const PlayingSound &sound) |
| 979 | { |
| 980 | if (!Globals::gSettings.pushToTalkKeys.empty()) |
nothing calls this directly
no test coverage detected