Repository navigation
Mute the Windows output while streaming its audio and sync its volume - #13
Merged
Merged
Conversation
WASAPI loopback still captures a muted device, before its master volume is applied, so the host mutes the default output for the session: the PC stays quiet and the tablet gets full-level audio. The volume slider now follows the tablet's volume and the other way round. The output gets its volume back and is unmuted when capture stops; the state before is saved in the registry first and restored on the next start if the host crashed. Unmuting by hand keeps local playback; a slider move that unmutes the device is undone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows had no counterpart of the Linux `ezdisplay` sink: the PC kept playing the audio and the volume was not synced. This PR takes the driverless route, since a virtual audio driver needs kernel attestation signing.
IAudioEndpointVolumemaster scalar, polled every 100 ms in the capture thread) syncs with the tablet in both directions. As on Linux, the client's volume wins at start. This PC's mute is in use, so the tablet's mute flag is only echoed back.HKCU\Software\LibreStatic\ezdisplay\SavedAudioOutput;HostService::start_withrestores it if the host crashed.docs/architecture.mdare updated.Verification
cargo clippy --target x86_64-pc-windows-msvc -p ezd-host-windows -p ezd-host-service --no-default-features -- -D warnings