Weird problems that appear in voice playback and recording

xiaoxiao2021-03-06  22

Recently, you are doing the development of SIP clients, based on Windows platform. It is always an interrupt problem in a voice session. There are two situations in finding:

1. Send a thread to send a data after a period of time.

2. Playing threads After a while, do not return in the WaveoutWrite function, and the MSDN said that this function is asynchronous, no matter how it will return.

For the problem 1 finally excluded the RTP library problem, found that the problem is in the callback function set when the recording device is opened, and the callback function will never enter a period of time. Multi-party find the reason is not found, from the Internet DOWN Several source code is also implemented with a callback function. This problem occurs. In order to change it on other machines. Finally, a colleague, find a source code he wrote before, does not use the callback function, and use the callback thread, the problem is solved No longer interrupted.

Although the problem is solved, it is still very wonderful, why is the callback function?

转载请注明原文地址:https://www.9cbs.com/read-43253.html

New Post(0)