Change folder structure, add solution to the root.

This commit is contained in:
2023-06-18 17:19:03 +02:00
parent d5f5fb5614
commit 15747d7e9b
51 changed files with 33 additions and 6 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,897 @@
/* ======================================================================================== */
/* FMOD Core API - DSP header file. */
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */
/* */
/* Use this header if you are wanting to develop your own DSP plugin to use with FMODs */
/* dsp system. With this header you can make your own DSP plugin that FMOD can */
/* register and use. See the documentation and examples on how to make a working plugin. */
/* */
/* For more detail visit: */
/* https://fmod.com/docs/2.02/api/plugin-api-dsp.html */
/* =========================================================================================*/
using System;
using System.Text;
using System.Runtime.InteropServices;
namespace FMOD
{
[StructLayout(LayoutKind.Sequential)]
public struct DSP_BUFFER_ARRAY
{
public int numbuffers;
public int[] buffernumchannels;
public CHANNELMASK[] bufferchannelmask;
public IntPtr[] buffers;
public SPEAKERMODE speakermode;
}
public enum DSP_PROCESS_OPERATION
{
PROCESS_PERFORM = 0,
PROCESS_QUERY
}
[StructLayout(LayoutKind.Sequential)]
public struct COMPLEX
{
public float real;
public float imag;
}
public enum DSP_PAN_SURROUND_FLAGS
{
DEFAULT = 0,
ROTATION_NOT_BIASED = 1,
}
/*
DSP callbacks
*/
public delegate RESULT DSP_CREATE_CALLBACK (ref DSP_STATE dsp_state);
public delegate RESULT DSP_RELEASE_CALLBACK (ref DSP_STATE dsp_state);
public delegate RESULT DSP_RESET_CALLBACK (ref DSP_STATE dsp_state);
public delegate RESULT DSP_SETPOSITION_CALLBACK (ref DSP_STATE dsp_state, uint pos);
public delegate RESULT DSP_READ_CALLBACK (ref DSP_STATE dsp_state, IntPtr inbuffer, IntPtr outbuffer, uint length, int inchannels, ref int outchannels);
public delegate RESULT DSP_SHOULDIPROCESS_CALLBACK (ref DSP_STATE dsp_state, bool inputsidle, uint length, CHANNELMASK inmask, int inchannels, SPEAKERMODE speakermode);
public delegate RESULT DSP_PROCESS_CALLBACK (ref DSP_STATE dsp_state, uint length, ref DSP_BUFFER_ARRAY inbufferarray, ref DSP_BUFFER_ARRAY outbufferarray, bool inputsidle, DSP_PROCESS_OPERATION op);
public delegate RESULT DSP_SETPARAM_FLOAT_CALLBACK (ref DSP_STATE dsp_state, int index, float value);
public delegate RESULT DSP_SETPARAM_INT_CALLBACK (ref DSP_STATE dsp_state, int index, int value);
public delegate RESULT DSP_SETPARAM_BOOL_CALLBACK (ref DSP_STATE dsp_state, int index, bool value);
public delegate RESULT DSP_SETPARAM_DATA_CALLBACK (ref DSP_STATE dsp_state, int index, IntPtr data, uint length);
public delegate RESULT DSP_GETPARAM_FLOAT_CALLBACK (ref DSP_STATE dsp_state, int index, ref float value, IntPtr valuestr);
public delegate RESULT DSP_GETPARAM_INT_CALLBACK (ref DSP_STATE dsp_state, int index, ref int value, IntPtr valuestr);
public delegate RESULT DSP_GETPARAM_BOOL_CALLBACK (ref DSP_STATE dsp_state, int index, ref bool value, IntPtr valuestr);
public delegate RESULT DSP_GETPARAM_DATA_CALLBACK (ref DSP_STATE dsp_state, int index, ref IntPtr data, ref uint length, IntPtr valuestr);
public delegate RESULT DSP_SYSTEM_REGISTER_CALLBACK (ref DSP_STATE dsp_state);
public delegate RESULT DSP_SYSTEM_DEREGISTER_CALLBACK (ref DSP_STATE dsp_state);
public delegate RESULT DSP_SYSTEM_MIX_CALLBACK (ref DSP_STATE dsp_state, int stage);
/*
DSP functions
*/
public delegate IntPtr DSP_ALLOC_FUNC (uint size, MEMORY_TYPE type, IntPtr sourcestr);
public delegate IntPtr DSP_REALLOC_FUNC (IntPtr ptr, uint size, MEMORY_TYPE type, IntPtr sourcestr);
public delegate void DSP_FREE_FUNC (IntPtr ptr, MEMORY_TYPE type, IntPtr sourcestr);
public delegate void DSP_LOG_FUNC (DEBUG_FLAGS level, IntPtr file, int line, IntPtr function, IntPtr str);
public delegate RESULT DSP_GETSAMPLERATE_FUNC (ref DSP_STATE dsp_state, ref int rate);
public delegate RESULT DSP_GETBLOCKSIZE_FUNC (ref DSP_STATE dsp_state, ref uint blocksize);
public delegate RESULT DSP_GETSPEAKERMODE_FUNC (ref DSP_STATE dsp_state, ref int speakermode_mixer, ref int speakermode_output);
public delegate RESULT DSP_GETCLOCK_FUNC (ref DSP_STATE dsp_state, out ulong clock, out uint offset, out uint length);
public delegate RESULT DSP_GETLISTENERATTRIBUTES_FUNC (ref DSP_STATE dsp_state, ref int numlisteners, IntPtr attributes);
public delegate RESULT DSP_GETUSERDATA_FUNC (ref DSP_STATE dsp_state, out IntPtr userdata);
public delegate RESULT DSP_DFT_FFTREAL_FUNC (ref DSP_STATE dsp_state, int size, IntPtr signal, IntPtr dft, IntPtr window, int signalhop);
public delegate RESULT DSP_DFT_IFFTREAL_FUNC (ref DSP_STATE dsp_state, int size, IntPtr dft, IntPtr signal, IntPtr window, int signalhop);
public delegate RESULT DSP_PAN_SUMMONOMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, float lowFrequencyGain, float overallGain, IntPtr matrix);
public delegate RESULT DSP_PAN_SUMSTEREOMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, float pan, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix);
public delegate RESULT DSP_PAN_SUMSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix, DSP_PAN_SURROUND_FLAGS flags);
public delegate RESULT DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix);
public delegate RESULT DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix);
public delegate RESULT DSP_PAN_GETROLLOFFGAIN_FUNC (ref DSP_STATE dsp_state, DSP_PAN_3D_ROLLOFF_TYPE rolloff, float distance, float mindistance, float maxdistance, out float gain);
public enum DSP_TYPE : int
{
UNKNOWN,
MIXER,
OSCILLATOR,
LOWPASS,
ITLOWPASS,
HIGHPASS,
ECHO,
FADER,
FLANGE,
DISTORTION,
NORMALIZE,
LIMITER,
PARAMEQ,
PITCHSHIFT,
CHORUS,
VSTPLUGIN,
WINAMPPLUGIN,
ITECHO,
COMPRESSOR,
SFXREVERB,
LOWPASS_SIMPLE,
DELAY,
TREMOLO,
LADSPAPLUGIN,
SEND,
RETURN,
HIGHPASS_SIMPLE,
PAN,
THREE_EQ,
FFT,
LOUDNESS_METER,
ENVELOPEFOLLOWER,
CONVOLUTIONREVERB,
CHANNELMIX,
TRANSCEIVER,
OBJECTPAN,
MULTIBAND_EQ,
MAX
}
public enum DSP_PARAMETER_TYPE
{
FLOAT = 0,
INT,
BOOL,
DATA,
MAX
}
public enum DSP_PARAMETER_FLOAT_MAPPING_TYPE
{
DSP_PARAMETER_FLOAT_MAPPING_TYPE_LINEAR = 0,
DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO,
DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR,
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR
{
public int numpoints;
public IntPtr pointparamvalues;
public IntPtr pointpositions;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_FLOAT_MAPPING
{
public DSP_PARAMETER_FLOAT_MAPPING_TYPE type;
public DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR piecewiselinearmapping;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_DESC_FLOAT
{
public float min;
public float max;
public float defaultval;
public DSP_PARAMETER_FLOAT_MAPPING mapping;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_DESC_INT
{
public int min;
public int max;
public int defaultval;
public bool goestoinf;
public IntPtr valuenames;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_DESC_BOOL
{
public bool defaultval;
public IntPtr valuenames;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_DESC_DATA
{
public int datatype;
}
[StructLayout(LayoutKind.Explicit)]
public struct DSP_PARAMETER_DESC_UNION
{
[FieldOffset(0)]
public DSP_PARAMETER_DESC_FLOAT floatdesc;
[FieldOffset(0)]
public DSP_PARAMETER_DESC_INT intdesc;
[FieldOffset(0)]
public DSP_PARAMETER_DESC_BOOL booldesc;
[FieldOffset(0)]
public DSP_PARAMETER_DESC_DATA datadesc;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_DESC
{
public DSP_PARAMETER_TYPE type;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] name;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] label;
public string description;
public DSP_PARAMETER_DESC_UNION desc;
}
public enum DSP_PARAMETER_DATA_TYPE
{
DSP_PARAMETER_DATA_TYPE_USER = 0,
DSP_PARAMETER_DATA_TYPE_OVERALLGAIN = -1,
DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2,
DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3,
DSP_PARAMETER_DATA_TYPE_FFT = -4,
DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5,
DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_OVERALLGAIN
{
public float linear_gain;
public float linear_gain_additive;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_3DATTRIBUTES
{
public ATTRIBUTES_3D relative;
public ATTRIBUTES_3D absolute;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_3DATTRIBUTES_MULTI
{
public int numlisteners;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public ATTRIBUTES_3D[] relative;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public float[] weight;
public ATTRIBUTES_3D absolute;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_SIDECHAIN
{
public int sidechainenable;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_FFT
{
public int length;
public int numchannels;
[MarshalAs(UnmanagedType.ByValArray,SizeConst=32)]
private IntPtr[] spectrum_internal;
public float[][] spectrum
{
get
{
var buffer = new float[numchannels][];
for (int i = 0; i < numchannels; ++i)
{
buffer[i] = new float[length];
Marshal.Copy(spectrum_internal[i], buffer[i], 0, length);
}
return buffer;
}
}
public void getSpectrum(ref float[][] buffer)
{
int bufferLength = Math.Min(buffer.Length, numchannels);
for (int i = 0; i < bufferLength; ++i)
{
getSpectrum(i, ref buffer[i]);
}
}
public void getSpectrum(int channel, ref float[] buffer)
{
int bufferLength = Math.Min(buffer.Length, length);
Marshal.Copy(spectrum_internal[channel], buffer, 0, bufferLength);
}
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_LOUDNESS_METER_INFO_TYPE
{
public float momentaryloudness;
public float shorttermloudness;
public float integratedloudness;
public float loudness10thpercentile;
public float loudness95thpercentile;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 66)]
public float[] loudnesshistogram;
public float maxtruepeak;
public float maxmomentaryloudness;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_LOUDNESS_METER_WEIGHTING_TYPE
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public float[] channelweight;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_PARAMETER_ATTENUATION_RANGE
{
public float min;
public float max;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_DESCRIPTION
{
public uint pluginsdkversion;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] name;
public uint version;
public int numinputbuffers;
public int numoutputbuffers;
public DSP_CREATE_CALLBACK create;
public DSP_RELEASE_CALLBACK release;
public DSP_RESET_CALLBACK reset;
public DSP_READ_CALLBACK read;
public DSP_PROCESS_CALLBACK process;
public DSP_SETPOSITION_CALLBACK setposition;
public int numparameters;
public IntPtr paramdesc;
public DSP_SETPARAM_FLOAT_CALLBACK setparameterfloat;
public DSP_SETPARAM_INT_CALLBACK setparameterint;
public DSP_SETPARAM_BOOL_CALLBACK setparameterbool;
public DSP_SETPARAM_DATA_CALLBACK setparameterdata;
public DSP_GETPARAM_FLOAT_CALLBACK getparameterfloat;
public DSP_GETPARAM_INT_CALLBACK getparameterint;
public DSP_GETPARAM_BOOL_CALLBACK getparameterbool;
public DSP_GETPARAM_DATA_CALLBACK getparameterdata;
public DSP_SHOULDIPROCESS_CALLBACK shouldiprocess;
public IntPtr userdata;
public DSP_SYSTEM_REGISTER_CALLBACK sys_register;
public DSP_SYSTEM_DEREGISTER_CALLBACK sys_deregister;
public DSP_SYSTEM_MIX_CALLBACK sys_mix;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_STATE_DFT_FUNCTIONS
{
public DSP_DFT_FFTREAL_FUNC fftreal;
public DSP_DFT_IFFTREAL_FUNC inversefftreal;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_STATE_PAN_FUNCTIONS
{
public DSP_PAN_SUMMONOMATRIX_FUNC summonomatrix;
public DSP_PAN_SUMSTEREOMATRIX_FUNC sumstereomatrix;
public DSP_PAN_SUMSURROUNDMATRIX_FUNC sumsurroundmatrix;
public DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC summonotosurroundmatrix;
public DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC sumstereotosurroundmatrix;
public DSP_PAN_GETROLLOFFGAIN_FUNC getrolloffgain;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_STATE_FUNCTIONS
{
public DSP_ALLOC_FUNC alloc;
public DSP_REALLOC_FUNC realloc;
public DSP_FREE_FUNC free;
public DSP_GETSAMPLERATE_FUNC getsamplerate;
public DSP_GETBLOCKSIZE_FUNC getblocksize;
public IntPtr dft;
public IntPtr pan;
public DSP_GETSPEAKERMODE_FUNC getspeakermode;
public DSP_GETCLOCK_FUNC getclock;
public DSP_GETLISTENERATTRIBUTES_FUNC getlistenerattributes;
public DSP_LOG_FUNC log;
public DSP_GETUSERDATA_FUNC getuserdata;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_STATE
{
public IntPtr instance;
public IntPtr plugindata;
public uint channelmask;
public int source_speakermode;
public IntPtr sidechaindata;
public int sidechainchannels;
public IntPtr functions;
public int systemobject;
}
[StructLayout(LayoutKind.Sequential)]
public struct DSP_METERING_INFO
{
public int numsamples;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=32)]
public float[] peaklevel;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=32)]
public float[] rmslevel;
public short numchannels;
}
/*
==============================================================================================================
FMOD built in effect parameters.
Use DSP::setParameter with these enums for the 'index' parameter.
==============================================================================================================
*/
public enum DSP_OSCILLATOR : int
{
TYPE,
RATE
}
public enum DSP_LOWPASS : int
{
CUTOFF,
RESONANCE
}
public enum DSP_ITLOWPASS : int
{
CUTOFF,
RESONANCE
}
public enum DSP_HIGHPASS : int
{
CUTOFF,
RESONANCE
}
public enum DSP_ECHO : int
{
DELAY,
FEEDBACK,
DRYLEVEL,
WETLEVEL
}
public enum DSP_FADER : int
{
GAIN,
OVERALL_GAIN,
}
public enum DSP_DELAY : int
{
CH0,
CH1,
CH2,
CH3,
CH4,
CH5,
CH6,
CH7,
CH8,
CH9,
CH10,
CH11,
CH12,
CH13,
CH14,
CH15,
MAXDELAY,
}
public enum DSP_FLANGE : int
{
MIX,
DEPTH,
RATE
}
public enum DSP_TREMOLO : int
{
FREQUENCY,
DEPTH,
SHAPE,
SKEW,
DUTY,
SQUARE,
PHASE,
SPREAD
}
public enum DSP_DISTORTION : int
{
LEVEL
}
public enum DSP_NORMALIZE : int
{
FADETIME,
THRESHOLD,
MAXAMP
}
public enum DSP_LIMITER : int
{
RELEASETIME,
CEILING,
MAXIMIZERGAIN,
MODE,
}
public enum DSP_PARAMEQ : int
{
CENTER,
BANDWIDTH,
GAIN
}
public enum DSP_MULTIBAND_EQ : int
{
A_FILTER,
A_FREQUENCY,
A_Q,
A_GAIN,
B_FILTER,
B_FREQUENCY,
B_Q,
B_GAIN,
C_FILTER,
C_FREQUENCY,
C_Q,
C_GAIN,
D_FILTER,
D_FREQUENCY,
D_Q,
D_GAIN,
E_FILTER,
E_FREQUENCY,
E_Q,
E_GAIN,
}
public enum DSP_MULTIBAND_EQ_FILTER_TYPE : int
{
DISABLED,
LOWPASS_12DB,
LOWPASS_24DB,
LOWPASS_48DB,
HIGHPASS_12DB,
HIGHPASS_24DB,
HIGHPASS_48DB,
LOWSHELF,
HIGHSHELF,
PEAKING,
BANDPASS,
NOTCH,
ALLPASS,
}
public enum DSP_PITCHSHIFT : int
{
PITCH,
FFTSIZE,
OVERLAP,
MAXCHANNELS
}
public enum DSP_CHORUS : int
{
MIX,
RATE,
DEPTH,
}
public enum DSP_ITECHO : int
{
WETDRYMIX,
FEEDBACK,
LEFTDELAY,
RIGHTDELAY,
PANDELAY
}
public enum DSP_COMPRESSOR : int
{
THRESHOLD,
RATIO,
ATTACK,
RELEASE,
GAINMAKEUP,
USESIDECHAIN,
LINKED
}
public enum DSP_SFXREVERB : int
{
DECAYTIME,
EARLYDELAY,
LATEDELAY,
HFREFERENCE,
HFDECAYRATIO,
DIFFUSION,
DENSITY,
LOWSHELFFREQUENCY,
LOWSHELFGAIN,
HIGHCUT,
EARLYLATEMIX,
WETLEVEL,
DRYLEVEL
}
public enum DSP_LOWPASS_SIMPLE : int
{
CUTOFF
}
public enum DSP_SEND : int
{
RETURNID,
LEVEL,
}
public enum DSP_RETURN : int
{
ID,
INPUT_SPEAKER_MODE
}
public enum DSP_HIGHPASS_SIMPLE : int
{
CUTOFF
}
public enum DSP_PAN_2D_STEREO_MODE_TYPE : int
{
DISTRIBUTED,
DISCRETE
}
public enum DSP_PAN_MODE_TYPE : int
{
MONO,
STEREO,
SURROUND
}
public enum DSP_PAN_3D_ROLLOFF_TYPE : int
{
LINEARSQUARED,
LINEAR,
INVERSE,
INVERSETAPERED,
CUSTOM
}
public enum DSP_PAN_3D_EXTENT_MODE_TYPE : int
{
AUTO,
USER,
OFF
}
public enum DSP_PAN : int
{
MODE,
_2D_STEREO_POSITION,
_2D_DIRECTION,
_2D_EXTENT,
_2D_ROTATION,
_2D_LFE_LEVEL,
_2D_STEREO_MODE,
_2D_STEREO_SEPARATION,
_2D_STEREO_AXIS,
ENABLED_SPEAKERS,
_3D_POSITION,
_3D_ROLLOFF,
_3D_MIN_DISTANCE,
_3D_MAX_DISTANCE,
_3D_EXTENT_MODE,
_3D_SOUND_SIZE,
_3D_MIN_EXTENT,
_3D_PAN_BLEND,
LFE_UPMIX_ENABLED,
OVERALL_GAIN,
SURROUND_SPEAKER_MODE,
_2D_HEIGHT_BLEND,
ATTENUATION_RANGE,
OVERRIDE_RANGE
}
public enum DSP_THREE_EQ_CROSSOVERSLOPE_TYPE : int
{
_12DB,
_24DB,
_48DB
}
public enum DSP_THREE_EQ : int
{
LOWGAIN,
MIDGAIN,
HIGHGAIN,
LOWCROSSOVER,
HIGHCROSSOVER,
CROSSOVERSLOPE
}
public enum DSP_FFT_WINDOW : int
{
RECT,
TRIANGLE,
HAMMING,
HANNING,
BLACKMAN,
BLACKMANHARRIS
}
public enum DSP_FFT : int
{
WINDOWSIZE,
WINDOWTYPE,
SPECTRUMDATA,
DOMINANT_FREQ
}
public enum DSP_LOUDNESS_METER : int
{
STATE,
WEIGHTING,
INFO
}
public enum DSP_LOUDNESS_METER_STATE_TYPE : int
{
RESET_INTEGRATED = -3,
RESET_MAXPEAK = -2,
RESET_ALL = -1,
PAUSED = 0,
ANALYZING = 1
}
public enum DSP_ENVELOPEFOLLOWER : int
{
ATTACK,
RELEASE,
ENVELOPE,
USESIDECHAIN
}
public enum DSP_CONVOLUTION_REVERB : int
{
IR,
WET,
DRY,
LINKED
}
public enum DSP_CHANNELMIX_OUTPUT : int
{
DEFAULT,
ALLMONO,
ALLSTEREO,
ALLQUAD,
ALL5POINT1,
ALL7POINT1,
ALLLFE,
ALL7POINT1POINT4
}
public enum DSP_CHANNELMIX : int
{
OUTPUTGROUPING,
GAIN_CH0,
GAIN_CH1,
GAIN_CH2,
GAIN_CH3,
GAIN_CH4,
GAIN_CH5,
GAIN_CH6,
GAIN_CH7,
GAIN_CH8,
GAIN_CH9,
GAIN_CH10,
GAIN_CH11,
GAIN_CH12,
GAIN_CH13,
GAIN_CH14,
GAIN_CH15,
GAIN_CH16,
GAIN_CH17,
GAIN_CH18,
GAIN_CH19,
GAIN_CH20,
GAIN_CH21,
GAIN_CH22,
GAIN_CH23,
GAIN_CH24,
GAIN_CH25,
GAIN_CH26,
GAIN_CH27,
GAIN_CH28,
GAIN_CH29,
GAIN_CH30,
GAIN_CH31,
OUTPUT_CH0,
OUTPUT_CH1,
OUTPUT_CH2,
OUTPUT_CH3,
OUTPUT_CH4,
OUTPUT_CH5,
OUTPUT_CH6,
OUTPUT_CH7,
OUTPUT_CH8,
OUTPUT_CH9,
OUTPUT_CH10,
OUTPUT_CH11,
OUTPUT_CH12,
OUTPUT_CH13,
OUTPUT_CH14,
OUTPUT_CH15,
OUTPUT_CH16,
OUTPUT_CH17,
OUTPUT_CH18,
OUTPUT_CH19,
OUTPUT_CH20,
OUTPUT_CH21,
OUTPUT_CH22,
OUTPUT_CH23,
OUTPUT_CH24,
OUTPUT_CH25,
OUTPUT_CH26,
OUTPUT_CH27,
OUTPUT_CH28,
OUTPUT_CH29,
OUTPUT_CH30,
OUTPUT_CH31,
}
public enum DSP_TRANSCEIVER_SPEAKERMODE : int
{
AUTO = -1,
MONO = 0,
STEREO,
SURROUND,
}
public enum DSP_TRANSCEIVER : int
{
TRANSMIT,
GAIN,
CHANNEL,
TRANSMITSPEAKERMODE
}
public enum DSP_OBJECTPAN : int
{
_3D_POSITION,
_3D_ROLLOFF,
_3D_MIN_DISTANCE,
_3D_MAX_DISTANCE,
_3D_EXTENT_MODE,
_3D_SOUND_SIZE,
_3D_MIN_EXTENT,
OVERALL_GAIN,
OUTPUTGAIN,
ATTENUATION_RANGE,
OVERRIDE_RANGE
}
}

View File

@@ -0,0 +1,106 @@
/* ============================================================================================== */
/* FMOD Core / Studio API - Error string header file. */
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2022. */
/* */
/* Use this header if you want to store or display a string version / english explanation */
/* of the FMOD error codes. */
/* */
/* For more detail visit: */
/* https://fmod.com/docs/2.02/api/core-api-common.html#fmod_result */
/* =============================================================================================== */
namespace FMOD
{
public class Error
{
public static string String(FMOD.RESULT errcode)
{
switch (errcode)
{
case FMOD.RESULT.OK: return "No errors.";
case FMOD.RESULT.ERR_BADCOMMAND: return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound).";
case FMOD.RESULT.ERR_CHANNEL_ALLOC: return "Error trying to allocate a channel.";
case FMOD.RESULT.ERR_CHANNEL_STOLEN: return "The specified channel has been reused to play another sound.";
case FMOD.RESULT.ERR_DMA: return "DMA Failure. See debug output for more information.";
case FMOD.RESULT.ERR_DSP_CONNECTION: return "DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts.";
case FMOD.RESULT.ERR_DSP_DONTPROCESS: return "DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph.";
case FMOD.RESULT.ERR_DSP_FORMAT: return "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map.";
case FMOD.RESULT.ERR_DSP_INUSE: return "DSP is already in the mixer's DSP network. It must be removed before being reinserted or released.";
case FMOD.RESULT.ERR_DSP_NOTFOUND: return "DSP connection error. Couldn't find the DSP unit specified.";
case FMOD.RESULT.ERR_DSP_RESERVED: return "DSP operation error. Cannot perform operation on this DSP as it is reserved by the system.";
case FMOD.RESULT.ERR_DSP_SILENCE: return "DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph.";
case FMOD.RESULT.ERR_DSP_TYPE: return "DSP operation cannot be performed on a DSP of this type.";
case FMOD.RESULT.ERR_FILE_BAD: return "Error loading file.";
case FMOD.RESULT.ERR_FILE_COULDNOTSEEK: return "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.";
case FMOD.RESULT.ERR_FILE_DISKEJECTED: return "Media was ejected while reading.";
case FMOD.RESULT.ERR_FILE_EOF: return "End of file unexpectedly reached while trying to read essential data (truncated?).";
case FMOD.RESULT.ERR_FILE_ENDOFDATA: return "End of current chunk reached while trying to read data.";
case FMOD.RESULT.ERR_FILE_NOTFOUND: return "File not found.";
case FMOD.RESULT.ERR_FORMAT: return "Unsupported file or audio format.";
case FMOD.RESULT.ERR_HEADER_MISMATCH: return "There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library.";
case FMOD.RESULT.ERR_HTTP: return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.";
case FMOD.RESULT.ERR_HTTP_ACCESS: return "The specified resource requires authentication or is forbidden.";
case FMOD.RESULT.ERR_HTTP_PROXY_AUTH: return "Proxy authentication is required to access the specified resource.";
case FMOD.RESULT.ERR_HTTP_SERVER_ERROR: return "A HTTP server error occurred.";
case FMOD.RESULT.ERR_HTTP_TIMEOUT: return "The HTTP request timed out.";
case FMOD.RESULT.ERR_INITIALIZATION: return "FMOD was not initialized correctly to support this function.";
case FMOD.RESULT.ERR_INITIALIZED: return "Cannot call this command after System::init.";
case FMOD.RESULT.ERR_INTERNAL: return "An error occurred that wasn't supposed to. Contact support.";
case FMOD.RESULT.ERR_INVALID_FLOAT: return "Value passed in was a NaN, Inf or denormalized float.";
case FMOD.RESULT.ERR_INVALID_HANDLE: return "An invalid object handle was used.";
case FMOD.RESULT.ERR_INVALID_PARAM: return "An invalid parameter was passed to this function.";
case FMOD.RESULT.ERR_INVALID_POSITION: return "An invalid seek position was passed to this function.";
case FMOD.RESULT.ERR_INVALID_SPEAKER: return "An invalid speaker was passed to this function based on the current speaker mode.";
case FMOD.RESULT.ERR_INVALID_SYNCPOINT: return "The syncpoint did not come from this sound handle.";
case FMOD.RESULT.ERR_INVALID_THREAD: return "Tried to call a function on a thread that is not supported.";
case FMOD.RESULT.ERR_INVALID_VECTOR: return "The vectors passed in are not unit length, or perpendicular.";
case FMOD.RESULT.ERR_MAXAUDIBLE: return "Reached maximum audible playback count for this sound's soundgroup.";
case FMOD.RESULT.ERR_MEMORY: return "Not enough memory or resources.";
case FMOD.RESULT.ERR_MEMORY_CANTPOINT: return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used.";
case FMOD.RESULT.ERR_NEEDS3D: return "Tried to call a command on a 2d sound when the command was meant for 3d sound.";
case FMOD.RESULT.ERR_NEEDSHARDWARE: return "Tried to use a feature that requires hardware support.";
case FMOD.RESULT.ERR_NET_CONNECT: return "Couldn't connect to the specified host.";
case FMOD.RESULT.ERR_NET_SOCKET_ERROR: return "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.";
case FMOD.RESULT.ERR_NET_URL: return "The specified URL couldn't be resolved.";
case FMOD.RESULT.ERR_NET_WOULD_BLOCK: return "Operation on a non-blocking socket could not complete immediately.";
case FMOD.RESULT.ERR_NOTREADY: return "Operation could not be performed because specified sound/DSP connection is not ready.";
case FMOD.RESULT.ERR_OUTPUT_ALLOCATED: return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused.";
case FMOD.RESULT.ERR_OUTPUT_CREATEBUFFER: return "Error creating hardware sound buffer.";
case FMOD.RESULT.ERR_OUTPUT_DRIVERCALL: return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted.";
case FMOD.RESULT.ERR_OUTPUT_FORMAT: return "Soundcard does not support the specified format.";
case FMOD.RESULT.ERR_OUTPUT_INIT: return "Error initializing output device.";
case FMOD.RESULT.ERR_OUTPUT_NODRIVERS: return "The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails.";
case FMOD.RESULT.ERR_PLUGIN: return "An unspecified error has been returned from a plugin.";
case FMOD.RESULT.ERR_PLUGIN_MISSING: return "A requested output, dsp unit type or codec was not available.";
case FMOD.RESULT.ERR_PLUGIN_RESOURCE: return "A resource that the plugin requires cannot be allocated or found. (ie the DLS file for MIDI playback)";
case FMOD.RESULT.ERR_PLUGIN_VERSION: return "A plugin was built with an unsupported SDK version.";
case FMOD.RESULT.ERR_RECORD: return "An error occurred trying to initialize the recording device.";
case FMOD.RESULT.ERR_REVERB_CHANNELGROUP: return "Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection.";
case FMOD.RESULT.ERR_REVERB_INSTANCE: return "Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist.";
case FMOD.RESULT.ERR_SUBSOUNDS: return "The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound.";
case FMOD.RESULT.ERR_SUBSOUND_ALLOCATED: return "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first.";
case FMOD.RESULT.ERR_SUBSOUND_CANTMOVE: return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file.";
case FMOD.RESULT.ERR_TAGNOTFOUND: return "The specified tag could not be found or there are no tags.";
case FMOD.RESULT.ERR_TOOMANYCHANNELS: return "The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat.";
case FMOD.RESULT.ERR_TRUNCATED: return "The retrieved string is too long to fit in the supplied buffer and has been truncated.";
case FMOD.RESULT.ERR_UNIMPLEMENTED: return "Something in FMOD hasn't been implemented when it should be! contact support!";
case FMOD.RESULT.ERR_UNINITIALIZED: return "This command failed because System::init or System::setDriver was not called.";
case FMOD.RESULT.ERR_UNSUPPORTED: return "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.";
case FMOD.RESULT.ERR_VERSION: return "The version number of this file format is not supported.";
case FMOD.RESULT.ERR_EVENT_ALREADY_LOADED: return "The specified bank has already been loaded.";
case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_BUSY: return "The live update connection failed due to the game already being connected.";
case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_MISMATCH: return "The live update connection failed due to the game data being out of sync with the tool.";
case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_TIMEOUT: return "The live update connection timed out.";
case FMOD.RESULT.ERR_EVENT_NOTFOUND: return "The requested event, bus or vca could not be found.";
case FMOD.RESULT.ERR_STUDIO_UNINITIALIZED: return "The Studio::System object is not yet initialized.";
case FMOD.RESULT.ERR_STUDIO_NOT_LOADED: return "The specified resource is not loaded, so it can't be unloaded.";
case FMOD.RESULT.ERR_INVALID_STRING: return "An invalid string was passed to this function.";
case FMOD.RESULT.ERR_ALREADY_LOCKED: return "The specified resource is already locked.";
case FMOD.RESULT.ERR_NOT_LOCKED: return "The specified resource is not locked, so it can't be unlocked.";
case FMOD.RESULT.ERR_RECORD_DISCONNECTED: return "The specified recording driver has been disconnected.";
case FMOD.RESULT.ERR_TOOMANYSAMPLES: return "The length provided exceed the allowable limit.";
default: return "Unknown error.";
}
}
}
}

File diff suppressed because it is too large Load Diff