Open otymartin opened 3 years ago
More debugging of this issue.
On this device is Martin listening to the volume of his own sound
I whistled and the volume went up to 230
before going back to 0
15:39:40.809 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 230: Total Volume: 230
15:39:41.044 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 52: Total Volume: 52
15:39:41.300 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 39: Total Volume: 39
15:39:41.557 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 8: Total Volume: 8
15:39:41.792 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 0: Total Volume: 0
15:39:42.047 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 4: Total Volume: 4
15:39:42.302 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 1: Total Volume: 1
15:39:42.557 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 1: Total Volume: 1
15:39:42.793 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 0: Total Volume: 0
15:39:43.051 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 1: Total Volume: 1
15:39:43.307 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 0: Total Volume: 0
15:39:43.560 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 0: Total Volume: 0
15:39:43.796 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 0: Total Volume: 0
15:39:44.052 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 0: Total Volume: 0
15:39:44.307 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 0: Total Volume: 0
On the remote client device listening on me whistle, the volume callback was 220
before coming down to 1
. It refuses to hit 0
. Also on the remote client, the callbacks stop whenever there is no sound while on the local device, the callbacks continue even if the sound is 0. Dont know if thats a feature or bug.
15:39:41.046 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 220: Total Volume: 196
15:39:41.305 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 115: Total Volume: 42
15:39:41.559 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 50: Total Volume: 39
15:39:41.813 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 14: Total Volume: 18
15:39:42.346 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 2: Total Volume: 4
15:39:42.603 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 1: Total Volume: 4
15:39:42.860 π DEBUG RoomViewModel.observeSpeakers():507 - Martin Volume 1: Total Volume: 4
the audio data received from remote is encoded/decoded so it might be affected. i would say ignore any volume which is lower than 5, that's usually very close to mute.
Thanks @plutoless - I noticed a pattern where for local user, the remote user's volume settled at 1,2,3 or 4 at max so I was contemplating ignoring volumes < 5 however didn't have any confidence in that solution until you endorsed it.
:)
Hi @plutoless @maxxfrazer On playing around with this solution, the problem persists. The volume now gets stuck at higher numbers. Is there any other solution for this issue - kinda makes reportAudioVolumeIndicationOfSpeakers
unusable.
Stuck at 7
20:13:13.823 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 4
20:13:16.426 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 1
20:13:44.759 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 7
Stuck at 5
20:14:20.126 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 63
20:14:20.382 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 67
20:14:20.643 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 19
20:14:20.914 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 5
Stuck at 43
20:14:49.758 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 4
20:14:50.804 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 46
20:14:51.060 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 88
20:14:51.315 π DEBUG RoomViewModel.observeSpeakers():506 - Martin l | 109
20:14:51.593 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 105
20:14:51.847 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 87
20:14:52.108 π DEBUG RoomViewModel.observeSpeakers():506 - Martin | 43
And so forth....This is random. other times it goes down below 5.
@plutoless any further advice on this? I don't know what else to suggest.
Other than adding an RTM layer to the app and sending the local values to the rest of the channel directly, which would work but shouldn't be necessary.
as i said a very small value can also indicate no volume, this should work in most of cases.
@plutoless Problem is once I set 4
as the "no volume" threshold, the volume indicator started getting stuck at higher numbers like 7
, ...43
e.t.c..
interesting. do you have the log files? and how did you print the value? if it raise to 43 it usually means it does have this high volume.
@plutoless Need some time to produce new logs. Will post once I have
@maxxfrazer In my implementation of the
reportAudioVolumeIndicationOfSpeakers
delegate method, the volume of the remote user is always greater than0
. On that remote user's local device, it rightfully shows their volume as0
Here are some logs below
As you can can see below on the
local device of the listener
, theremote user's volume is never zero
forcing my UI to indicate that they are speaking when they are not. Sometimes thetotal volume is 0
while the speaker's own volume is shown asgreater than 0
- I dont know how that worksπ€·ββοΈOn the speakers local device, the callback works perfectly. Their volume is
0
when not speaking.Here is my initialization method.
LOCAL USER'S LOG'S ON REMOTE SPEAKER'S VOLUME