misc.c File Reference

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "misc.h"

Include dependency graph for misc.c:


Functions

void print_vec (float *vec, int len, char *name)
spx_uint32_t be_int (spx_uint32_t i)
spx_uint32_t le_int (spx_uint32_t i)
void speex_memcpy_bytes (char *dst, char *src, int nbytes)
void speex_memset_bytes (char *dst, char src, int nbytes)
void * speex_alloc (int size)
void * speex_alloc_scratch (int size)
void * speex_realloc (void *ptr, int size)
void speex_free (void *ptr)
void speex_free_scratch (void *ptr)
void * speex_move (void *dest, void *src, int n)
void speex_error (const char *str)
void speex_warning (const char *str)
void speex_warning_int (const char *str, int val)
spx_word16_t speex_rand (spx_word16_t std, spx_int32_t *seed)
void speex_rand_vec (float std, spx_sig_t *data, int len)
void _speex_putc (int ch, void *file)

Function Documentation

void _speex_putc ( int  ch,
void *  file 
)

Speex wrapper for putc

Referenced by speex_std_char_handler().

spx_uint32_t be_int ( spx_uint32_t  i  ) 

Convert big endian

spx_uint32_t le_int ( spx_uint32_t  i  ) 

Convert little endian

Referenced by main(), read_wav_header(), and write_wav_header().

void print_vec ( float *  vec,
int  len,
char *  name 
)

Print a named vector to stdout

void* speex_alloc ( int  size  ) 

Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free

Referenced by nb_decoder_init(), nb_encoder_init(), sb_decoder_init(), sb_encoder_init(), speex_bits_init(), speex_echo_state_init(), speex_header_to_packet(), speex_packet_to_header(), speex_preprocess_state_init(), spx_drft_init(), and spx_fft_init().

void* speex_alloc_scratch ( int  size  ) 

Same as speex_alloc, except that the area is only needed inside a Speex call (might cause problem with wideband though)

Referenced by nb_decoder_init(), nb_encoder_init(), sb_decoder_init(), and sb_encoder_init().

void speex_error ( const char *  str  ) 

Print error message to stderr

Referenced by nb_decode().

void speex_free ( void *  ptr  ) 

Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_alloc

Referenced by nb_decoder_destroy(), nb_encoder_destroy(), sb_decoder_destroy(), sb_encoder_destroy(), speex_bits_destroy(), speex_echo_state_destroy(), speex_packet_to_header(), speex_preprocess_state_destroy(), spx_drft_clear(), and spx_fft_destroy().

void speex_free_scratch ( void *  ptr  ) 

Same as speex_alloc, except that the area is only needed inside a Speex call (might cause problem with wideband though)

Referenced by nb_decoder_destroy(), nb_encoder_destroy(), sb_decoder_destroy(), and sb_encoder_destroy().

void speex_memcpy_bytes ( char *  dst,
char *  src,
int  nbytes 
)

Speex wrapper for memcpy

void speex_memset_bytes ( char *  dst,
char  src,
int  nbytes 
)

Speex wrapper for memset

Referenced by speex_bits_pack().

void* speex_move ( void *  dest,
void *  src,
int  n 
)

spx_word16_t speex_rand ( spx_word16_t  std,
spx_int32_t *  seed 
)

Generate a random number

void speex_rand_vec ( float  std,
spx_sig_t data,
int  len 
)

Generate a vector of random numbers

References SIG_SCALING.

Referenced by nb_decode(), and noise_codebook_unquant().

void* speex_realloc ( void *  ptr,
int  size 
)

Speex wrapper for realloc. To do your own dynamic allocation, all you need to do is replace this function, speex_alloc and speex_free

Referenced by speex_bits_pack(), speex_bits_read_from(), and speex_bits_read_whole_bytes().

void speex_warning ( const char *  str  ) 

void speex_warning_int ( const char *  str,
int  val 
)


Generated on Wed May 7 21:15:05 2008 for speex by  doxygen 1.5.5