ToxAndroidRefImpl icon indicating copy to clipboard operation
ToxAndroidRefImpl copied to clipboard

Audio GLITCHES

Open ClarkFieseln opened this issue 1 year ago • 12 comments

Describe the bug The audio signal shows many glitches

To Reproduce Record audio on receiver side (e.g. connecting speaker in USB sound card to mic in a PC running Audacity)

Expected behavior The audio signal has no glitches

Your system information:

  • TRIfA Version: 1.0.231
  • App from Google-Play : TRIfA
  • Android OS Version: Android 9
  • Device: HUAWEI P smart

Add screenshots, if possible

Additional context The output volume seems to be very low! I tried several different combinations of settings without success (audio buffer, frame size, sampling rate, UDP active, force UDP mode).

Some years ago I solved a similar problem by opening the audio interface with CALL_MODE instead of COMMUNICATION_MODE

ClarkFieseln avatar Dec 30 '24 15:12 ClarkFieseln

first let me say that google play is no longer the main distrubution channel for this app. please install the latest version from https://github.com/zoff99/ToxAndroidRefImpl/releases it is signed with the same key as the google play version.

zoff99 avatar Dec 30 '24 16:12 zoff99

which tox client is the receiver side using? and are you calling audio only or also video? if possible give as much details as you can.

zoff99 avatar Dec 30 '24 16:12 zoff99

both smartphones are exactly as described above, and both see the glitches. This is an "audio call" from TRIfA to TRIfA. I noticed this behavior some years ago already and I still assume that the "call mode" may solve the problem.

ClarkFieseln avatar Dec 30 '24 18:12 ClarkFieseln

did you change it in the source code and compiled yourself to fix it, or what do you mean by "Some years ago I solved a similar problem" ? TRIfA uses native code for audio recording and playback via OpenSLES

zoff99 avatar Dec 30 '24 18:12 zoff99

it was my own app, but the effect was exactly the same I saw many comments all over the internet claiming that the audio quality is much better in call mode

ClarkFieseln avatar Dec 30 '24 19:12 ClarkFieseln

audio mode is tricky stuff on android. i ran into lots of issues depending on the device. what sort of audio glitches do you have? can you give more details? is it "just" bad quality audio or choppy (parts missing all the time), or sounding like robot?

i can let CI build a debug version with COMMUNICATION_MODE, could you test that version?

zoff99 avatar Dec 30 '24 19:12 zoff99

I can repeat the tests tomorrow and upload the file(s) with the glitches, but sorry, I cannot do much more than that. Maybe you could just add a configuration option to allow selecting the "call mode" on own risk, as an experimental feature. That would be great.

ClarkFieseln avatar Dec 30 '24 19:12 ClarkFieseln

can you install and test with the nightly version? it can be installed alongside the regular trifa

zoff99 avatar Dec 30 '24 19:12 zoff99

you mean with the new experimental feature? Sure, I can do that.

ClarkFieseln avatar Dec 30 '24 19:12 ClarkFieseln

https://github.com/zoff99/ToxAndroidRefImpl/releases/download/nightly/TRIfA-nightly.apk this has it changed: https://github.com/zoff99/ToxAndroidRefImpl/commit/7ff1a9c89e1878c6276044d7196a69f4565b6a2c

it has also turned logging on. if you can still "repeat the tests tomorrow and upload the file(s) with the glitches" that would be super.

zoff99 avatar Dec 30 '24 20:12 zoff99

unfortunately the same behavior attached you find 2 example files with some glitches sweep_test_with_glitches.zip

ClarkFieseln avatar Dec 31 '24 11:12 ClarkFieseln

Change audio frequency 8000hz!!!

aleytus avatar Oct 20 '25 06:10 aleytus