WindowsSdk

set_audio_buffer interface

  • Definition:
int _stdcall set_audio_buffer(int camera, unsigned int buffer_ms);
  • Parameter:
camera:[in],The window's handle which is form new_camera.
buffer_ms:[in],Audio buffer size, millisecond.
  • Return:
Return ERROR_OK if success,else refer to the definition of error number
  • Explain:
Sets the specified camera audio playback buffer size.
    Because the audio playback smoothness requirement is very high, during playing once missing data, noisy will be caused.
But restricted by the terms of the network, camera sends the audio to the client, it can not guarantee complete real-time data,
For example in the Internet transmission case, may occur when the fast slowly, it will cause trouble on the audio player.
In order to solve this problem, we must establish a playback buffer in the client, when the received audio data,
     Not directly play audio, but to save to a buffer, a buffer after a period of time to play audio.
This can be reduced to the maximum extent influence the network transmission, network conditions worse, 
should set the buffer time is longer, of course, the corresponding lead to playback delay longer. 
This requires the user to measure, in general the LAN, can be set to 50-1000 within MS, 
the Internet will be depending on the circumstances.
     If the audio playback at the same time, also in the video, in order to maintain synchronization of audio and video,
The video will be in accordance with the audio buffer time setting the same buffer. But if you only play video,
The rc_ipcam library is not buffered.

IP Camera Windows SDK manual

Copyright:Shenzhen XRC Tech Co.,Ltd.

ICP:粤ICP备09050685号