37 #include "mp3/mpg123.h" 38 #include "mp3/mpglib.h" 45 #define MP3_BUFLEN 320 46 #define MP3_SCACHE 16384 47 #define MP3_DCACHE 8192 68 static const char name[] =
"mp3";
75 #if __BYTE_ORDER == __LITTLE_ENDIAN 81 #if __BYTE_ORDER == __BIG_ENDIAN 83 (((((b) ) & 0xFF) << 24) | \ 84 ((((b) >> 8) & 0xFF) << 16) | \ 85 ((((b) >> 16) & 0xFF) << 8) | \ 86 ((((b) >> 24) & 0xFF) )) 88 (((((b) ) & 0xFF) << 8) | \ 89 ((((b) >> 8) & 0xFF) )) 90 #define ltohl(b) htoll(b) 91 #define ltohs(b) htols(b) 93 #error "Endianess not defined" 150 int res = 0, bytes = 0;
155 fseek(s->
f, 0, SEEK_SET);
161 for(bytes = 0 ; bytes < p->
dbuflen ; bytes++) {
181 if(! p->
sbuflen || res != MP3_OK) {
253 samples = sample_offset * 2;
256 fseek(s->
f, 0, SEEK_END);
257 max = ftell(s->
f) * 100;
260 if (whence == SEEK_SET)
261 offset = samples +
min;
263 offset = samples + cur;
264 else if (whence == SEEK_END)
265 offset = max - samples;
267 offset = (offset >
max)?max:offset;
271 return fseek(s->
f, offset, SEEK_SET);
Asterisk main include file. File version handling, generic pbx functions.
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
struct ast_frame fr
frame produced by read, typically
#define AST_FRAME_SET_BUFFER(fr, _base, _ofs, _datalen)
Support for logging to various files, console and syslog Configuration in file logger.conf.
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
Data structure associated with a single frame of data.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.