Skip to content

Audio Share can share Windows/Linux computer's audio to Android phone over network, so your phone becomes the speaker of computer.

License

Notifications You must be signed in to change notification settings

BoddepallyVenkatesh06/Audio-Sharing-Web-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio Share

metadata/en-US/images/icon.png

GitHub release (latest SemVer) F-Droid GitHub license FOSSA Status GitHub Release Date GitHub last commit GitHub contributors GitHub commit activity GitHub Repo stars GitHub forks GitHub watchers GitHub language count GitHub top language GitHub repo size GitHub all releases Download Audio Share GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests Release

Download Audio Share

Audio Share can share Windows/Linux computer's audio to Android phone over network, so your phone becomes the speaker of computer. (You needn't buy a new speaker😄.)

Screenshots

docs/img/show_01.png

metadata/en-US/images/phoneScreenshots/1.png  metadata/en-US/images/phoneScreenshots/2.png

Requirements

Usage for Windows GUI

  • Download APK file and AudioShareServer.exe from latest release.
  • Open the AudioShareServer.exe on your computer. The default arguments may work well. But you may still have to check the "Host" part. It's normally the LAN address, such as 192.168.3.2. Make sure your phone can connect your computer over this IP address. Then Click "Start Server" button.
  • Install APK to your phone and open it. Modify the "Host" part to make sure it's same as the value of previous step, such as 192.168.3.2. Click "â–¶" button and enjoy the audio🎶.

Caution!!!: This app doesn't support auto reconnecting feature at present. Once the app is killed or disconnected by Android power saver, the audio playing will be stop. Adding app to the whitelist of power saver is recommended. To do this, you can press "Request Ignore Battery Optimizations" on app's Settings.

Usage for Windows/Linux CMD

  • Download the audio-share-server-cmd-windows.zip for Windows, the audio-share-server-cmd-linux.tar.gz for Linux.
  • Uncompress the archive file.
  • Find the LAN address of your computer, such as 192.168.3.2. Then run as-cmd -b 192.168.3.2 to start the server. It will use the default port 65530 and select a default audio endpoint.
  • The Windows will ask you to add firewall rules automatically while Linux won't. So if your Linux distribution enables firewall, you need to configure firewall manually.
  • Install APK to your phone and open it. Modify the "Host" part to make sure it's same as the value of previous step, such as 192.168.3.2. Click "â–¶" button and enjoy the audio🎶.

Configure Firewall Rules on Linux

Add rules

address=192.168.3.2 # change it.
port=65530 # change it.
sudo firewall-cmd --add-rich-rule="rule family=ipv4 destination address=$address port port=$port protocol=tcp accept"
sudo firewall-cmd --add-rich-rule="rule family=ipv4 destination address=$address port port=$port protocol=udp accept"
sudo firewall-cmd --runtime-to-permanent

Check rules

sudo firewall-cmd --list-rich-rules

Output:

rule family="ipv4" destination address="192.168.3.2" port port="65530" protocol="tcp" accept
rule family="ipv4" destination address="192.168.3.2" port port="65530" protocol="udp" accept

Remove rules

address=192.168.3.2 # change it.
port=65530 # change it.
sudo firewall-cmd --remove-rich-rule="rule family=ipv4 destination address=$address port port=$port protocol=tcp accept"
sudo firewall-cmd --remove-rich-rule="rule family=ipv4 destination address=$address port port=$port protocol=udp accept"
sudo firewall-cmd --runtime-to-permanent

About Audio Format

There are two kinds of audio format:

  • Capture audio format
  • Transfer audio format

The transfer audio format is uncompressed PCM data and keep same with capture audio format.

You can open server.log to see the capture audio format.

[2024-02-11 22:27:33.019] [server] [info] AudioFormat:
format_tag: 3
channels: 2
sample_rate: 192000
bits_per_sample: 32

As shown above, the format is 32 bit float, the channel count is 2, and sample rate is 192kHz.

On Windows, the capture audio format is the default value given by Windows Core Audio APIs. It seems like always be 32 bit float. The sample rate is affected by audio endpoint format. You may change it by setting System Sounds Panel(mmsys.cpl). In Playback tab, right click one available endpoint, and open Properties Panel, and select Advanced tab, and change Default Format and click Apply. This can be also done in Realtek Audio Console, if you use a Realtek Audio Card.

On Linux, the capture audio format is hardcoded. To keep same with Windows, the audio format is also 32 bit float. The channel count is always 2. The sample rate is always 48kHz.

Note that the higher sample rate will consume more network traffic bandwidth. Maybe in future, the capture audio format can be set by user manually.

About Volume

The final volume that you hear is affected by the following volume:

  • PC system volume.
  • Audio player volume on PC.
  • Android system media volume.
  • "Audio Volume" on Android app.
  • "Loudness Enhancer" on Android app.

They are all independent. If you max the volume of your PC and audio player, and still feel it's not enough, but don't want to change the Android system volume, you can increase "Loudness Enhancer" on app's Settings. It won't affect the system volume. The "Audio Volume" on app can decrease the volume you hear without changing system volume.

Too much loudness will hurt your ear!!! "Loudness Enhancer" has a limit of 3000mB. It's enough for most cases. If you still need more loudness, just directly change Android system volume.

Compile from source

  • Android App

    • Android Studio will import all dependencies automatically.
  • Server MFC

    • vcpkg is required for install dependencies.
    • Run vcpkg install asio protobuf spdlog to install deps. The vcpkg triplet is x64-windows-static-md.
    • Visual Studio 2022 with "Desktop development with C++" workload and "C++ MFC for latest v143 build tools (x86 & x64)" option is required for compiling.
  • Server CMD

    • CMake and a compiler support C++20 is required. Linux also need libpipewire-dev or pipewire-devel.
    • Install vcpkg, and set VPCKG_ROOT env. This env is required by CMakePresets.json.
    • Run vcpkg install asio protobuf spdlog cxxopts to install deps. The vcpkg triplet is x64-windows-static-md for Windows, x64-linux for Linux.
    • Run cmake --preset linux-Release to configure.
    • Run cmake --build --preset linux-Release to build. The as-cmd is located in out/install/linux-Release/bin/as-cmd.
    • For Windows, replace linux to windows in previous two steps.

Star History

Star History Chart

Used third-party libraries

About

Audio Share can share Windows/Linux computer's audio to Android phone over network, so your phone becomes the speaker of computer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published