diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-11 15:33:28 -0500 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-11 15:33:28 -0500 |
| commit | 6cfc54f019ea793c75c012af9c8249eac936cfac (patch) | |
| tree | f19eed64e9b284136f3b802d4dee71ee24978646 /vendor/fmod/inc/fmod_output.h | |
| parent | 456122f5f0086ed0dbe1b784266b96e9624aa8e1 (diff) | |
| download | ether-6cfc54f019ea793c75c012af9c8249eac936cfac.tar.gz ether-6cfc54f019ea793c75c012af9c8249eac936cfac.tar.bz2 ether-6cfc54f019ea793c75c012af9c8249eac936cfac.zip | |
Added music and lamp popping sound
Diffstat (limited to 'vendor/fmod/inc/fmod_output.h')
| -rw-r--r-- | vendor/fmod/inc/fmod_output.h | 122 |
1 files changed, 122 insertions, 0 deletions
| diff --git a/vendor/fmod/inc/fmod_output.h b/vendor/fmod/inc/fmod_output.h new file mode 100644 index 0000000..0d511a0 --- /dev/null +++ b/vendor/fmod/inc/fmod_output.h | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* ======================================================================================== */ | ||
| 2 | /* FMOD Core API - output development header file. */ | ||
| 3 | /* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ | ||
| 4 | /* */ | ||
| 5 | /* Use this header if you are wanting to develop your own output plugin to use with */ | ||
| 6 | /* FMOD's output system. With this header you can make your own output plugin that FMOD */ | ||
| 7 | /* can register and use. See the documentation and examples on how to make a working */ | ||
| 8 | /* plugin. */ | ||
| 9 | /* */ | ||
| 10 | /* For more detail visit: */ | ||
| 11 | /* https://fmod.com/resources/documentation-api?version=2.0&page=plugin-api-output.html */ | ||
| 12 | /* ======================================================================================== */ | ||
| 13 | #ifndef _FMOD_OUTPUT_H | ||
| 14 | #define _FMOD_OUTPUT_H | ||
| 15 | |||
| 16 | typedef struct FMOD_OUTPUT_STATE FMOD_OUTPUT_STATE; | ||
| 17 | typedef struct FMOD_OUTPUT_OBJECT3DINFO FMOD_OUTPUT_OBJECT3DINFO; | ||
| 18 | |||
| 19 | /* | ||
| 20 | Output constants | ||
| 21 | */ | ||
| 22 | #define FMOD_OUTPUT_PLUGIN_VERSION 5 | ||
| 23 | |||
| 24 | typedef unsigned int FMOD_OUTPUT_METHOD; | ||
| 25 | #define FMOD_OUTPUT_METHOD_MIX_DIRECT 0 | ||
| 26 | #define FMOD_OUTPUT_METHOD_MIX_BUFFERED 1 | ||
| 27 | |||
| 28 | /* | ||
| 29 | Output callbacks | ||
| 30 | */ | ||
| 31 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int *numdrivers); | ||
| 32 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_GETDRIVERINFO_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels); | ||
| 33 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_INIT_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int selecteddriver, FMOD_INITFLAGS flags, int *outputrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels, FMOD_SOUND_FORMAT *outputformat, int dspbufferlength, int *dspnumbuffers, int *dspnumadditionalbuffers, void *extradriverdata); | ||
| 34 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_START_CALLBACK) (FMOD_OUTPUT_STATE *output_state); | ||
| 35 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_STOP_CALLBACK) (FMOD_OUTPUT_STATE *output_state); | ||
| 36 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_CLOSE_CALLBACK) (FMOD_OUTPUT_STATE *output_state); | ||
| 37 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_UPDATE_CALLBACK) (FMOD_OUTPUT_STATE *output_state); | ||
| 38 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_GETHANDLE_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void **handle); | ||
| 39 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_MIXER_CALLBACK) (FMOD_OUTPUT_STATE *output_state); | ||
| 40 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int *maxhardwareobjects); | ||
| 41 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void **object3d); | ||
| 42 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_OBJECT3DFREE_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void *object3d); | ||
| 43 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void *object3d, const FMOD_OUTPUT_OBJECT3DINFO *info); | ||
| 44 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_OPENPORT_CALLBACK) (FMOD_OUTPUT_STATE *output_state, FMOD_PORT_TYPE portType, FMOD_PORT_INDEX portIndex, int *portId, int *portRate, int *portChannels, FMOD_SOUND_FORMAT *portFormat); | ||
| 45 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_CLOSEPORT_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int portId); | ||
| 46 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_DEVICELISTCHANGED_CALLBACK)(FMOD_OUTPUT_STATE *output_state); | ||
| 47 | |||
| 48 | /* | ||
| 49 | Output functions | ||
| 50 | */ | ||
| 51 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_READFROMMIXER_FUNC) (FMOD_OUTPUT_STATE *output_state, void *buffer, unsigned int length); | ||
| 52 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_COPYPORT_FUNC) (FMOD_OUTPUT_STATE *output_state, int portId, void *buffer, unsigned int length); | ||
| 53 | typedef FMOD_RESULT (F_CALL *FMOD_OUTPUT_REQUESTRESET_FUNC) (FMOD_OUTPUT_STATE *output_state); | ||
| 54 | typedef void * (F_CALL *FMOD_OUTPUT_ALLOC_FUNC) (unsigned int size, unsigned int align, const char *file, int line); | ||
| 55 | typedef void (F_CALL *FMOD_OUTPUT_FREE_FUNC) (void *ptr, const char *file, int line); | ||
| 56 | typedef void (F_CALL *FMOD_OUTPUT_LOG_FUNC) (FMOD_DEBUG_FLAGS level, const char *file, int line, const char *function, const char *string, ...); | ||
| 57 | |||
| 58 | /* | ||
| 59 | Output structures | ||
| 60 | */ | ||
| 61 | typedef struct FMOD_OUTPUT_DESCRIPTION | ||
| 62 | { | ||
| 63 | unsigned int apiversion; | ||
| 64 | const char *name; | ||
| 65 | unsigned int version; | ||
| 66 | FMOD_OUTPUT_METHOD method; | ||
| 67 | FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK getnumdrivers; | ||
| 68 | FMOD_OUTPUT_GETDRIVERINFO_CALLBACK getdriverinfo; | ||
| 69 | FMOD_OUTPUT_INIT_CALLBACK init; | ||
| 70 | FMOD_OUTPUT_START_CALLBACK start; | ||
| 71 | FMOD_OUTPUT_STOP_CALLBACK stop; | ||
| 72 | FMOD_OUTPUT_CLOSE_CALLBACK close; | ||
| 73 | FMOD_OUTPUT_UPDATE_CALLBACK update; | ||
| 74 | FMOD_OUTPUT_GETHANDLE_CALLBACK gethandle; | ||
| 75 | FMOD_OUTPUT_MIXER_CALLBACK mixer; | ||
| 76 | FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK object3dgetinfo; | ||
| 77 | FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK object3dalloc; | ||
| 78 | FMOD_OUTPUT_OBJECT3DFREE_CALLBACK object3dfree; | ||
| 79 | FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK object3dupdate; | ||
| 80 | FMOD_OUTPUT_OPENPORT_CALLBACK openport; | ||
| 81 | FMOD_OUTPUT_CLOSEPORT_CALLBACK closeport; | ||
| 82 | FMOD_OUTPUT_DEVICELISTCHANGED_CALLBACK devicelistchanged; | ||
| 83 | } FMOD_OUTPUT_DESCRIPTION; | ||
| 84 | |||
| 85 | struct FMOD_OUTPUT_STATE | ||
| 86 | { | ||
| 87 | void *plugindata; | ||
| 88 | FMOD_OUTPUT_READFROMMIXER_FUNC readfrommixer; | ||
| 89 | FMOD_OUTPUT_ALLOC_FUNC alloc; | ||
| 90 | FMOD_OUTPUT_FREE_FUNC free; | ||
| 91 | FMOD_OUTPUT_LOG_FUNC log; | ||
| 92 | FMOD_OUTPUT_COPYPORT_FUNC copyport; | ||
| 93 | FMOD_OUTPUT_REQUESTRESET_FUNC requestreset; | ||
| 94 | }; | ||
| 95 | |||
| 96 | struct FMOD_OUTPUT_OBJECT3DINFO | ||
| 97 | { | ||
| 98 | float *buffer; | ||
| 99 | unsigned int bufferlength; | ||
| 100 | FMOD_VECTOR position; | ||
| 101 | float gain; | ||
| 102 | float spread; | ||
| 103 | float priority; | ||
| 104 | }; | ||
| 105 | |||
| 106 | /* | ||
| 107 | Output macros | ||
| 108 | */ | ||
| 109 | #define FMOD_OUTPUT_READFROMMIXER(_state, _buffer, _length) \ | ||
| 110 | (_state)->readfrommixer(_state, _buffer, _length) | ||
| 111 | #define FMOD_OUTPUT_ALLOC(_state, _size, _align) \ | ||
| 112 | (_state)->alloc(_size, _align, __FILE__, __LINE__) | ||
| 113 | #define FMOD_OUTPUT_FREE(_state, _ptr) \ | ||
| 114 | (_state)->free(_ptr, __FILE__, __LINE__) | ||
| 115 | #define FMOD_OUTPUT_LOG(_state, _level, _location, _format, ...) \ | ||
| 116 | (_state)->log(_level, __FILE__, __LINE__, _location, _format, __VA_ARGS__) | ||
| 117 | #define FMOD_OUTPUT_COPYPORT(_state, _id, _buffer, _length) \ | ||
| 118 | (_state)->copyport(_state, _id, _buffer, _length) | ||
| 119 | #define FMOD_OUTPUT_REQUESTRESET(_state) \ | ||
| 120 | (_state)->requestreset(_state) | ||
| 121 | |||
| 122 | #endif /* _FMOD_OUTPUT_H */ | ||
