GithubHelp home page GithubHelp logo

mutebackgroundwindowshelper's Introduction

因为刷的游戏比如崩铁,mumu模拟器,以及一众黄油,都没有“最小化时静音”的选项,导致切窗口后声音还在,体验不够好
所以有了这个小工具。

使用方法:
【下载程序后,在同一级文件夹下自己创建一个文件,并命名为“Background Mute Windows List.json”,
里面的内容按我上传的那个来修改,在保存后运行程序,在系统托盘图标上右键启动】

借用原生win32模板的消息机制,用于添加托盘图标去操控。 使用cjson读取预设文件。

核心就是两个线程函数:
1.获取进程pid后,通过windows的音量合成器接口去静音单独的进程。
2.获取置顶窗口pid并匹配预设,解除静音,同时静音其他预设进程。

可能的问题: 1.暂时未添加进程存活确认机制,目标进程关闭后pid不会及时更新,原音量接口会失效。
2.json文件编码使用utf8或ansi,会不会出现读取错误的问题我没有确认过

暂时的解决方案:
1.右键托盘图标,手动停止后再启动,会重新读取预设文件再获取进程pid。
2.手动修改json文件编码

mutebackgroundwindowshelper's People

Contributors

o5-11 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.