#define FTDM_SLINEAR_MAX_VALUE 32767
#define FTDM_SLINEAR_MIN_VALUE -32767
-static void reset_gain_table(unsigned char *gain_table, float new_gain, ftdm_codec_t codec_gain)
+static void reset_gain_table(uint8_t *gain_table, float new_gain, ftdm_codec_t codec_gain)
{
/* sample value */
- unsigned char sv = 0;
+ uint8_t sv = 0;
/* linear gain factor */
float lingain = 0;
/* linear value for each table sample */
interrupt->device = device;
#ifdef WIN32
- interrupt->interrupt = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (!interrupt->interrupt) {
+ interrupt->event = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (!interrupt->event) {
ftdm_log(FTDM_LOG_ERROR, "Failed to allocate interrupt event\n");
goto failed;
}
ftdm_assert_return(ininterrupt != NULL, FTDM_FAIL, "Interrupt null when destroying!\n");
interrupt = *ininterrupt;
#ifdef WIN32
- CloseHandle(interrupt->interrupt);
+ CloseHandle(interrupt->event);
#else
close(interrupt->readfd);
close(interrupt->writefd);
ftdm_hash_t *variable_hash;
unsigned char rx_cas_bits;
uint32_t pre_buffer_size;
- unsigned char rxgain_table[FTDM_GAINS_TABLE_SIZE];
- unsigned char txgain_table[FTDM_GAINS_TABLE_SIZE];
+ uint8_t rxgain_table[FTDM_GAINS_TABLE_SIZE];
+ uint8_t txgain_table[FTDM_GAINS_TABLE_SIZE];
float rxgain;
float txgain;
};
#define FTDM_TYPES_H
#include "fsk.h"
-#define FTDM_INVALID_SOCKET -1
#ifdef WIN32
+#define FTDM_INVALID_SOCKET INVALID_HANDLE_VALUE
#include <windows.h>
typedef HANDLE ftdm_socket_t;
typedef unsigned __int64 uint64_t;
typedef intptr_t ftdm_ssize_t;
typedef int ftdm_filehandle_t;
#else
+#define FTDM_INVALID_SOCKET -1
#include <stdint.h>
#include <sys/types.h>
#include <sys/ioctl.h>