spBase
|
File Size | |
spFileOffset | spGetFileSize (const char *filename, long headsize) |
long | spGetTextFileSize (const char *filename) |
void | spFSkipHeader (long headsize, FILE *fp) |
long | spFSkipByte (long len, FILE *fp) |
#define | spGetSignalLength(filename, headsize, type) (spGetFileSize(filename, headsize) / (spFileOffset)sizeof(type)) |
#define | spFSkipData(len, fp, type) (spFSkipByte((len) * (long)sizeof(type), fp) / (long)sizeof(type)) |
Data Shift | |
void | spShiftShort (short *data, long length, long shift) |
void | spShiftLong (long *data, long length, long shift) |
void | spShiftFloat (float *data, long length, long shift) |
void | spShiftDouble (double *data, long length, long shift) |
Data Swap | |
void | spSwapByte (void *data, long length, int samp_byte) |
void | spSwapShort (short *data, long length) |
void | spSwapLong (long *data, long length) |
void | spSwapLong32 (spLong32 *data, long length) |
void | spSwapULong32 (spULong32 *data, long length) |
void | spSwapFloat (float *data, long length) |
void | spSwapDouble (double *data, long length) |
void | spSwapLong64 (spLong64 *data, long length) |
void | spSwapULong64 (spULong64 *data, long length) |
Read | |
long | spFReadShort (short *data, long length, int swap, FILE *fp) |
long | spFReadLong (long *data, long length, int swap, FILE *fp) |
long | spFReadLong32 (long *data, long length, int swap, FILE *fp) |
long | spFReadULong32 (unsigned long *data, long length, int swap, FILE *fp) |
long | spFReadLong32Direct (spLong32 *data, long length, int swap, FILE *fp) |
long | spFReadULong32Direct (spULong32 *data, long length, int swap, FILE *fp) |
long | spFReadLong24 (long *data, long length, int swap, FILE *fp) |
long | spFReadULong24 (unsigned long *data, long length, int swap, FILE *fp) |
long | spFReadLong64 (spLong64 *data, long length, int swap, FILE *fp) |
long | spFReadULong64 (spULong64 *data, long length, int swap, FILE *fp) |
long | spFReadFloatWeighted (float *data, long length, float weight, int swap, FILE *fp) |
long | spFReadFloat (float *data, long length, int swap, FILE *fp) |
long | spFReadDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFReadDouble (double *data, long length, int swap, FILE *fp) |
long | spFReadByte (short *data, long length, FILE *fp) |
long | spFReadSignedByte (short *data, long length, FILE *fp) |
long | spFReadULaw (short *data, long length, FILE *fp) |
long | spFReadALaw (short *data, long length, FILE *fp) |
long | spFReadINT8 (spINT8 *data, long length, FILE *fp) |
long | spFReadINT16 (spINT16 *data, long length, FILE *fp) |
long | spFReadBYTE (spBYTE *data, long length, FILE *fp) |
long | spFReadWORD (spWORD *data, long length, FILE *fp) |
long | spFReadLONG (spLONG *data, long length, FILE *fp) |
long | spFReadULONG (spULONG *data, long length, FILE *fp) |
long | spFReadShortToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFReadShortToDouble (double *data, long length, int swap, FILE *fp) |
long | spFReadLongToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFReadLongToDouble (double *data, long length, int swap, FILE *fp) |
long | spFReadLong32ToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFReadLong32ToDouble (double *data, long length, int swap, FILE *fp) |
long | spFReadLong24ToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFReadLong24ToDouble (double *data, long length, int swap, FILE *fp) |
long | spFReadFloatToDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFReadFloatToDouble (double *data, long length, int swap, FILE *fp) |
long | spFReadBitToDoubleWeighted (double *data, long length, double weight, int samp_bit, int swap, FILE *fp) |
long | spFReadBitToDouble (double *data, long length, double max, int samp_bit, int swap, FILE *fp) |
#define | spFReadDWORD(data, length, fp) spFReadULONG(data, length, fp) |
Write | |
long | spFWriteShort (short *data, long length, int swap, FILE *fp) |
long | spFWriteLong (long *data, long length, int swap, FILE *fp) |
long | spFWriteLong32 (long *data, long length, int swap, FILE *fp) |
long | spFWriteULong32 (unsigned long *data, long length, int swap, FILE *fp) |
long | spFWriteLong32Direct (spLong32 *data, long length, int swap, FILE *fp) |
long | spFWriteULong32Direct (spULong32 *data, long length, int swap, FILE *fp) |
long | spFWriteLong24 (long *data, long length, int swap, FILE *fp) |
long | spFWriteULong24 (unsigned long *data, long length, int swap, FILE *fp) |
long | spFWriteLong64 (spLong64 *data, long length, int swap, FILE *fp) |
long | spFWriteULong64 (spULong64 *data, long length, int swap, FILE *fp) |
long | spFWriteFloatWeighted (float *data, long length, float weight, int swap, FILE *fp) |
long | spFWriteFloat (float *data, long length, int swap, FILE *fp) |
long | spFWriteDoubleWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFWriteDouble (double *data, long length, int swap, FILE *fp) |
long | spFWriteByte (short *data, long length, FILE *fp) |
long | spFWriteSignedByte (short *data, long length, FILE *fp) |
long | spFWriteULaw (short *data, long length, FILE *fp) |
long | spFWriteALaw (short *data, long length, FILE *fp) |
long | spFWriteINT8 (spINT8 *data, long length, FILE *fp) |
long | spFWriteINT16 (spINT16 *data, long length, FILE *fp) |
long | spFWriteBYTE (spBYTE *data, long length, FILE *fp) |
long | spFWriteWORD (spWORD *data, long length, FILE *fp) |
long | spFWriteLONG (spLONG *data, long length, FILE *fp) |
long | spFWriteULONG (spULONG *data, long length, FILE *fp) |
long | spFWriteDoubleToShortWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFWriteDoubleToShort (double *data, long length, int swap, FILE *fp) |
long | spFWriteDoubleToLongWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFWriteDoubleToLong (double *data, long length, int swap, FILE *fp) |
long | spFWriteDoubleToLong32Weighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFWriteDoubleToLong32 (double *data, long length, int swap, FILE *fp) |
long | spFWriteDoubleToLong24Weighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFWriteDoubleToLong24 (double *data, long length, int swap, FILE *fp) |
long | spFWriteDoubleToFloatWeighted (double *data, long length, double weight, int swap, FILE *fp) |
long | spFWriteDoubleToFloat (double *data, long length, int swap, FILE *fp) |
long | spFWriteDoubleToBitWeighted (double *data, long length, double weight, int samp_bit, int swap, FILE *fp) |
long | spFWriteDoubleToBit (double *data, long length, double max, int samp_bit, int swap, FILE *fp) |
long | spFWriteLong32ToShort (long *data, long length, int swap, FILE *fp) |
long | spFWriteLong24ToShort (long *data, long length, int swap, FILE *fp) |
#define | spFWriteDWORD(data, length, fp) spFWriteULONG(data, length, fp) |
Interleave and Deinterleave | |
long | _spInterleaveData (char *ddata, long dlength, char *idata, long ilength, int num_channel, int samp_byte) |
long | _spDeinterleaveData (char *idata, long ilength, char *ddata, long dlength, int num_channel, int samp_byte) |
#define | spInterleaveData(ddata, dlength, idata, ilength, num_channel, type) _spInterleaveData((char *)(ddata), dlength, (char *)(idata), ilength, num_channel, sizeof(type)) |
#define | spInterleaveShort(ddata, dlength, idata, ilength, num_channel) spInterleaveData(ddata, dlength, idata, ilength, num_channel, short) |
#define | spInterleaveLong(ddata, dlength, idata, ilength, num_channel) spInterleaveData(ddata, dlength, idata, ilength, num_channel, long) |
#define | spInterleaveLong32(ddata, dlength, idata, ilength, num_channel) spInterleaveData(ddata, dlength, idata, ilength, num_channel, spLong32) |
#define | spInterleaveFloat(ddata, dlength, idata, ilength, num_channel) spInterleaveData(ddata, dlength, idata, ilength, num_channel, float) |
#define | spInterleaveDouble(ddata, dlength, idata, ilength, num_channel) spInterleaveData(ddata, dlength, idata, ilength, num_channel, double) |
#define | spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, type) _spDeinterleaveData((char *)(idata), ilength, (char *)(ddata), dlength, num_channel, sizeof(type)) |
#define | spDeinterleaveShort(idata, ilength, ddata, dlength, num_channel) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, short) |
#define | spDeinterleaveLong(idata, ilength, ddata, dlength, num_channel) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, long) |
#define | spDeinterleaveLong32(idata, ilength, ddata, dlength, num_channel) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, spLong32) |
#define | spDeinterleaveFloat(idata, ilength, ddata, dlength, num_channel) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, float) |
#define | spDeinterleaveDouble(idata, ilength, ddata, dlength, num_channel) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, double) |
Text I/O | |
int | spGetNumRow (const char *filename) |
int | spGetNumColumn (const char *filename) |
int | spGetCSVNumRow (const char *filename) |
int | spGetCSVNumColumn (const char *filename) |
int | spFGetNColumn (char *buf, int size, int col, FILE *fp) |
int | spFGetColumn (char *buf, int col, FILE *fp) |
int | spSGetNColumn (char *buf, int size, int col, const char *line) |
int | spSGetColumn (char *buf, int col, const char *line) |
char * | spSGetNextNColumn (char *buf, int size, const char *line) |
int | spFGetCSVNColumn (char *buf, int size, int col, FILE *fp) |
int | spSGetCSVNColumn (char *buf, int size, int col, const char *line) |
char * | spSGetNextCSVNColumn (char *buf, int size, const char *line) |
int | spFGetNLine (char *buf, int size, FILE *fp) |
int | spFGetLine (char *buf, FILE *fp) |
int | spGetNLine (char *buf, int size) |
int | spGetLine (char *buf) |
int | spFPutLine (const char *input, FILE *fp) |
int | spSPutLine (const char *input, char *line, int size) |
int | spFPutString (const char *input, FILE *fp) |
int | spSPutString (const char *input, char *line, int size) |
char * | spFGetNString (char *buf, int size, FILE *fp) |
char * | spGetNString (char *buf, int size) |
char * | spSGetNString (char *buf, int size, const char *string) |
int | spSScanNSetup (const char *line, char *name, int namelen, char *value, int valuelen) |
int | spSScanSetup (const char *line, char *name, char *value) |
#define spGetSignalLength | ( | filename, | |
headsize, | |||
type ) (spGetFileSize(filename, headsize) / (spFileOffset)sizeof(type)) |
Gets the length of the signal file.
#define spFSkipData | ( | len, | |
fp, | |||
type ) (spFSkipByte((len) * (long)sizeof(type), fp) / (long)sizeof(type)) |
Skips a part of the signal file. The origin of this function call is the current position of the file pointer.
#define spFReadDWORD | ( | data, | |
length, | |||
fp ) spFReadULONG(data, length, fp) |
Reads data of DWORD type on Windows from the binary file.
#define spFWriteDWORD | ( | data, | |
length, | |||
fp ) spFWriteULONG(data, length, fp) |
Writes data as DWORD type on Windows to the binary file.
#define spInterleaveData | ( | ddata, | |
dlength, | |||
idata, | |||
ilength, | |||
num_channel, | |||
type ) _spInterleaveData((char *)(ddata), dlength, (char *)(idata), ilength, num_channel, sizeof(type)) |
Interleaves data. For example, for stereo data containing L and R, this function reorders data of LLL...RRR... into that of LRLRLR... .
[in] | ddata | The input buffer. |
[in] | dlength | The number of elements of the input buffer. |
[in] | idata | The output buffer. |
[in] | ilength | The number of elements of the output buffer. |
[in] | num_channel | The number of channels. |
[in] | type | The type of data such as short, long, float or double. |
#define spInterleaveShort | ( | ddata, | |
dlength, | |||
idata, | |||
ilength, | |||
num_channel ) spInterleaveData(ddata, dlength, idata, ilength, num_channel, short) |
Interleaves data of short type.
#define spInterleaveLong | ( | ddata, | |
dlength, | |||
idata, | |||
ilength, | |||
num_channel ) spInterleaveData(ddata, dlength, idata, ilength, num_channel, long) |
Interleaves data of long type.
#define spInterleaveLong32 | ( | ddata, | |
dlength, | |||
idata, | |||
ilength, | |||
num_channel ) spInterleaveData(ddata, dlength, idata, ilength, num_channel, spLong32) |
Interleaves data of spLong32 type.
#define spInterleaveFloat | ( | ddata, | |
dlength, | |||
idata, | |||
ilength, | |||
num_channel ) spInterleaveData(ddata, dlength, idata, ilength, num_channel, float) |
Interleaves data of float type.
#define spInterleaveDouble | ( | ddata, | |
dlength, | |||
idata, | |||
ilength, | |||
num_channel ) spInterleaveData(ddata, dlength, idata, ilength, num_channel, double) |
Interleaves data of double type.
#define spDeinterleaveData | ( | idata, | |
ilength, | |||
ddata, | |||
dlength, | |||
num_channel, | |||
type ) _spDeinterleaveData((char *)(idata), ilength, (char *)(ddata), dlength, num_channel, sizeof(type)) |
Deinterleaves data. For example, for stereo data containing L and R, this function reorders data of LRLRLR... into that of LLL...RRR... .
[in] | idata | The input buffer. |
[in] | ilength | The number of elements of the input buffer. |
[in] | ddata | The output buffer. |
[in] | dlength | The number of elements of the output buffer. |
[in] | num_channel | The number of channels. |
[in] | type | The type of data such as short, long, float or double. |
#define spDeinterleaveShort | ( | idata, | |
ilength, | |||
ddata, | |||
dlength, | |||
num_channel ) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, short) |
Deinterleaves data of short type.
#define spDeinterleaveLong | ( | idata, | |
ilength, | |||
ddata, | |||
dlength, | |||
num_channel ) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, long) |
Deinterleaves data of long type.
#define spDeinterleaveLong32 | ( | idata, | |
ilength, | |||
ddata, | |||
dlength, | |||
num_channel ) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, spLong32) |
Deinterleaves data of spLong type.
#define spDeinterleaveFloat | ( | idata, | |
ilength, | |||
ddata, | |||
dlength, | |||
num_channel ) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, float) |
Deinterleaves data of float type.
#define spDeinterleaveDouble | ( | idata, | |
ilength, | |||
ddata, | |||
dlength, | |||
num_channel ) spDeinterleaveData(idata, ilength, ddata, dlength, num_channel, double) |
Deinterleaves data of double type.
|
extern |
Gets the size of the binary file.
|
extern |
Gets the size of the text file. This size corresponds to the number of valid lines excluding comment lines which begin with '#' in the file.
|
extern |
Skips the header of the binary file. The origin of this function call is always beginning of a file.
|
extern |
Skips a part of the binary file. The origin of this function call is the current position of the file pointer.
|
extern |
Shifts contents of the buffer of short type.
|
extern |
Shifts contents of the buffer of long type.
|
extern |
Shifts contents of the buffer of float type.
|
extern |
Shifts contents of the buffer of double type.
|
extern |
Byte-swaps all elements of the buffer for any type.
|
extern |
Byte-swaps all elements of the buffer of short type.
|
extern |
Byte-swaps all elements of the buffer of long type.
|
extern |
Byte-swaps all elements of the buffer of spLong32 type.
|
extern |
Byte-swaps all elements of the buffer of spULong32 type.
|
extern |
Byte-swaps all elements of the buffer of float type.
|
extern |
Byte-swaps all elements of the buffer of double type.
|
extern |
Byte-swaps all elements of the buffer of spLong64 (64-bit long) type.
|
extern |
Byte-swaps all elements of the buffer of spULong64 (64-bit unsigned long) type.
|
extern |
Reads data of short type from the binary file.
|
extern |
Reads data of long type from the binary file.
|
extern |
Reads data of 32-bit integer from the binary file.
|
extern |
Reads data of 32-bit unsigned integer from the binary file.
|
extern |
Reads data of 32-bit integer from the binary file to the 32-bit integer buffer.
|
extern |
Reads data of 32-bit unsigned integer from the binary file to the 32-bit unsigned integer buffer.
|
extern |
Reads data of 24-bit integer from the binary file.
|
extern |
Reads data of 24-bit unsigned integer from the binary file.
|
extern |
Reads data of 64-bit integer from the binary file.
|
extern |
Reads data of 64-bit unsigned integer from the binary file.
|
extern |
Reads data of float type from the binary file.
|
extern |
Reads data of float type from the binary file.
|
extern |
Reads data of double type from the binary file.
|
extern |
Reads data of double type from the binary file.
|
extern |
Reads data of 8-bit unsigned integer from the binary file.
|
extern |
Reads data of 8-bit signed integer from the binary file.
|
extern |
Reads data of u-law from the binary file.
|
extern |
Reads data of a-law from the binary file.
|
extern |
Reads data of INT8 type on Windows from the binary file.
|
extern |
Reads data of INT16 type on Windows from the binary file.
|
extern |
Reads data of BYTE type on Windows from the binary file.
|
extern |
Reads data of WORD type on Windows from the binary file.
|
extern |
Reads data of LONG type on Windows from the binary file.
|
extern |
Reads data of ULONG type on Windows from the binary file.
|
extern |
Reads data of short type to double array from the binary file.
|
extern |
Reads data of short type to double array from the binary file.
|
extern |
Reads data of long type to double array from the binary file.
|
extern |
Reads data of long type to double array from the binary file.
|
extern |
Reads data of 32-bit integer to double array from the binary file.
|
extern |
Reads data of 32-bit integer to double array from the binary file.
|
extern |
Reads data of 24-bit integer to double array from the binary file.
|
extern |
Reads data of 24-bit integer to double array from the binary file.
|
extern |
Reads data of float type to double array from the binary file.
|
extern |
Reads data of float type to double array from the binary file.
|
extern |
Reads data of specified bit format to double array from the binary file.
|
extern |
Reads data of specified bit format to double array from the binary file.
|
extern |
Writes data of short type to the binary file.
|
extern |
Writes data of long type to the binary file.
|
extern |
Writes data of long type to the binary file as that of 32-bit integer.
|
extern |
Writes data of long type to the binary file as that of 32-bit unsigned integer.
|
extern |
Writes data of spLong32 type to the binary file.
|
extern |
Writes data of spULong32 type to the binary file.
|
extern |
Writes data of long type to the binary file as that of 24-bit integer.
|
extern |
Writes data of unsigned long type to the binary file as that of 24-bit unsigned integer.
|
extern |
Writes data of spLong type to the binary file.
|
extern |
Writes data of spULong type to the binary file.
|
extern |
Writes data of float type to the binary file.
|
extern |
Writes data of float type to the binary file.
|
extern |
Writes data of double type to the binary file.
|
extern |
Writes data of double type to the binary file.
|
extern |
Writes data of short type to the binary file as that of 8-bit unsigned integer.
|
extern |
Writes data of short type to the binary file as that of 8-bit signed integer.
|
extern |
Writes data of short type to the binary file as that of u-law.
|
extern |
Writes data of short type to the binary file as that of a-law.
|
extern |
Writes data as INT8 type on Windows to the binary file.
|
extern |
Writes data as INT16 type on Windows to the binary file.
|
extern |
Writes data as BYTE type on Windows to the binary file.
|
extern |
Writes data as WORD type on Windows to the binary file.
|
extern |
Writes data as LONG type on Windows to the binary file.
|
extern |
Writes data as ULONG type on Windows to the binary file.
|
extern |
Writes data of double type to the binary file as that of short type.
|
extern |
Writes data of double type to the binary file as that of short type.
|
extern |
Writes data of double type to the binary file as that of long type.
|
extern |
Writes data of double type to the binary file as that of long type.
|
extern |
Writes data of double type to the binary file as that of 32-bit integer.
|
extern |
Writes data of double type to the binary file as that of 32-bit integer.
|
extern |
Writes data of double type to the binary file as that of 24-bit integer.
|
extern |
Writes data of double type to the binary file as that of 24-bit integer.
|
extern |
Writes data of double type to the binary file as that of float type.
|
extern |
Writes data of double type to the binary file as that of float type.
|
extern |
Writes data of double type to the binary file as that of specified bit format.
|
extern |
Writes data of double type to the binary file as that of specified bit format.
|
extern |
Writes data of long type to the binary file as that of short type.
|
extern |
Writes data of long type to the binary file as that of short type.
|
extern |
Interleaves data. Use spInterleaveData() instead of this function.
|
extern |
Deinterleaves data. Use spDeinterleaveData() instead of this function.
|
extern |
Gets the number of rows of the text file.
|
extern |
Gets the number of columns of the text file. This function reads data based on the following rules:
|
extern |
Gets the number of rows of the CSV file.
|
extern |
Gets the number of columns of the CSV file.
|
extern |
Gets a column from the text file. This function reads data based on the following rules:
|
extern |
Gets a column from the text file. This function reads data based on the following rules:
|
extern |
Gets a column from the specified line. This function reads data based on the following rules:
|
extern |
Gets a column from the specified line. This function reads data based on the following rules:
|
extern |
Gets a column from the specified line and returns the address of the next column. This function reads data based on the following rules:
|
extern |
Gets a column from the CSV file.
|
extern |
Gets a column from the specified CSV line.
|
extern |
Gets a column from the specified CSV line and returns the address of the next column.
|
extern |
Gets a line from the text file. This function reads data based on the following rules:
|
extern |
Gets a line from the text file. This function reads data based on the following rules:
|
extern |
Gets a line from the standard input. This function reads data based on the following rules:
|
extern |
Gets a line from the standard input. This function reads data based on the following rules:
|
extern |
Puts a line to the text file. '#', '\', '"' and "'" are escaped by '\'. The line feed character is not implicitly added.
|
extern |
Puts a line to the buffer. '#', '\', '"' and "'" are escaped by '\'.
|
extern |
Puts a column to the text file. '#', '\', '"' and "'" are escaped by '\'. A string that includes white spaces or tabs will be quoted by '"'.
|
extern |
Puts a column to the buffer. '#', '\', '"' and "'" are escaped by '\'. A string that includes white spaces or tabs will be quoted by '"'.
|
extern |
Gets a string to the line end from the text file. Multiple lines escaped by '\' at the end of each line will be treated as a single line.
|
extern |
Gets a string to the line end from the standard input. Multiple lines escaped by '\' at the end of each line will be treated as a single line.
|
extern |
Gets a string to the line end from the buffer and returns the address of the next string. Multiple lines escaped by '\' at the end of each line will be treated as a single line.
|
extern |
Extracts the parameter name and the parameter value from the line of the setup file.
|
extern |
Extracts the parameter name and the parameter value from the line of the setup file.