- Timestamp:
- Oct 13, 2006 5:57:42 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/portaudio/ringbuffer.h
r339 r770 12 12 * 13 13 * Author: Phil Burk, http://www.softsynth.com 14 * modified for SMP safety on OS X by Bjorn Roche. 15 * also allowed for const where possible. 16 * Note that this is safe only for a single-thread reader 17 * and a single-thread writer. 14 18 * 15 19 * This program is distributed with the PortAudio Portable Audio Library. 16 * For more information see: http://www. audiomulch.com/portaudio/20 * For more information see: http://www.portaudio.com 17 21 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk 18 22 * … … 28 32 * included in all copies or substantial portions of the Software. 29 33 * 30 * Any person wishing to distribute modifications to the Software is31 * requested to send the modifications to the original developer so that32 * they can be incorporated into the canonical version.33 *34 34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35 35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF … … 39 39 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 40 40 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 41 */ 42 43 /* 44 * The text above constitutes the entire PortAudio license; however, 45 * the PortAudio community also makes the following non-binding requests: 41 46 * 47 * Any person wishing to distribute modifications to the Software is 48 * requested to send the modifications to the original developer so that 49 * they can be incorporated into the canonical version. It is also 50 * requested that these non-binding requests be included along with the 51 * license above. 42 52 */ 53 54 /** 55 @file 56 @ingroup hostapi_src 57 */ 58 43 59 #include <stdio.h> 44 60 #include <stdlib.h> … … 54 70 long bigMask; /* Used for wrapping indices with extra bit to distinguish full/empty. */ 55 71 long smallMask; /* Used for fitting indices to buffer. */ 56 char * buffer;72 char * buffer; 57 73 } 58 74 RingBuffer; … … 71 87 long RingBuffer_GetReadAvailable( RingBuffer *rbuf ); 72 88 /* Return bytes written. */ 73 long RingBuffer_Write( RingBuffer *rbuf, void *data, long numBytes );89 long RingBuffer_Write( RingBuffer *rbuf, const void *data, long numBytes ); 74 90 /* Return bytes read. */ 75 91 long RingBuffer_Read( RingBuffer *rbuf, void *data, long numBytes );
Note: See TracChangeset
for help on using the changeset viewer.