|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Create the circular buffer.
References pjmedia_circ_buf::buf, pjmedia_circ_buf::capacity, pjmedia_circ_buf::len, PJ_INLINE, pj_pool_calloc(), PJ_POOL_ZALLOC_T, PJ_SUCCESS, and pjmedia_circ_buf::start.
Reset the circular buffer.
References PJ_INLINE, and PJ_SUCCESS. Referenced by pjmedia_circ_buf_adv_read_ptr().
Get the circular buffer length, it is number of samples buffered in the circular buffer.
References PJ_INLINE. Referenced by pjmedia_circ_buf_pack_buffer().
Set circular buffer length. This is useful when audio buffer is manually manipulated by the user, e.g: shrinked, expanded.
References PJ_INLINE.
Advance the read pointer of circular buffer. This function will discard the skipped samples while advancing the read pointer, thus reducing the buffer length.
References PJ_INLINE, PJ_SUCCESS, and pjmedia_circ_buf_reset(). Referenced by pjmedia_circ_buf_read().
Advance the write pointer of circular buffer. Since write pointer is always pointing to a sample after the end of sample, so this function also means increasing the buffer length.
References PJ_ETOOBIG, PJ_INLINE, and PJ_SUCCESS. Referenced by pjmedia_circ_buf_write().
Get the real buffer addresses containing the audio samples.
References PJ_INLINE. Referenced by pjmedia_circ_buf_copy(), pjmedia_circ_buf_pack_buffer(), and pjmedia_circ_buf_read().
Get the real buffer addresses that is empty or writeable.
References PJ_INLINE. Referenced by pjmedia_circ_buf_write().
Read audio samples from the circular buffer.
References PJ_ETOOBIG, PJ_INLINE, pjmedia_circ_buf_adv_read_ptr(), pjmedia_circ_buf_get_read_regions(), and pjmedia_copy_samples().
Write audio samples to the circular buffer.
References PJ_ETOOBIG, PJ_INLINE, pjmedia_circ_buf_adv_write_ptr(), pjmedia_circ_buf_get_write_regions(), and pjmedia_copy_samples().
Copy audio samples from the circular buffer without changing its state.
References PJ_ETOOBIG, PJ_INLINE, PJ_SUCCESS, pjmedia_circ_buf_get_read_regions(), and pjmedia_copy_samples().
Pack the buffer so the first sample will be in the beginning of the buffer. This will also make the buffer contiguous.
References PJ_ETOOBIG, PJ_INLINE, PJ_SUCCESS, pjmedia_circ_buf_get_len(), pjmedia_circ_buf_get_read_regions(), pjmedia_copy_samples(), and pjmedia_move_samples().
Copyright (C) 2006-2008 Teluu Inc.
| |