TwiceAsNice  2019-02-18
Functions
libdspau-convert.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "libdspau.h"
Include dependency graph for libdspau-convert.c:

Functions

int dspau_u8todouble (unsigned char *in, double *out, int len)
 Convert an 8bit unsigned array into a double array. More...
 
int dspau_u16todouble (unsigned short int *in, double *out, int len)
 Convert a 16bit unsigned array into a double array. More...
 
int dspau_u32todouble (unsigned int *in, double *out, int len)
 Convert a 32bit unsigned array into a double array. More...
 
int dspau_u64todouble (unsigned long int *in, double *out, int len)
 Convert a 64bit unsigned array into a double array. More...
 
int dspau_s8todouble (signed char *in, double *out, int len)
 Convert an 8bit signed array into a double array. More...
 
int dspau_s16todouble (signed short int *in, double *out, int len)
 Convert a 16bit signed array into a double array. More...
 
int dspau_s32todouble (signed int *in, double *out, int len)
 Convert a 32bit signed array into a double array. More...
 
int dspau_s64todouble (signed long int *in, double *out, int len)
 Convert a 64bit signed array into a double array. More...
 
int dspau_doubletou8 (double *in, unsigned char *out, int len)
 Convert a double array into a 8bit unsigned array. More...
 
int dspau_doubletou16 (double *in, unsigned short int *out, int len)
 Convert a double array into a 16bit unsigned array. More...
 
int dspau_doubletou32 (double *in, unsigned int *out, int len)
 Convert a double array into a 32bit unsigned array. More...
 
int dspau_doubletou64 (double *in, unsigned long int *out, int len)
 Convert a double array into a 64bit unsigned array. More...
 
int dspau_doubletos8 (double *in, signed char *out, int len)
 Convert a double array into an 8bit signed array. More...
 
int dspau_doubletos16 (double *in, signed short int *out, int len)
 Convert a double array into a 16bit signed array. More...
 
int dspau_doubletos32 (double *in, signed int *out, int len)
 Convert a double array into a 32bit signed array. More...
 
int dspau_doubletos64 (double *in, signed long int *out, int len)
 Convert a double array into a 64bit signed array. More...
 

Function Documentation

◆ dspau_doubletos16()

int dspau_doubletos16 ( double *  in,
signed short int *  out,
int  len 
)

Convert a double array into a 16bit signed array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_doubletos32()

int dspau_doubletos32 ( double *  in,
signed int *  out,
int  len 
)

Convert a double array into a 32bit signed array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_doubletos64()

int dspau_doubletos64 ( double *  in,
signed long int *  out,
int  len 
)

Convert a double array into a 64bit signed array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_doubletos8()

int dspau_doubletos8 ( double *  in,
signed char *  out,
int  len 
)

Convert a double array into an 8bit signed array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_doubletou16()

int dspau_doubletou16 ( double *  in,
unsigned short int *  out,
int  len 
)

Convert a double array into a 16bit unsigned array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_doubletou32()

int dspau_doubletou32 ( double *  in,
unsigned int *  out,
int  len 
)

Convert a double array into a 32bit unsigned array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_doubletou64()

int dspau_doubletou64 ( double *  in,
unsigned long int *  out,
int  len 
)

Convert a double array into a 64bit unsigned array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_doubletou8()

int dspau_doubletou8 ( double *  in,
unsigned char *  out,
int  len 
)

Convert a double array into a 8bit unsigned array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_s16todouble()

int dspau_s16todouble ( signed short int *  in,
double *  out,
int  len 
)

Convert a 16bit signed array into a double array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_s32todouble()

int dspau_s32todouble ( signed int *  in,
double *  out,
int  len 
)

Convert a 32bit signed array into a double array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_s64todouble()

int dspau_s64todouble ( signed long int *  in,
double *  out,
int  len 
)

Convert a 64bit signed array into a double array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_s8todouble()

int dspau_s8todouble ( signed char *  in,
double *  out,
int  len 
)

Convert an 8bit signed array into a double array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_u16todouble()

int dspau_u16todouble ( unsigned short int *  in,
double *  out,
int  len 
)

Convert a 16bit unsigned array into a double array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_u32todouble()

int dspau_u32todouble ( unsigned int *  in,
double *  out,
int  len 
)

Convert a 32bit unsigned array into a double array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_u64todouble()

int dspau_u64todouble ( unsigned long int *  in,
double *  out,
int  len 
)

Convert a 64bit unsigned array into a double array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_u8todouble()

int dspau_u8todouble ( unsigned char *  in,
double *  out,
int  len 
)

Convert an 8bit unsigned array into a double array.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.