mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-11 06:59:53 +00:00
freetdm type fixes
This commit is contained in:
parent
650d71295a
commit
291ee2252b
@ -660,10 +660,10 @@ FT_DECLARE(ftdm_status_t) ftdm_span_load_tones(ftdm_span_t *span, const char *ma
|
||||
|
||||
#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 */
|
||||
|
@ -258,8 +258,8 @@ FT_DECLARE(ftdm_status_t) ftdm_interrupt_create(ftdm_interrupt_t **ininterrupt,
|
||||
|
||||
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;
|
||||
}
|
||||
@ -386,7 +386,7 @@ FT_DECLARE(ftdm_status_t) ftdm_interrupt_destroy(ftdm_interrupt_t **ininterrupt)
|
||||
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);
|
||||
|
@ -605,8 +605,8 @@ struct ftdm_channel {
|
||||
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;
|
||||
};
|
||||
|
@ -40,8 +40,8 @@
|
||||
#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;
|
||||
@ -55,6 +55,7 @@ typedef __int8 int8_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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user