Main library file.
More...
#include <stdlib.h>
Go to the source code of this file.
|
| int | openDmfFileIntoBuffer (char *filename, unsigned char *dest, size_t *length) |
| | Use a filename to open a file into a memory buffer. More...
|
| |
| int | decompressDMF (unsigned char *src, size_t src_length, unsigned char *dest) |
| | Takes buffer from openDmfFileIntoBuffer() and decompresses it using miniz.h. More...
|
| |
| int | openDMF (char *filename, unsigned char *dest) |
| | A combination of openDmfFileIntoBuffer() and decompressDMF() More...
|
| |
| int | parseDMF (unsigned char *decompressed_dmf, dmf *dest) |
| | Parse an uncompressed buffer into the dmf type. More...
|
| |
| int | fileToDmfType (char *filename, dmf *dest) |
| | A combination of openDMF() and parseDMF(). Takes a file and puts it int the dmf type. More...
|
| |
| int | dmfToBuffer (dmf src, unsigned char *dest, size_t *size) |
| | The opposite of parseDMF(). Converts dmf type to uncompressed dmf file. More...
|
| |
| int | compressDMF (const unsigned char *src, size_t src_length, unsigned char *dest, size_t *dest_length) |
| | The opposite of decompressDMF(). Converts an uncompressed buffer to a compressed buffer. More...
|
| |
| int | writeDMF (char *filename, dmf src) |
| | A combination of compressDMF() and dmfToBuffer(). Converts dmf type to compressed buffer and writes it to file. More...
|
| |
| void | displayDMF (dmf song) |
| | Print out everything to do with a dmf. More...
|
| |
| int | verifyDMF (char *filename) |
| | Verify a DMF's integrety (or for that matter libdmf's :/) More...
|
| |
| int | freeDMF (dmf *src) |
| | Free a DMF's resources. More...
|
| |
◆ compressDMF()
| int compressDMF |
( |
const unsigned char * |
src, |
|
|
size_t |
src_length, |
|
|
unsigned char * |
dest, |
|
|
size_t * |
dest_length |
|
) |
| |
The opposite of decompressDMF(). Converts an uncompressed buffer to a compressed buffer.
- Parameters
-
| src | The source buffer. |
| src_length | The length of the source buffer |
| dest | destination buffer. |
| dest_length | A variable that gets filled with the size of the destination buffer. |
◆ decompressDMF()
| int decompressDMF |
( |
unsigned char * |
src, |
|
|
size_t |
src_length, |
|
|
unsigned char * |
dest |
|
) |
| |
Takes buffer from openDmfFileIntoBuffer() and decompresses it using miniz.h.
- Parameters
-
| src | The source buffer. |
| src_length | The length of the source buffer. |
| dest | A destination buffers. |
◆ displayDMF()
| void displayDMF |
( |
dmf |
song | ) |
|
Print out everything to do with a dmf.
- Parameters
-
◆ dmfToBuffer()
| int dmfToBuffer |
( |
dmf |
src, |
|
|
unsigned char * |
dest, |
|
|
size_t * |
size |
|
) |
| |
The opposite of parseDMF(). Converts dmf type to uncompressed dmf file.
- Parameters
-
| src | The source dmf |
| dest | destination buffer. |
| size | A variable that gets filled with the size of the destination. |
◆ fileToDmfType()
| int fileToDmfType |
( |
char * |
filename, |
|
|
dmf * |
dest |
|
) |
| |
A combination of openDMF() and parseDMF(). Takes a file and puts it int the dmf type.
- Parameters
-
| filename | The path to the file to open. |
| dest | destination dmf. |
◆ freeDMF()
Free a DMF's resources.
- Parameters
-
◆ openDMF()
| int openDMF |
( |
char * |
filename, |
|
|
unsigned char * |
dest |
|
) |
| |
◆ openDmfFileIntoBuffer()
| int openDmfFileIntoBuffer |
( |
char * |
filename, |
|
|
unsigned char * |
dest, |
|
|
size_t * |
length |
|
) |
| |
Use a filename to open a file into a memory buffer.
- Parameters
-
| filename | The path to the file to open. |
| dest | The buffer write to. |
| length | A variable that gets filled with the size of the destination. |
◆ parseDMF()
| int parseDMF |
( |
unsigned char * |
decompressed_dmf, |
|
|
dmf * |
dest |
|
) |
| |
Parse an uncompressed buffer into the dmf type.
- Parameters
-
| decompressed_dmf | uncompressed buffer to use as input. |
| dest | destination dmf. |
◆ verifyDMF()
| int verifyDMF |
( |
char * |
filename | ) |
|
Verify a DMF's integrety (or for that matter libdmf's :/)
- Parameters
-
| filename | The path to open, verify and close. |
◆ writeDMF()
| int writeDMF |
( |
char * |
filename, |
|
|
dmf |
src |
|
) |
| |
A combination of compressDMF() and dmfToBuffer(). Converts dmf type to compressed buffer and writes it to file.
- Parameters
-
| filename | The path of the file to write to. |
| src | The source dmf. |