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

I can't play any sound. #20

Open
soscaster opened this issue Jul 4, 2020 · 9 comments
Open

I can't play any sound. #20

soscaster opened this issue Jul 4, 2020 · 9 comments

Comments

@soscaster
Copy link

Removed -Idummy, VLC opened but when Ctrl + M, it always appear the message :
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer

My device is MI A2 Lite - Android 10 Stock ROM.

@rom1v
Copy link
Owner

rom1v commented Jul 4, 2020

Did you have the popup on the device and authorized to capture sound, before pressing Enter in the terminal?

@soscaster
Copy link
Author

Did you have the popup on the device and authorized to capture sound, before pressing Enter in the terminal?

Yes I have. A huge popup and I authorized it. I can use the scrcpy but not the sndcpy.

@yulose9
Copy link

yulose9 commented Jul 4, 2020

Did you have the popup on the device and authorized to capture sound, before pressing Enter in the terminal?

Yes I have. A huge popup and I authorized it. I can use the scrcpy but not the sndcpy.

We do have the same problem I've tried running scrcpy and load the bat file of sndcpy. It did install and app and asked for permission but still didn't play any audio I tried updating my VLC to latest version and still doesn't work

My device is Mi9T Pro running the latest MIUI 12 Global Stable

@rom1v
Copy link
Owner

rom1v commented Jul 4, 2020

What app do you use on the device? Some apps do not authorize to capture their audio: https://github.com/rom1v/sndcpy#apps-restrictions

@CrescentKohana
Copy link

Possibly same problem here (Android 10 / OnePlus 7). Tried with Windows 10 Pro 64bit and Arch Linux 5.7.8-arch1-1.

Connection is succesful and VLC (also tried mpv) does play something but no audio can be heard. I tried playing a video file (mp4) through Chrome, music through AIMP and the main menu of Fate/Grand Order game. No sound with any of these. I tried to record Fate normally just with a recording app, and that worked, so there are no restrictions in play here.

Also, I've tried the latest adb and the one which comes with the Windows binary.

@rom1v
Copy link
Owner

rom1v commented Jul 23, 2020

Does it work with the youtube app or VLC for Android?

@rom1v
Copy link
Owner

rom1v commented Jul 23, 2020

I tried to record Fate normally just with a recording app, and that worked

Does this recording app use the Android 10 capture API? Which app is it?

Maybe something to add here:

confBuilder.addMatchingUsage(AudioAttributes.USAGE_MEDIA);
confBuilder.addMatchingUsage(AudioAttributes.USAGE_GAME);
confBuilder.addMatchingUsage(AudioAttributes.USAGE_UNKNOWN);

?

@CrescentKohana
Copy link

CrescentKohana commented Jul 23, 2020

Does it work with the youtube app or VLC for Android?

Yes, I got it working with YouTube.

Does this recording app use the Android 10 capture API? Which app is it?

I'm using OxygenOS's internal recording app. Just tried a 3rd party app, AZ Screen Recorder, and it's not picking up any game audio. Probably should've tested that first.

@CrescentKohana
Copy link

CrescentKohana commented Jul 23, 2020

Possibly add couple example apps to the README which are known to function (eg. YouTube), so people can quickly test that everything works?

Anyway, no problem with sndcpy itself 😅.

//Edit
I'm guessing OnePlus (it seems Samsung and some Xiaomi phones have this as well) is using different methods to record the audio. Those are probably not available to app developers.

Probably this one here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants