Closed 346 closed 1 year ago
Sorry for the wrong PR.
@346 This fix would be actually helpful for other users. Maybe you want to raise a PR?
@kingster I've re-opened a pull request. But this is my first time writing in C++, so I would appreciate it if you could review my code.
Hi @346
Sorry for my late response, was occupied with few other things last two weeks. This PR is good to go :)
However for the silence, it can be multiple values based on the codec
Ideal channel noise makes bits toggle between 01111111 (0x7F) and 11111111 (0xFF) in u-law and between 01010101 (0x55) and 11010101 (0xD5) in a-law. Reference https://serverfault.com/questions/771924/detect-silence-in-rtp-payload
So that is something that needs more handling based on detected codec.
We have been experiencing an issue where the RTMP audio stream is occasionally corrupted during the Live Streaming feature. Upon investigating this problem, we found that one of the channels of the AudioChunk is released from memory before the RTMP stream transmission occurs. As a solution, we decided to change the type held by the RingBuffer to AudioChunkRef. Additionally, we have changed the silent buffer from 0x00 to 0xFF. The silence in G711 should be 0xFF.