2023-05-07 23:47:37 +02:00
|
|
|
#ifndef _API_H_
|
|
|
|
#define _API_H_
|
2024-07-07 21:25:59 +02:00
|
|
|
#include "base/plugins.h" //TODO: to be removed
|
2023-05-14 20:17:51 +02:00
|
|
|
|
2023-05-07 23:47:37 +02:00
|
|
|
#if 0
|
|
|
|
|
2024-07-07 21:25:59 +02:00
|
|
|
/* vgmstream's public API
|
|
|
|
* basic usage (also see api_example.c):
|
|
|
|
* - libvgmstream_get_version() // if needed
|
|
|
|
* - libvgmstream_init(...) // base context
|
|
|
|
* - libvgmstream_setup(...) // standard config
|
|
|
|
* - libvgmstream_open(...) // check detected format
|
|
|
|
* - libvgmstream_play(...) // main decode
|
|
|
|
* - output samples + repeat libvgmstream_play until stream is done
|
|
|
|
* - libvgmstream_free(...) // cleanup
|
|
|
|
*/
|
2023-05-07 23:47:37 +02:00
|
|
|
|
2024-07-07 21:25:59 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
2023-05-07 23:47:37 +02:00
|
|
|
|
2024-07-07 21:25:59 +02:00
|
|
|
/* standard C param call and name mangling (to avoid __stdcall / .defs) */
|
2023-05-07 23:47:37 +02:00
|
|
|
//#define LIBVGMSTREAM_CALL __cdecl //needed?
|
2024-07-07 21:25:59 +02:00
|
|
|
//LIBVGMSTREAM_API (type) LIBVGMSTREAM_CALL libvgmstream_function(...);
|
2023-05-07 23:47:37 +02:00
|
|
|
|
2024-07-07 21:25:59 +02:00
|
|
|
|
|
|
|
/* define external function behavior (during compilation) */
|
2023-05-07 23:47:37 +02:00
|
|
|
#if defined(LIBVGMSTREAM_EXPORT)
|
|
|
|
#define LIBVGMSTREAM_API __declspec(dllexport) /* when exporting/creating vgmstream DLL */
|
|
|
|
#elif defined(LIBVGMSTREAM_IMPORT)
|
|
|
|
#define LIBVGMSTREAM_API __declspec(dllimport) /* when importing/linking vgmstream DLL */
|
|
|
|
#else
|
|
|
|
#define LIBVGMSTREAM_API /* nothing, internal/default */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2024-07-07 21:25:59 +02:00
|
|
|
/* Current API version. Only refers to the API itself, as changes related to formats/etc don't alter it.
|
|
|
|
* vgmstream's features are mostly stable, while this API may change from time to time.
|
|
|
|
* May change as well when related (such as api_streamfile.h) are changed. */
|
|
|
|
#define LIBVGMSTREAM_API_VERSION_MAJOR 1 // breaking API/ABI changes
|
|
|
|
#define LIBVGMSTREAM_API_VERSION_MINOR 0 // compatible API/ABI changes
|
|
|
|
#define LIBVGMSTREAM_API_VERSION_PATCH 0 // fixes
|
2023-05-07 23:47:37 +02:00
|
|
|
|
2024-07-07 21:25:59 +02:00
|
|
|
#include "api_main.h"
|
|
|
|
#include "api_streamfile.h"
|
|
|
|
#include "api_tags.h"
|
2023-05-07 23:47:37 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|