8000 GitHub - yume-chan/VolumeManager: Control each app's volume independently.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yume-chan/VolumeManager

Repository files navigation

Volume Manager

Work in progress

Control each app's volume independently. Shizuku is used to access privileged APIs.

Requires Android 13.

Screenshot

Download

Latest development version can be downloaded from action artifacts.

Some hand-picked versions can also be downloaded from releases.

Usage

  1. Install and enable Shizuku
  2. Launch Volume Manager and request Shizuku permission
  3. It should automatically enable its accessibility service
  4. You can change volume either from
    1. The main interface
    2. Press any volume button and a popup should appear, completely replace the default volume popup
    3. Enable accessibility button and click the button

This app uses hidden API to directly change each audio stream's volume.

SoundMaster uses MediaProjection API to record audio from each app and apply post-effects.

Feature Volume Manager SoundMaster
Minimal Android version 13 10
Control volume of each app
Set output device for each app 1
Change left-right balance 2
Equalizer (EQ)
Control protected apps 3
Zero latency added

1: There are APIs to do that, but not implemented in this app

2: There are other APIs to do that, but not implemented in this app

3: Can be worked around by patching the app

How does it work

  1. Use AudioManager#getActivePlaybackConfigurations() to get list of AudioPlaybackConfiguration.

    Each AudioPlaybackConfiguration represents a audio player, like AudioTrack and MediaPlayer

  2. Use ActivityManager#getRunningAppProcesses() and PackageManager#getApplicationInfo() to map and group AudioPlaybackConfiguration#getClientPid() to apps

  3. Use AudioPlaybackConfiguration#getPlayerProxy() and IPlayer.setVolume() to update the internal volume multiplier

  4. Use AudioManager#registerAudioPlaybackCallback() to listen for new AudioPlaybackConfigurations and apply current volume to them.

Note

This app uses the same API as MIUI's "Adjust media sound in multiple apps". Because this API can only setting volume, not reading, the volume set by one app will not be reflected in the other one.

0