Main Page   Compound List   File List   Compound Members   File Members  

speaker.c File Reference

#include "speakfree.h"
#include "version.h"

Compounds

struct  jitterbuf
struct  mikeopts_t
struct  xn_conspec_t

Defines

#define MIKEOPTS_EMPTY   {NULL,NULL,NULL,0}
#define LWL_RETRANSMIT   (5 * 60 * 1000000L)
#define LWL_STRIKEOUT   5
#define DYNRATE_UPDATE_SAMPLE_COUNT   SAMPLE_RATE
#define DYNRATE_SMOOTHING_FACTOR   0.1
#define Debug   ((debugforce != 0) ? (debugforce > 0) : debugging)
#define TickTock   (10 * 1000000L)
#define TockTock   (60 * 1000000L)
#define JitterTock   (1000000L / 4)
#define AudioRelease   (20 * 1000000L)
#define ucase(x)   (islower(x) ? toupper(x) : (x))
#define Checklen(n, t)
#define Checkframe(f, p, t)
#define Gbuf(ptr, type, size)
#define faceInterval   120

Functions

xn_conspec_tnew_xnat_conspec (char *addr)
void childterm ()
int launch_sfmike (struct connection *c, struct mikeopts_t *mo)
void gsmdecomp (struct soundbuf *sb)
void lpcdecomp (struct soundbuf *sb, struct connection *c)
void lpc10decomp (struct soundbuf *sb, struct connection *c)
void celpdecomp (struct soundbuf *sb)
void AES_cbc_decrypt (unsigned char *in, unsigned char *out, int len, aes_ctx *ctx)
char * etime (void)
char * compressionType (soundbuf *msg)
void makeSessionKey (char *key)
void ularm (long t)
void windtimer (void)
int isBusy (void)
void sendLwlMessage (int dobye)
void obtainaudio (void)
void flushjitter (void)
void release ()
void exiting ()
void playbuffer (soundbuf *msg, struct connection *c)
char * progname (char *arg)
void usage (void)
int main (int argc, char *argv[])

Variables

int audiok = FALSE
int audiotime = 0
int debugging = FALSE
int debugforce = FALSE
int noring = FALSE
gsm gsmh
char deskey [9] = ""
char rtpdeskey [9] = ""
char vatdeskey [9] = ""
char ideakey [17] = ""
char blowfish_spec = FALSE
BF_KEY blowfishkey
char aes_spec = FALSE
aes_ctx daes_ctx
char * curotp = NULL
int whichport = Internet_Port
int sock
int ssock
sockaddr_in from
sockaddr_in name
int fromlen
int rll
int showhosts = FALSE
int hosttimeout = 180 * 1000000L
int jitter = 0
int jitterwait = 0
int jitteridle = 0
int jitteridlet = 0
jitterbufjithead = NULL
jitterbufjittail = NULL
int outRate = SAMPLE_RATE
int currentRate = SAMPLE_RATE
char * prog
FILE * record = NULL
char * pgppass = NULL
char * replyfile = NULL
char * replycmdexe = NULL
char * replycmd = "sfmike -t"
char * busysignal = "sleep 10; sfmike %s busy.au"
int busytimeout = 60 * 1000000L
int dobusy = FALSE
sockaddr_in lookhost
char * sdes = NULL
int sdesl
unsigned long ssrc
int lwltimer
int lwlonly = FALSE
int actives = 0
int faceTransferActive = 0
int xnat_passive = FALSE
int xnat_active_sfmike_pid = 0
xn_conspec_txnat_conspec = NULL
in_addr lwl_sites [LWL_MAX_SITES]
long lwl_ports [LWL_MAX_SITES]
int lwl_strikes [LWL_MAX_SITES]
int lwl_nsites = 0
FILE * facefile = NULL
int facesDisplayed = 0
connectionconn = NULL
int adjustRate = FALSE
double timebase
double lastPacketTime = 0
double averageDataRate = SAMPLE_RATE
long lastPacketLength = 0
char * devAudioOutput
char * devAudioControl
int timerStep = TockTock

Define Documentation

#define AudioRelease   (20 * 1000000L)
 

#define Checkframe f,
p,
 
 

Value:

if (((msg->buffer.buffer_len - (p)) % (f)) != 0) { \
            fprintf(stderr, "%s: ** Payload (%ld+%d pad) bytes from %s is not an even number of %d byte frames for " \
                            t " compression. **\n", prog, msg->buffer.buffer_len - (p), p, c->con_hostname, f); \
            return; }

#define Checklen n,
 
 

Value:

if (msg->buffer.buffer_len > (n)) { \
            fprintf(stderr, "%s: ** Payload (%ld) bytes from %s exceeds maximum of %d bytes for " \
                            t " compression. **\n", prog, msg->buffer.buffer_len, c->con_hostname, n); \
            return; }

#define Debug   ((debugforce != 0) ? (debugforce > 0) : debugging)
 

#define DYNRATE_SMOOTHING_FACTOR   0.1
 

