Skip to content

Conversation

@cloudwebrtc
Copy link
Contributor

No description provided.

@cloudwebrtc cloudwebrtc changed the title fix: simplified enable_queue storage. fix: simplified enable_queue field. Jun 29, 2024
@cloudwebrtc cloudwebrtc changed the title fix: simplified enable_queue field. fix: simplified enable_queue field for AudioSource. Jun 29, 2024
@cloudwebrtc
Copy link
Contributor Author

cloudwebrtc commented Jul 2, 2024

after several days of hard debugging, I had to remove the call of self.sys_handle.on_captured_frame from captured_frame.
I tried to break the audio frame in Unity AudioSource into 10ms frames, or directly pass all buffers into captured_frame. However, due to some call jitter, the encoded sound jittered and the delay accumulated. I guess some lock contention caused it, but I couldn't find the real reason.

So the current way that works perfectly is to use enable_queue to control whether to execute the interval.tick() timer wait inside spawn, and whether to insert a silent frame when po_rx is empty.

I will resubmit the patch when I find a better solution

@cloudwebrtc cloudwebrtc merged commit 66068f6 into main Jul 2, 2024
@cloudwebrtc cloudwebrtc deleted the duan/fix-enable-queue-for-audio-source branch July 2, 2024 02:23
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

Successfully merging this pull request may close these issues.

3 participants