Requirements:
Do a Internet radio program, that is, choose the music files on the sender computer, broadcast on playback end machine,
The whole process I think should be like this:
The sender reading music files - & gt; The network to send
Receive the network data playback end - & gt; Deposited in the receive buffer - & gt; Play
Due to the client machine is single chip microcomputer, the receive buffer size is limited, so if the sender transmission speed too fast, the receive buffer is likely, to voice may appear covering phenomenon, if the sender transmission speed too slow, the receive buffer may be in a deficit state, thus speech pause phenomenon may occur,
Now need to discuss is to determine a method, make the rate of sending and receiving ends to match, namely the receive buffer won't appear deficit and overflow condition all the time,
Hope the friend that experienced guidance,
CodePudding user response:
The receiving end after receiving packets, send back a buffer state, the sender can adjust the sending rate according to the status valueCodePudding user response: