Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio in graphical session #31

Open
dvlahakis opened this issue Jun 18, 2022 · 3 comments
Open

Audio in graphical session #31

dvlahakis opened this issue Jun 18, 2022 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@dvlahakis
Copy link

Are there any suggestions for how audio might work in a proot graphical session? I tried running pulseaudio and pacmd unsuccessfully in a Debian bullseye session. I thought I might be able to stream to the app pulsedroid. Thanks!

@green-green-avk
Copy link
Owner

I'll think about it but it is not a priority now...
The main priority is a PRoot => QEMU migration as Android become more and more restrictive.
Also I recommend you to be mentally ready to a moment when Android own console support will remain in the GitHub releases only (due to tightening of the Google Play rules).

@green-green-avk green-green-avk added the question Further information is requested label Jul 4, 2022
@green-green-avk green-green-avk self-assigned this Jul 4, 2022
@green-green-avk green-green-avk added this to To do in Another Term Environment via automation Jul 4, 2022
@zongou
Copy link

zongou commented Oct 14, 2023

pulseaudio tcp & rtp server

Run this script

#!/bin/sh
set -eu

## Make sure module-native-protocol-tcp is loaded on android for pactl to work
if ! (pactl list modules short | grep -q -e module-native-protocol-tcp); then
 if pulseaudio --check; then
  pulseaudio --kill
 fi

 pulseaudio --exit-idle-time=-1 --daemonize=true --load="module-native-protocol-tcp"
fi

## Check if module is loaded before unloading
pactl_better_unload_module() {
 if (pactl list modules short | grep -q -e "$1"); then
  pactl unload-module "$1"
 fi
}

## tcp sender
pactl_better_unload_module module-simple-protocol-tcp
pactl load-module module-simple-protocol-tcp source=auto_null.monitor rate=48000 channels=2 format=s16le record=true listen=127.0.0.1 port=4010

## rtp sender
pactl_better_unload_module module-rtp-send
pactl load-module module-rtp-send source=auto_null.monitor rate=48000 channels=2 mtu=320 destination=127.0.0.1 port=4010

Or add your pulseaudio configuration

/etc/pulse/default.pa.d/sender.pa

#!/usr/bin/pulseaudio -nF

## Android module
load-module module-native-protocol-tcp

## tcp sender
load-module module-simple-protocol-tcp source=auto_null.monitor rate=48000 channels=2 format=s16le record=true listen=127.0.0.1 port=4010

## rtp sender
load-module module-rtp-send source=auto_null.monitor rate=48000 channels=2 mtu=320 destination=127.0.0.1 port=4010

and run

pulseaudio --exit-idle-time=-1 --daemonize=true

@green-green-avk
Copy link
Owner

green-green-avk commented Dec 23, 2023

A related question: #52

Maybe I will change my mind but rather prefer to implement it as PipeWire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Development

No branches or pull requests

3 participants