![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
rtpbuf.h
- Committer:
- klauss
- Date:
- 2014-09-09
- Revision:
- 0:4d17cd9c8f9d
- Child:
- 60:b4ec6beb3be3
File content as of revision 0:4d17cd9c8f9d:
#ifndef _RTPBUF_H #define _RTPBUF_H #include <stdint.h> /* IMPORTANT: sizes must be multiple of 4 */ #define RTPBUF_PKGSIZE 240 /* 30ms @ 8Ksamples/sec */ #define RTPBUF_BUFSIZE 320 /* 40ms @ 8Ksamples/sec */ #if (RTPBUF_PKGSIZE & 0x03) # error OPS... value forbidden #endif #if (RTPBUF_BUFSIZE & 0x03) # error OPS... value forbidden #endif struct rtpbuf { uint32_t b[ RTPBUF_BUFSIZE>>2 ]; int size; }; typedef struct rtpbuf rtpbuf_t; /* clear the buffer, useful at the start of a new phone call */ void rtpbuf_clear (rtpbuf_t * self); /* use this function to put audio into the fifo */ void rtpbuf_put (rtpbuf_t * self, int size, uint8_t * data); /* use this function to check if there is audio available * returns NULL if there is no audio available * or returns a pointer to the audio package */ uint8_t * rtpbuf_get (rtpbuf_t * self); /* use this function to tell rtpbuf that you already consumed * the data supplied by rtpbuf_get() */ void rtpbuf_next (rtpbuf_t * self); #endif