fixes compiler error 'Incompatible pointer types'

This commit is contained in:
onyx-and-iris 2024-07-03 15:25:16 +01:00
parent 8aeb793a41
commit fb54c4a492

View File

@ -1,5 +1,5 @@
/******************************************************************************/
/* Voicemeeter Remote API. V.Burel©2015-2023 */
/* Voicemeeter Remote API. V.Burel<EFBFBD>2015-2023 */
/******************************************************************************/
/* This Library allows communication with Voicemeeter applications */
/* 4 Client Applications can be connected to remote Voicemeeter. */
@ -19,15 +19,14 @@
/* long = 32 bit integer */
/******************************************************************************/
#ifndef __VOICEMEETER_REMOTE_H__
#define __VOICEMEETER_REMOTE_H__
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
#define VBVMR_RESULT_OK 0
/******************************************************************************/
@ -56,7 +55,6 @@ long __stdcall VBVMR_Login(void);
long __stdcall VBVMR_Logout(void);
/**
@brief Run Voicemeeter Application (get installation directory and run Voicemeeter Application).
@param vType : Voicemeeter type (1 = Voicemeeter, 2= Voicemeeter Banana, 3= Voicemeeter Potato, 6 = Potato x64 bits).
@ -67,19 +65,8 @@ long __stdcall VBVMR_Logout(void);
long __stdcall VBVMR_RunVoicemeeter(long vType);
/** @} */
/******************************************************************************/
/* */
/* General Information */
@ -134,26 +121,8 @@ long __stdcall VBVMR_GetVoicemeeterType(long * pType);
long __stdcall VBVMR_GetVoicemeeterVersion(long *pVersion);
/** @} */
/******************************************************************************/
/* */
/* Get parameters */
@ -205,14 +174,6 @@ long __stdcall VBVMR_GetParameterStringW(char * szParamName, unsigned short * ws
/** @} */
/******************************************************************************/
/* */
/* Get levels */
@ -283,7 +244,6 @@ long __stdcall VBVMR_GetParameterStringW(char * szParamName, unsigned short * ws
long __stdcall VBVMR_GetLevel(long nType, long nuChannel, float *pValue);
/**
@brief Get MIDI message from M.I.D.I. input device used by Voicemeeter M.I.D.I. mapping.
(this function must be called from one thread only)
@ -301,10 +261,8 @@ long __stdcall VBVMR_GetLevel(long nType, long nuChannel, float * pValue);
-6: no MIDI data
*/
long __stdcall VBVMR_GetMidiMessage(unsigned char *pMIDIBuffer, long nbByteMax);
/**
@brief Send MIDI message to M.I.D.I. output device used by Voicemeeter M.I.D.I. mapping.
(this function must be called from one thread only)
@ -319,21 +277,10 @@ long __stdcall VBVMR_GetMidiMessage(unsigned char *pMIDIBuffer, long nbByteMax);
-5: cannot send MIDI data
*/
long __stdcall VBVMR_SendMidiMessage(unsigned char *pMIDIBuffer, long nbByte);
/** @} */
/******************************************************************************/
/* */
/* Set Parameters */
@ -361,8 +308,6 @@ long __stdcall VBVMR_SendMidiMessage(unsigned char *pMIDIBuffer, long nbByte);
long __stdcall VBVMR_SetParameterFloat(char *szParamName, float Value);
/**
@brief Set a single string parameters .
@param szParamName : Null Terminal ASCII String giving the name of the parameter (see parameters name table)
@ -379,13 +324,9 @@ long __stdcall VBVMR_SetParameterFloat(char * szParamName, float Value);
*/
long __stdcall VBVMR_SetParameterStringA(char *szParamName, char *szString);
long __stdcall VBVMR_SetParameterStringW(char *szParamName, unsigned short *wszString);
/**
@brief Set one or several parameters by a script ( < 48 kB ).
@param szParamName : Null Terminal ASCII String giving the script
@ -410,24 +351,12 @@ long __stdcall VBVMR_SetParameterStringW(char * szParamName, unsigned short * ws
long __stdcall VBVMR_SetParameters(char *szParamScript);
long __stdcall VBVMR_SetParametersW(unsigned short *szParamScript);
/** @} */
/******************************************************************************/
/* DEVICES ENUMERATOR */
/******************************************************************************/
/** @name Device Enumeration Functions
* @{ */
@ -474,15 +403,8 @@ long __stdcall VBVMR_Input_GetDeviceNumber(void);
long __stdcall VBVMR_Input_GetDeviceDescA(long zindex, long *nType, char *szDeviceName, char *szHardwareId);
long __stdcall VBVMR_Input_GetDeviceDescW(long zindex, long *nType, unsigned short *wszDeviceName, unsigned short *wszHardwareId);
/** @} */
/******************************************************************************/
/* VB-AUDIO CALLBACK */
/******************************************************************************/
@ -497,14 +419,12 @@ long __stdcall VBVMR_Input_GetDeviceDescW(long zindex, long * nType, unsigned sh
/** @name VB-Audio Callback Functions
* @{ */
typedef struct tagVBVMR_AUDIOINFO
{
long samplerate;
long nbSamplePerFrame;
} VBVMR_T_AUDIOINFO, *VBVMR_PT_AUDIOINFO, *VBVMR_LPT_AUDIOINFO;
typedef struct tagVBVMR_AUDIOBUFFER
{
long audiobuffer_sr; // Sampling Rate
@ -515,7 +435,6 @@ typedef struct tagVBVMR_AUDIOBUFFER
float *audiobuffer_w[128]; // nbo output pointers containing frame of nbs sample (of 32bits float)
} VBVMR_T_AUDIOBUFFER, *VBVMR_PT_AUDIOBUFFER, *VBVMR_LPT_AUDIOBUFFER;
/**
@brief VB-AUDIO Callback is called for different task to Initialize, perform and end your process.
VB-AUDIO Callback is part of single TIME CRITICAL Thread.
@ -533,10 +452,8 @@ typedef struct tagVBVMR_AUDIOBUFFER
@return : 0: always 0 (unused).
*/
typedef long(__stdcall *T_VBVMR_VBAUDIOCALLBACK)(void *lpUser, long nCommand, void *lpData, long nnn);
#define VBVMR_CBCOMMAND_STARTING 1 // command to initialize data according SR and buffer size
// info = (VBVMR_LPT_AUDIOINFO)lpData
@ -696,7 +613,6 @@ long __stdcall VBVMR_AudioCallbackRegister(long mode, T_VBVMR_VBAUDIOCALLBACK pC
long __stdcall VBVMR_AudioCallbackStart(void);
long __stdcall VBVMR_AudioCallbackStop(void);
/**
@brief unregister your callback to release voicemeeter virtual driver
(this function will automatically call VBVMR_AudioCallbackStop() function)
@ -708,15 +624,8 @@ long __stdcall VBVMR_AudioCallbackStop(void);
long __stdcall VBVMR_AudioCallbackUnregister(void);
/** @} */
/******************************************************************************/
/* */
/* Macro Buttons */
@ -772,62 +681,49 @@ long __stdcall VBVMR_MacroButton_SetStatus(long nuLogicalButton, float fValue, l
#define VBVMR_MACROBUTTON_MODE_TRIGGER 0x00000003 // change Trigger State
#define VBVMR_MACROBUTTON_MODE_COLOR 0x00000004 // change color
/** @} */
/******************************************************************************/
/* 'C' STRUCTURED INTERFACE */
/******************************************************************************/
typedef long (__stdcall *T_VBVMR_Login)(void);
typedef long (__stdcall *T_VBVMR_Logout)(void);
typedef long (__stdcall *T_VBVMR_RunVoicemeeter)(long vType);
typedef long long(__stdcall *T_VBVMR_Login)(void);
typedef long long(__stdcall *T_VBVMR_Logout)(void);
typedef long long(__stdcall *T_VBVMR_RunVoicemeeter)(long vType);
typedef long (__stdcall *T_VBVMR_GetVoicemeeterType)(long * pType);
typedef long (__stdcall *T_VBVMR_GetVoicemeeterVersion)(long * pVersion);
typedef long long(__stdcall *T_VBVMR_GetVoicemeeterType)(long *pType);
typedef long long(__stdcall *T_VBVMR_GetVoicemeeterVersion)(long *pVersion);
typedef long (__stdcall *T_VBVMR_IsParametersDirty)(void);
typedef long (__stdcall *T_VBVMR_GetParameterFloat)(char * szParamName, float * pValue);
typedef long (__stdcall *T_VBVMR_GetParameterStringA)(char * szParamName, char * szString);
typedef long (__stdcall *T_VBVMR_GetParameterStringW)(char * szParamName, unsigned short * wszString);
typedef long long(__stdcall *T_VBVMR_IsParametersDirty)(void);
typedef long long(__stdcall *T_VBVMR_GetParameterFloat)(char *szParamName, float *pValue);
typedef long long(__stdcall *T_VBVMR_GetParameterStringA)(char *szParamName, char *szString);
typedef long long(__stdcall *T_VBVMR_GetParameterStringW)(char *szParamName, unsigned short *wszString);
typedef long long(__stdcall *T_VBVMR_GetLevel)(long nType, long nuChannel, float *pValue);
typedef long long(__stdcall *T_VBVMR_GetMidiMessage)(unsigned char *pMIDIBuffer, long nbByteMax);
typedef long long(__stdcall *T_VBVMR_SendMidiMessage)(unsigned char *pMIDIBuffer, long nbByteMax);
typedef long (__stdcall *T_VBVMR_GetLevel)(long nType, long nuChannel, float * pValue);
typedef long (__stdcall *T_VBVMR_GetMidiMessage)(unsigned char *pMIDIBuffer, long nbByteMax);
typedef long (__stdcall *T_VBVMR_SendMidiMessage)(unsigned char *pMIDIBuffer, long nbByteMax);
typedef long long(__stdcall *T_VBVMR_SetParameterFloat)(char *szParamName, float Value);
typedef long long(__stdcall *T_VBVMR_SetParameters)(char *szParamScript);
typedef long long(__stdcall *T_VBVMR_SetParametersW)(unsigned short *szParamScript);
typedef long long(__stdcall *T_VBVMR_SetParameterStringA)(char *szParamName, char *szString);
typedef long long(__stdcall *T_VBVMR_SetParameterStringW)(char *szParamName, unsigned short *wszString);
typedef long (__stdcall *T_VBVMR_SetParameterFloat)(char * szParamName, float Value);
typedef long (__stdcall *T_VBVMR_SetParameters)(char * szParamScript);
typedef long (__stdcall *T_VBVMR_SetParametersW)(unsigned short * szParamScript);
typedef long (__stdcall *T_VBVMR_SetParameterStringA)(char * szParamName, char * szString);
typedef long (__stdcall *T_VBVMR_SetParameterStringW)(char * szParamName, unsigned short * wszString);
typedef long (__stdcall *T_VBVMR_Output_GetDeviceNumber)(void);
typedef long (__stdcall *T_VBVMR_Output_GetDeviceDescA)(long zindex, long * nType, char * szDeviceName, char * szHardwareId);
typedef long (__stdcall *T_VBVMR_Output_GetDeviceDescW)(long zindex, long * nType, unsigned short * wszDeviceName, unsigned short * wszHardwareId);
typedef long (__stdcall *T_VBVMR_Input_GetDeviceNumber)(void);
typedef long (__stdcall *T_VBVMR_Input_GetDeviceDescA)(long zindex, long * nType, char * szDeviceName, char * szHardwareId);
typedef long (__stdcall *T_VBVMR_Input_GetDeviceDescW)(long zindex, long * nType, unsigned short * wszDeviceName, unsigned short * wszHardwareId);
typedef long (__stdcall *T_VBVMR_AudioCallbackRegister)(long mode, T_VBVMR_VBAUDIOCALLBACK pCallback, void * lpUser, char szClientName[64]);
typedef long (__stdcall *T_VBVMR_AudioCallbackStart)(void);
typedef long (__stdcall *T_VBVMR_AudioCallbackStop)(void);
typedef long (__stdcall *T_VBVMR_AudioCallbackUnregister)(void);
typedef long (__stdcall *T_VBVMR_MacroButton_IsDirty)(void);
typedef long (__stdcall *T_VBVMR_MacroButton_GetStatus)(long nuLogicalButton, float * pValue, long bitmode);
typedef long (__stdcall *T_VBVMR_MacroButton_SetStatus)(long nuLogicalButton, float fValue, long bitmode);
typedef long long(__stdcall *T_VBVMR_Output_GetDeviceNumber)(void);
typedef long long(__stdcall *T_VBVMR_Output_GetDeviceDescA)(long zindex, long *nType, char *szDeviceName, char *szHardwareId);
typedef long long(__stdcall *T_VBVMR_Output_GetDeviceDescW)(long zindex, long *nType, unsigned short *wszDeviceName, unsigned short *wszHardwareId);
typedef long long(__stdcall *T_VBVMR_Input_GetDeviceNumber)(void);
typedef long long(__stdcall *T_VBVMR_Input_GetDeviceDescA)(long zindex, long *nType, char *szDeviceName, char *szHardwareId);
typedef long long(__stdcall *T_VBVMR_Input_GetDeviceDescW)(long zindex, long *nType, unsigned short *wszDeviceName, unsigned short *wszHardwareId);
typedef long long(__stdcall *T_VBVMR_AudioCallbackRegister)(long mode, T_VBVMR_VBAUDIOCALLBACK pCallback, void *lpUser, char szClientName[64]);
typedef long long(__stdcall *T_VBVMR_AudioCallbackStart)(void);
typedef long long(__stdcall *T_VBVMR_AudioCallbackStop)(void);
typedef long long(__stdcall *T_VBVMR_AudioCallbackUnregister)(void);
typedef long long(__stdcall *T_VBVMR_MacroButton_IsDirty)(void);
typedef long long(__stdcall *T_VBVMR_MacroButton_GetStatus)(long nuLogicalButton, float *pValue, long bitmode);
typedef long long(__stdcall *T_VBVMR_MacroButton_SetStatus)(long nuLogicalButton, float fValue, long bitmode);
typedef struct tagVBVMR_INTERFACE
{
@ -867,7 +763,6 @@ typedef struct tagVBVMR_INTERFACE
T_VBVMR_MacroButton_GetStatus VBVMR_MacroButton_GetStatus;
T_VBVMR_MacroButton_SetStatus VBVMR_MacroButton_SetStatus;
} T_VBVMR_INTERFACE, *PT_VBVMR_INTERFACE, *LPT_VBVMR_INTERFACE;
#ifdef VBUSE_LOCALLIB
@ -875,12 +770,6 @@ typedef struct tagVBVMR_INTERFACE
void __stdcall VBVMR_SetHinstance(HINSTANCE hinst);
#endif
/******************************************************************************/
/* VBAN RT PACKET */
/******************************************************************************/
@ -971,7 +860,6 @@ typedef struct tagVBAN_VMRT_PACKET //packedt ident: 0
#define VMRTSTATE_MODE_SEL 0x10000000
#define VMRTSTATE_MODE_MONITOR 0x20000000
#pragma pack(1)
// long = 4 bytes
@ -1046,7 +934,6 @@ typedef struct tagVBAN_VMPARAM_STRIP
#define VMRT_EQTYPE_LOSHELF 5
#define VMRT_EQTYPE_HISHELF 6
#define expected_size_T_VBAN_VMPARAM_STRIP (8 + (8 * sizeof(short)) + (2 * 6) + (3 * 6 * sizeof(float)) + ((11 + 9 + 6 + 7) * sizeof(short)))
// 170
@ -1080,14 +967,8 @@ long VBVMR_LoginEx(long properties);
long VBVMR_MB_PushSettings(void *lpParam);
#ifdef __cplusplus
}
#endif
#endif /*__VOICEMEETER_REMOTE_H__*/