char linkname[256];
unsigned char buffer[256];
struct fmt *fmt;
- int channels, bytes;
+ int channels = 0, bytes = 0;
unsigned int size, chunk;
int gotfmt = 0;
struct stat _stat;
*/
int read_tone(int fh, unsigned char *buffer, int codec, int len, signed int size, signed int *left, int speed)
{
- int l;
+ int l = 0;
int offset;
signed short buffer16[len], *buf16 = buffer16;
signed short buffer32[len<<1], *buf32 = buffer32;
l = l>>2;
while(i < l)
{
- sample = (*buf32++) + (*buf32++);
+ sample = (*buf32++);
+ sample += (*buf32++);
if (sample < -32767)
sample = -32767;
if (sample > 32767)
SCPY((*toneset_nextpointer)->directory, p);
tonesettone_nextpointer = &(*toneset_nextpointer)->first;
- SPRINT(path, "%s/%s", INSTALL_DATA, p);
+ SPRINT(path, "%s/%s", SHARE_DATA, p);
dir = opendir(path);
if (dir == NULL)
{
p = p_next;
}
- printf("PBX: Memory used for tones: %ld bytes (%d samples)\n", memory, samples);
+ printf("PBX: Memory used for tones: %d bytes (%d samples)\n", memory, samples);
PDEBUG(DEBUG_PORT, "Memory used for tones: %ld bytes (%d samples)\n", memory, samples);
return(1);