#define DYNRATE_UPDATE_SAMPLE_COUNT   SAMPLE_RATE
 

#define faceInterval   120
 

#define Gbuf ptr,
type,
size   
 

Value:

if ((ptr = (type) malloc(size)) == NULL) { \
    fprintf(stderr, "%s: Unable to allocate NAT sfmike options buffer, size %d.\n", prog, size); \
    return 2; }

#define JitterTock   (1000000L / 4)
 

#define LWL_RETRANSMIT   (5 * 60 * 1000000L)
 

#define LWL_STRIKEOUT   5
 

#define MIKEOPTS_EMPTY   {NULL,NULL,NULL,0}
 

#define TickTock   (10 * 1000000L)
 

#define TockTock   (60 * 1000000L)
 

#define ucase      (islower(x) ? toupper(x) : (x))
 


Function Documentation

void AES_cbc_decrypt unsigned char *    in,
unsigned char *    out,
int    len,
aes_ctx *    ctx
[static]
 

void celpdecomp struct soundbuf   sb [static]
 

void childterm   [static]
 

char* compressionType soundbuf   msg [static]
 

char* etime void    [static]
 

void exiting   [static]
 

void flushjitter void    [static]
 

void gsmdecomp struct soundbuf   sb [static]
 

int isBusy void    [static]
 

int launch_sfmike struct connection   c,
struct mikeopts_t   mo
[static]
 

void lpc10decomp struct soundbuf   sb,
struct connection   c
[static]
 

void lpcdecomp struct soundbuf   sb,
struct connection   c
[static]
 

int main int    argc,
char *    argv[]
 

void makeSessionKey char *    key [static]
 

struct xn_conspec_t* new_xnat_conspec char *    addr [static]
 

void obtainaudio void    [static]
 

void playbuffer soundbuf   msg,
struct connection   c
[static]
 

char* progname char *    arg [static]
 

void release   [static]
 

void sendLwlMessage int    dobye [static]
 

void ularm long    t [static]
 

void usage void    [static]
 

void windtimer void    [static]
 


Variable Documentation

int actives = 0 [static]
 

int adjustRate = FALSE [static]
 

char aes_spec = FALSE [static]
 

int audiok = FALSE [static]
 

int audiotime = 0 [static]
 

double averageDataRate = SAMPLE_RATE [static]
 

char blowfish_spec = FALSE [static]
 

BF_KEY blowfishkey [static]
 

char* busysignal = "sleep 10; sfmike %s busy.au" [static]
 

int busytimeout = 60 * 1000000L [static]
 

struct connection* conn = NULL [static]
 

char* curotp = NULL [static]
 

int currentRate = SAMPLE_RATE [static]
 

aes_ctx daes_ctx [static]
 

int debugforce = FALSE [static]
 

int debugging = FALSE [static]
 

char deskey[9] = "" [static]
 

char * devAudioControl
 

char* devAudioOutput
 

int dobusy = FALSE [static]
 

FILE* facefile = NULL [static]
 

int facesDisplayed = 0 [static]
 

int faceTransferActive = 0 [static]
 

struct sockaddr_in from [static]
 

int fromlen [static]
 

gsm gsmh
 

int hosttimeout = 180 * 1000000L [static]
 

char ideakey[17] = "" [static]
 

struct jitterbuf* jithead = NULL [static]
 

struct jitterbuf * jittail = NULL [static]
 

int jitter = 0 [static]
 

int jitteridle = 0 [static]
 

int jitteridlet = 0 [static]
 

int jitterwait = 0 [static]
 

long lastPacketLength = 0 [static]
 

double lastPacketTime = 0 [static]
 

struct sockaddr_in lookhost [static]
 

int lwl_nsites = 0 [static]
 

long lwl_ports[LWL_MAX_SITES] [static]
 

struct in_addr lwl_sites[LWL_MAX_SITES] [static]
 

int lwl_strikes[LWL_MAX_SITES] [static]
 

int lwlonly = FALSE [static]
 

int lwltimer [static]
 

struct sockaddr_in name [static]
 

int noring = FALSE [static]
 

int outRate = SAMPLE_RATE [static]
 

char* pgppass = NULL [static]
 

char* prog [static]
 

FILE* record = NULL [static]
 

char* replycmd = "sfmike -t" [static]
 

char* replycmdexe = NULL [static]
 

char* replyfile = NULL [static]
 

int rll [static]
 

char rtpdeskey[9] = "" [static]
 

char* sdes = NULL [static]
 

int sdesl [static]
 

int showhosts = FALSE [static]
 

int sock [static]
 

int ssock [static]
 

unsigned long ssrc [static]
 

double timebase [static]
 

int timerStep = TockTock [static]
 

char vatdeskey[9] = "" [static]
 

int whichport = Internet_Port [static]
 

int xnat_active_sfmike_pid = 0 [static]
 

struct xn_conspec_t* xnat_conspec = NULL [static]
 

int xnat_passive = FALSE [static]
 


Generated on Tue Feb 10 08:44:18 2004 for Speak-FreelyforUnix by doxygen1.2.18