- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# misc.h File Reference

Various compatibility routines for Speex. More...

`#include "arch.h"`

## Defines
#define | SPEEX_MAJOR_VERSION 1
#define | SPEEX_MINOR_VERSION 1
#define | SPEEX_MICRO_VERSION 12
#define | SPEEX_EXTRA_VERSION ""
#define | SPEEX_VERSION "speex-1.1.12"
## 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_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_memcpy_bytes (char *dst, char *src, int nbytes)
void | speex_memset_bytes (char *dst, char src, int nbytes)
void | speex_error (const char *str)
void | speex_warning (const char *str)
void | speex_warning_int (const char *str, int val)
void | speex_rand_vec (float std, spx_sig_t *data, int len)
spx_word32_t | speex_rand (spx_word16_t std, spx_int32_t *seed)
void | _speex_putc (int ch, void *file)

## Detailed Description

Various compatibility routines for Speex.

## Define Documentation

#define SPEEX_EXTRA_VERSION ""

Extra Speex version.

#define SPEEX_MAJOR_VERSION 1

Major Speex version.

#define SPEEX_MICRO_VERSION 12

Micro Speex version.

#define SPEEX_MINOR_VERSION 1

Minor Speex version.

#define SPEEX_VERSION "speex-1.1.12"

Speex version string.

## Function Documentation

void _speex_putc | ( | int | ch,
|  | void * | file |
| ) |  |  |

Speex wrapper for putc

spx_uint32_t be_int | ( | spx_uint32_t | i | ) |

Convert big endian

spx_uint32_t le_int | ( | spx_uint32_t | i | ) |

Convert little endian

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

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)

void speex_error | ( | const char * | str | ) |

Print error message to stderr

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

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)

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

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

Speex wrapper for mem_move

spx_word32_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

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

void speex_warning | ( | const char * | str | ) |

Print warning message to stderr

void speex_warning_int | ( | const char * | str,
|  | int | val |
| ) |  |  |

Print warning message with integer argument to stderr