11. Core API Reference | Common
File:
- File_GetDiskBusy Information function to retrieve the state of FMOD disk access.
- File_SetDiskBusy Sets the busy state for disk access ensuring mutual exclusion of file operations.
Memory:
- Memory_GetStats Returns information on the memory usage of FMOD.
- Memory_Initialize Specifies a method for FMOD to allocate and free memory, either through user supplied callbacks or through a user supplied memory buffer with a fixed size.
- FMOD_MEMORY_TYPE Bitfields for memory allocation type being passed into FMOD memory callbacks.
Debugging:
- Debug_Initialize Specify the level and delivery method of log messages when using the logging version of FMOD.
- FMOD_DEBUG_MODE Specify the destination of log output when using the logging version of FMOD.
- FMOD_DEBUG_FLAGS Specify the requested information to be output when using the logging version of FMOD.
Threading:
General:
Structure describing a position, velocity and orientation.
typedef struct FMOD_3D_ATTRIBUTES {
FMOD_VECTOR position;
FMOD_VECTOR velocity;
FMOD_VECTOR forward;
FMOD_VECTOR up;
} FMOD_3D_ATTRIBUTES;
struct ATTRIBUTES_3D
{
VECTOR position;
VECTOR velocity;
VECTOR forward;
VECTOR up;
}
_3D_ATTRIBUTES
{
position,
velocity,
forward,
up,
};
- position
-
Position in world space used for panning and attenuation. (FMOD_VECTOR)
- velocity
-
Velocity in world space used for doppler. (FMOD_VECTOR)
- forward
- Forwards orientation, must be of unit length (1.0) and perpendicular to
up. (FMOD_VECTOR)
- up
- Upwards orientation, must be of unit length (1.0) and perpendicular to
forward. (FMOD_VECTOR)
Vectors must be provided in the correct handedness.
See Also: FMOD_DSP_PARAMETER_3DATTRIBUTES
Flags that describe the speakers present in a given signal.
#define FMOD_CHANNELMASK_FRONT_LEFT 0x00000001
#define FMOD_CHANNELMASK_FRONT_RIGHT 0x00000002
#define FMOD_CHANNELMASK_FRONT_CENTER 0x00000004
#define FMOD_CHANNELMASK_LOW_FREQUENCY 0x00000008
#define FMOD_CHANNELMASK_SURROUND_LEFT 0x00000010
#define FMOD_CHANNELMASK_SURROUND_RIGHT 0x00000020
#define FMOD_CHANNELMASK_BACK_LEFT 0x00000040
#define FMOD_CHANNELMASK_BACK_RIGHT 0x00000080
#define FMOD_CHANNELMASK_BACK_CENTER 0x00000100
#define FMOD_CHANNELMASK_MONO (FMOD_CHANNELMASK_FRONT_LEFT)
#define FMOD_CHANNELMASK_STEREO (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT)
#define FMOD_CHANNELMASK_LRC (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER)
#define FMOD_CHANNELMASK_QUAD (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
#define FMOD_CHANNELMASK_SURROUND (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
#define FMOD_CHANNELMASK_5POINT1 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
#define FMOD_CHANNELMASK_5POINT1_REARS (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
#define FMOD_CHANNELMASK_7POINT0 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
#define FMOD_CHANNELMASK_7POINT1 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
[Flags]
enum CHANNELMASK : uint
{
FRONT_LEFT = 0x00000001,
FRONT_RIGHT = 0x00000002,
FRONT_CENTER = 0x00000004,
LOW_FREQUENCY = 0x00000008,
SURROUND_LEFT = 0x00000010,
SURROUND_RIGHT = 0x00000020,
BACK_LEFT = 0x00000040,
BACK_RIGHT = 0x00000080,
BACK_CENTER = 0x00000100,
MONO = (FRONT_LEFT),
STEREO = (FRONT_LEFT | FRONT_RIGHT),
LRC = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER),
QUAD = (FRONT_LEFT | FRONT_RIGHT | SURROUND_LEFT | SURROUND_RIGHT),
SURROUND = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT),
_5POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT),
_5POINT1_REARS = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | BACK_LEFT | BACK_RIGHT),
_7POINT0 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT),
_7POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT)
}
CHANNELMASK_FRONT_LEFT = 0x00000001
CHANNELMASK_FRONT_RIGHT = 0x00000002
CHANNELMASK_FRONT_CENTER = 0x00000004
CHANNELMASK_LOW_FREQUENCY = 0x00000008
CHANNELMASK_SURROUND_LEFT = 0x00000010
CHANNELMASK_SURROUND_RIGHT = 0x00000020
CHANNELMASK_BACK_LEFT = 0x00000040
CHANNELMASK_BACK_RIGHT = 0x00000080
CHANNELMASK_BACK_CENTER = 0x00000100
CHANNELMASK_MONO = (CHANNELMASK_FRONT_LEFT))
CHANNELMASK_STEREO = (CHANNELMASK_FRONT_LEFT | CHANNELMASK_FRONT_RIGHT))
CHANNELMASK_LRC = (CHANNELMASK_FRONT_LEFT | CHANNELMASK_FRONT_RIGHT | CHANNELMASK_FRONT_CENTER))
CHANNELMASK_QUAD = (CHANNELMASK_FRONT_LEFT | CHANNELMASK_FRONT_RIGHT | CHANNELMASK_SURROUND_LEFT | CHANNELMASK_SURROUND_RIGHT))
CHANNELMASK_SURROUND = (CHANNELMASK_FRONT_LEFT | CHANNELMASK_FRONT_RIGHT | CHANNELMASK_FRONT_CENTER | CHANNELMASK_SURROUND_LEFT | CHANNELMASK_SURROUND_RIGHT))
CHANNELMASK_5POINT1 = (CHANNELMASK_FRONT_LEFT | CHANNELMASK_FRONT_RIGHT | CHANNELMASK_FRONT_CENTER | CHANNELMASK_LOW_FREQUENCY | CHANNELMASK_SURROUND_LEFT | CHANNELMASK_SURROUND_RIGHT))
CHANNELMASK_5POINT1_REARS = (CHANNELMASK_FRONT_LEFT | CHANNELMASK_FRONT_RIGHT | CHANNELMASK_FRONT_CENTER | CHANNELMASK_LOW_FREQUENCY | CHANNELMASK_BACK_LEFT | CHANNELMASK_BACK_RIGHT))
CHANNELMASK_7POINT0 = (CHANNELMASK_FRONT_LEFT | CHANNELMASK_FRONT_RIGHT | CHANNELMASK_FRONT_CENTER | CHANNELMASK_SURROUND_LEFT | CHANNELMASK_SURROUND_RIGHT | CHANNELMASK_BACK_LEFT | CHANNELMASK_BACK_RIGHT))
CHANNELMASK_7POINT1 = (CHANNELMASK_FRONT_LEFT | CHANNELMASK_FRONT_RIGHT | CHANNELMASK_FRONT_CENTER | CHANNELMASK_LOW_FREQUENCY | CHANNELMASK_SURROUND_LEFT | CHANNELMASK_SURROUND_RIGHT | CHANNELMASK_BACK_LEFT | CHANNELMASK_BACK_RIGHT))
- FMOD_CHANNELMASK_FRONT_LEFT
- Front left channel.
- FMOD_CHANNELMASK_FRONT_RIGHT
- Front right channel.
- FMOD_CHANNELMASK_FRONT_CENTER
- Front center channel.
- FMOD_CHANNELMASK_LOW_FREQUENCY
- Low frequency channel.
- FMOD_CHANNELMASK_SURROUND_LEFT
- Surround left channel.
- FMOD_CHANNELMASK_SURROUND_RIGHT
- Surround right channel.
- FMOD_CHANNELMASK_BACK_LEFT
- Back left channel.
- FMOD_CHANNELMASK_BACK_RIGHT
- Back right channel.
- FMOD_CHANNELMASK_BACK_CENTER
- Back center channel, not represented in any FMOD_SPEAKERMODE.
- FMOD_CHANNELMASK_MONO
- Mono channel mask.
- FMOD_CHANNELMASK_STEREO
- Stereo channel mask.
- FMOD_CHANNELMASK_LRC
- Left / right / center channel mask.
- FMOD_CHANNELMASK_QUAD
- Quadphonic channel mask.
- FMOD_CHANNELMASK_SURROUND
- 5.0 surround channel mask.
- FMOD_CHANNELMASK_5POINT1
- 5.1 surround channel mask.
- FMOD_CHANNELMASK_5POINT1_REARS
- 5.1 surround channel mask, using rears instead of surrounds.
- FMOD_CHANNELMASK_7POINT0
- 7.0 surround channel mask.
- FMOD_CHANNELMASK_7POINT1
- 7.1 surround channel mask.
See Also: DSP::setChannelFormat, DSP::getChannelFormat
Speaker ordering for multi-channel signals.
typedef enum FMOD_CHANNELORDER {
FMOD_CHANNELORDER_DEFAULT,
FMOD_CHANNELORDER_WAVEFORMAT,
FMOD_CHANNELORDER_PROTOOLS,
FMOD_CHANNELORDER_ALLMONO,
FMOD_CHANNELORDER_ALLSTEREO,
FMOD_CHANNELORDER_ALSA,
FMOD_CHANNELORDER_MAX
} FMOD_CHANNELORDER;
enum CHANNELORDER : int
{
DEFAULT,
WAVEFORMAT,
PROTOOLS,
ALLMONO,
ALLSTEREO,
ALSA,
MAX,
}
CHANNELORDER_DEFAULT
CHANNELORDER_WAVEFORMAT
CHANNELORDER_PROTOOLS
CHANNELORDER_ALLMONO
CHANNELORDER_ALLSTEREO
CHANNELORDER_ALSA
CHANNELORDER_MAX
- FMOD_CHANNELORDER_DEFAULT
- Left, Right, Center, LFE, Surround Left, Surround Right, Back Left, Back Right (see FMOD_SPEAKER enumeration)
- FMOD_CHANNELORDER_WAVEFORMAT
- Left, Right, Center, LFE, Back Left, Back Right, Surround Left, Surround Right (as per Microsoft .wav WAVEFORMAT structure master order)
- FMOD_CHANNELORDER_PROTOOLS
- Left, Center, Right, Surround Left, Surround Right, LFE
- FMOD_CHANNELORDER_ALLMONO
- Mono, Mono, Mono, Mono, Mono, Mono, ... (each channel up to FMOD_MAX_CHANNEL_WIDTH treated as mono)
- FMOD_CHANNELORDER_ALLSTEREO
- Left, Right, Left, Right, Left, Right, ... (each pair of channels up to FMOD_MAX_CHANNEL_WIDTH treated as stereo)
- FMOD_CHANNELORDER_ALSA
- Left, Right, Surround Left, Surround Right, Center, LFE (as per Linux ALSA channel order)
- FMOD_CHANNELORDER_MAX
- Maximum number of channel orderings supported.
See Also: FMOD_CREATESOUNDEXINFO
Performance information for Core API functionality.
typedef struct FMOD_CPU_USAGE {
float dsp;
float stream;
float geometry;
float update;
float convolution1;
float convolution2;
} FMOD_CPU_USAGE;
struct CPU_USAGE
{
float dsp;
float stream;
float geometry;
float update;
float convolution1;
float convolution2;
}
CPU_USAGE
{
dsp,
stream,
geometry,
update,
convolution1,
convolution2
};
- dsp
-
DSP mixing engine CPU usage. Percentage of FMOD_THREAD_TYPE_MIXER, or main thread if FMOD_INIT_MIX_FROM_UPDATE flag is used with System::init.
- Units: Percent
- Range: [0, 100]
- stream
-
Streaming engine CPU usage. Percentage of FMOD_THREAD_TYPE_STREAM, or main thread if FMOD_INIT_STREAM_FROM_UPDATE flag is used with System::init.
- Units: Percent
- Range: [0, 100]
- geometry
-
Geometry engine CPU usage. Percentage of FMOD_THREAD_TYPE_GEOMETRY.
- Units: Percent
- Range: [0, 100]
- update
-
System::update CPU usage. Percentage of main thread.
- Units: Percent
- Range: [0, 100]
- convolution1
-
Convolution reverb processing thread #1 CPU usage. Percentage of FMOD_THREAD_TYPE_CONVOLUTION1.
- Units: Percent
- Range: [0, 100]
- convolution2
-
Convolution reverb processing thread #2 CPU usage. Percentage of FMOD_THREAD_TYPE_CONVOLUTION2.
- Units: Percent
- Range: [0, 100]
This structure is filled in with System::getCPUUsage.
For readability, the percentage values are smoothed to provide a more stable output.
'Percentage of main thread' in the descriptions above refers to the thread that the function is called from by the user.
The use of FMOD_THREAD_TYPE_CONVOLUTION1 or FMOD_THREAD_TYPE_CONVOLUTION2 can be controlled with FMOD_ADVANCEDSETTINGS::maxConvolutionThreads.
See Also: Studio::System::getCPUUsage, FMOD_STUDIO_CPU_USAGE
Callback for debug messages when using the logging version of FMOD.
FMOD_RESULT F_CALL FMOD_DEBUG_CALLBACK(
FMOD_DEBUG_FLAGS flags,
const char *file,
int line,
const char *func,
const char *message
);
delegate RESULT DEBUG_CALLBACK(
DEBUG_FLAGS flags,
IntPtr file,
int line,
IntPtr func,
IntPtr message
);
Not supported for JavaScript.
- flags
- Flags which detail the level and type of this log. (FMOD_DEBUG_FLAGS)
- file
- Source code file name where the message originated. (UTF-8 string)
- line
- Source code line number where the message originated.
- func
- Class and function name where the message originated. (UTF-8 string)
- message
- Actual debug message associated with the callback. (UTF-8 string)
The 'file', 'func', and 'message' arguments can be used via StringWrapper by using FMOD.StringWrapper string = new FMOD.StringWrapper(ptrToString);
This callback will fire directly from the log line, as such it can be from any thread.
See Also: Debug_Initialize
Specify the requested information to be output when using the logging version of FMOD.
#define FMOD_DEBUG_LEVEL_NONE 0x00000000
#define FMOD_DEBUG_LEVEL_ERROR 0x00000001
#define FMOD_DEBUG_LEVEL_WARNING 0x00000002
#define FMOD_DEBUG_LEVEL_LOG 0x00000004
#define FMOD_DEBUG_TYPE_MEMORY 0x00000100
#define FMOD_DEBUG_TYPE_FILE 0x00000200
#define FMOD_DEBUG_TYPE_CODEC 0x00000400
#define FMOD_DEBUG_TYPE_TRACE 0x00000800
#define FMOD_DEBUG_TYPE_VIRTUAL 0x00001000
#define FMOD_DEBUG_DISPLAY_TIMESTAMPS 0x00010000
#define FMOD_DEBUG_DISPLAY_LINENUMBERS 0x00020000
#define FMOD_DEBUG_DISPLAY_THREAD 0x00040000
[Flags]
enum DEBUG_FLAGS : uint
{
NONE = 0x00000000,
ERROR = 0x00000001,
WARNING = 0x00000002,
LOG = 0x00000004,
TYPE_MEMORY = 0x00000100,
TYPE_FILE = 0x00000200,
TYPE_CODEC = 0x00000400,
TYPE_TRACE = 0x00000800,
TYPE_VIRTUAL = 0x00001000,
DISPLAY_TIMESTAMPS = 0x00010000,
DISPLAY_LINENUMBERS = 0x00020000,
DISPLAY_THREAD = 0x00040000,
}
DEBUG_LEVEL_NONE = 0x00000000
DEBUG_LEVEL_ERROR = 0x00000001
DEBUG_LEVEL_WARNING = 0x00000002
DEBUG_LEVEL_LOG = 0x00000004
DEBUG_TYPE_MEMORY = 0x00000100
DEBUG_TYPE_FILE = 0x00000200
DEBUG_TYPE_CODEC = 0x00000400
DEBUG_TYPE_TRACE = 0x00000800
DEBUG_TYPE_VIRTUAL = 0x00001000
DEBUG_DISPLAY_TIMESTAMPS = 0x00010000
DEBUG_DISPLAY_LINENUMBERS = 0x00020000
DEBUG_DISPLAY_THREAD = 0x00040000
- FMOD_DEBUG_LEVEL_NONE
- Disable all messages.
- FMOD_DEBUG_LEVEL_ERROR
- Enable only error messages.
- FMOD_DEBUG_LEVEL_WARNING
- Enable warning and error messages.
- FMOD_DEBUG_LEVEL_LOG
- Enable informational, warning and error messages (default).
- FMOD_DEBUG_TYPE_MEMORY
- Verbose logging for memory operations, only use this if you are debugging a memory related issue.
- FMOD_DEBUG_TYPE_FILE
- Verbose logging for file access, only use this if you are debugging a file related issue.
- FMOD_DEBUG_TYPE_CODEC
- Verbose logging for codec initialization, only use this if you are debugging a codec related issue.
- FMOD_DEBUG_TYPE_TRACE
- Verbose logging for internal errors, use this for tracking the origin of error codes.
- FMOD_DEBUG_TYPE_VIRTUAL
- Verbose logging for whenever a Channel changes its virtual state.
- FMOD_DEBUG_DISPLAY_TIMESTAMPS
- Display the time stamp of the log message in milliseconds.
- FMOD_DEBUG_DISPLAY_LINENUMBERS
- Display the source code file and line number for where the message originated.
- FMOD_DEBUG_DISPLAY_THREAD
- Display the thread ID of the calling function that generated the message.
See Also: Debug_Initialize
Specify the level and delivery method of log messages when using the logging version of FMOD.
FMOD_RESULT Debug_Initialize(
FMOD_DEBUG_FLAGS flags,
FMOD_DEBUG_MODE mode = FMOD_DEBUG_MODE_TTY,
FMOD_DEBUG_CALLBACK callback = 0,
const char *filename = nullptr
);
FMOD_RESULT FMOD_Debug_Initialize(
FMOD_DEBUG_FLAGS flags,
FMOD_DEBUG_MODE mode,
FMOD_DEBUG_CALLBACK callback,
const char *filename
);
static RESULT Debug.Initialize(
DEBUG_FLAGS flags,
DEBUG_MODE mode = DEBUG_MODE.TTY,
DEBUG_CALLBACK callback = null,
string filename = null
);
Debug_Initialize(
flags
);
- flags
- Debug level, type and display control flags. More than one mode can be set at once by combining them with the OR operator. (FMOD_DEBUG_FLAGS)
- mode Opt
- Destination for log messages. (FMOD_DEBUG_MODE)
- callback Opt
- Callback to use when mode is set to callback, only required when using that mode. (FMOD_DEBUG_CALLBACK)
- filename Opt
- Filename to use when mode is set to file, only required when using that mode. (UTF-8 string)
This function will return FMOD_ERR_UNSUPPORTED when using the non-logging (release) versions of FMOD.
The logging version of FMOD can be recognized by the 'L' suffix in the library name, fmodL.dll or libfmodL.so for instance.
Note that:
See Also: Callback Behavior
Specify the destination of log output when using the logging version of FMOD.
typedef enum FMOD_DEBUG_MODE {
FMOD_DEBUG_MODE_TTY,
FMOD_DEBUG_MODE_FILE,
FMOD_DEBUG_MODE_CALLBACK
} FMOD_DEBUG_MODE;
enum DEBUG_MODE : int
{
TTY,
FILE,
CALLBACK,
}
Not supported for JavaScript.
- FMOD_DEBUG_MODE_TTY
- Default log location per platform, i.e. Visual Studio output window, stderr, LogCat, etc.
- FMOD_DEBUG_MODE_FILE
- Write log to specified file path.
- FMOD_DEBUG_MODE_CALLBACK
- Call specified callback with log information.
TTY destination can vary depending on platform, common examples include the Visual Studio / Xcode output window, stderr and LogCat.
See Also: Debug_Initialize
Information function to retrieve the state of FMOD disk access.
FMOD_RESULT File_GetDiskBusy(
int *busy
);
FMOD_RESULT FMOD_File_GetDiskBusy(
int *busy
);
Not supported for JavaScript.
- busy Out
- Busy state of the disk at the current time.
Do not use this function to synchronize your own reads with, as due to timing, you might call this function and it says false = it is not busy, but the split second after calling this function, internally FMOD might set it to busy. Use File_SetDiskBusy for proper mutual exclusion as it uses semaphores.
See Also: File_SetDiskBusy
Sets the busy state for disk access ensuring mutual exclusion of file operations.
FMOD_RESULT File_SetDiskBusy(
int busy
);
FMOD_RESULT FMOD_File_SetDiskBusy(
int busy
);
Not supported for JavaScript.
- busy
- Busy state where 1 represent the begining of disk access and 0 represents the end of disk access.
If file IO is currently being performed by FMOD this function will block until it has completed.
This function should be called in pairs once to set the state, then again to clear it once complete.
See Also: File_GetDiskBusy
Structure describing a globally unique identifier.
typedef struct FMOD_GUID {
unsigned int Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} FMOD_GUID;
FMOD_GUID
{
Data1,
Data2,
Data3,
Data4,
};
- Data1
- Specifies the first 8 hexadecimal digits of the GUID.
- Data2
- Specifies the first group of 4 hexadecimal digits.
- Data3
- Specifies the second group of 4 hexadecimal digits.
- Data4
- Array of 8 bytes. The first 2 bytes contain the third group of 4 hexadecimal digits. The remaining 6 bytes contain the final 12 hexadecimal digits.
See Also: System::getDriverInfo
Maximum number of channels per sample of audio supported by audio files, buffers, connections and DSPs.
#define FMOD_MAX_CHANNEL_WIDTH 32
class CONSTANTS
{
const int MAX_CHANNEL_WIDTH = 32;
}
- FMOD_MAX_CHANNEL_WIDTH
- Maximum number of channels.
See Also: System::setSoftwareFormat, ChannelControl::setMixMatrix, DSP::setChannelFormat
Maximum number of listeners supported.
#define FMOD_MAX_LISTENERS 8
class CONSTANTS
{
const int MAX_LISTENERS = 8;
}
- FMOD_MAX_LISTENERS
- Maximum listeners.
See Also: System::set3DNumListeners, System::set3DListenerAttributes
Maximum number of System objects allowed.
#define FMOD_MAX_SYSTEMS 8
class CONSTANTS
{
const int MAX_SYSTEMS = 8;
}
Not supported for JavaScript.
- FMOD_MAX_SYSTEMS
- Maximum System objects.
See Also: System_Create
Callback to allocate a block of memory.
void * F_CALL FMOD_MEMORY_ALLOC_CALLBACK(
unsigned int size,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
delegate IntPtr MEMORY_ALLOC_CALLBACK(
uint size,
MEMORY_TYPE type,
IntPtr sourcestr
);
Not supported for JavaScript.
- size
-
Size of the memory block to be allocated and returned.
- type
- Type of memory allocation. (FMOD_MEMORY_TYPE)
- sourcestr Opt
- String with the FMOD source code filename and line number in it. Only valid in logging versions of FMOD. (UTF-8 string)
Returning an aligned pointer, of 16 byte alignment is recommended for performance reasons.
The 'sourcestr' argument can be used via StringWrapper by using FMOD.StringWrapper sourceStr = new FMOD.StringWrapper(sourcestr);
See Also: Memory_Initialize, Memory_GetStats, FMOD_MEMORY_REALLOC_CALLBACK, FMOD_MEMORY_FREE_CALLBACK
Callback to free a block of memory.
void F_CALL FMOD_MEMORY_FREE_CALLBACK(
void *ptr,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
delegate void MEMORY_FREE_CALLBACK(
IntPtr ptr,
MEMORY_TYPE type,
IntPtr sourcestr
);
Not supported for JavaScript.
- ptr
- Pre-existing block of memory to be freed.
- type
- Type of memory to be freed. (FMOD_MEMORY_TYPE)
- sourcestr
- String with the FMOD source code filename and line number in it. Only valid in logging versions of FMOD. (UTF-8 string)
The 'sourcestr' argument can be used via StringWrapper by using FMOD.StringWrapper sourceStr = new FMOD.StringWrapper(sourcestr);
See Also: Memory_Initialize, FMOD_MEMORY_ALLOC_CALLBACK, FMOD_MEMORY_REALLOC_CALLBACK
Returns information on the memory usage of FMOD.
FMOD_RESULT Memory_GetStats(
int *currentalloced,
int *maxalloced,
bool blocking = true
);
FMOD_RESULT FMOD_Memory_GetStats(
int *currentalloced,
int *maxalloced,
FMOD_BOOL blocking
);
static RESULT Memory.GetStats(
out int currentalloced,
out int maxalloced,
bool blocking = true
);
Memory_GetStats(
currentalloced,
maxalloced,
blocking
);
- currentalloced OutOpt
- Currently allocated memory at time of call.
- maxalloced OutOpt
- Maximum allocated memory since System::init or Memory_Initialize.
- blocking
-
Flag to indicate whether to favour speed or accuracy. Specifying true for this parameter will flush the DSP graph to make sure all queued allocations happen immediately, which can be costly.
This information is byte accurate and counts all allocs and frees internally. This is useful for determining a fixed memory size to make FMOD work within for fixed memory machines such as consoles.
Note that if using Memory_Initialize, the memory usage will be slightly higher than without it, as FMOD has to have a small amount of memory overhead to manage the available memory.
Specifies a method for FMOD to allocate and free memory, either through user supplied callbacks or through a user supplied memory buffer with a fixed size.
FMOD_RESULT Memory_Initialize(
void *poolmem,
int poollen,
FMOD_MEMORY_ALLOC_CALLBACK useralloc,
FMOD_MEMORY_REALLOC_CALLBACK userrealloc,
FMOD_MEMORY_FREE_CALLBACK userfree,
FMOD_MEMORY_TYPE memtypeflags = FMOD_MEMORY_ALL
);
FMOD_RESULT FMOD_Memory_Initialize(
void *poolmem,
int poollen,
FMOD_MEMORY_ALLOC_CALLBACK useralloc,
FMOD_MEMORY_REALLOC_CALLBACK userrealloc,
FMOD_MEMORY_FREE_CALLBACK userfree,
FMOD_MEMORY_TYPE memtypeflags
);
static RESULT Memory.Initialize(
IntPtr poolmem,
int poollen,
MEMORY_ALLOC_CALLBACK useralloc,
MEMORY_REALLOC_CALLBACK userrealloc,
MEMORY_FREE_CALLBACK userfree,
MEMORY_TYPE memtypeflags = MEMORY_TYPE.ALL
);
Not supported for JavaScript.
- poolmem Opt
- Block of memory of size
poollen bytes for FMOD to manage, mutually exclusive with useralloc / userrealloc / userfree.
- poollen Opt
-
Size of poolmem, must be a multiple of 512.
- useralloc Opt
- Memory allocation callback compatible with ANSI malloc, mutually exclusive with
poolmem. (FMOD_MEMORY_ALLOC_CALLBACK)
- userrealloc Opt
- Memory reallocation callback compatible with ANSI realloc, mutually exclusive with
poolmem. (FMOD_MEMORY_REALLOC_CALLBACK)
- userfree Opt
- Memory free callback compatible with ANSI free, mutually exclusive with
poolmem. (FMOD_MEMORY_FREE_CALLBACK)
- memtypeflags Opt
- Types of memory callbacks you wish to handle. OR these together to handle multiple types. (FMOD_MEMORY_TYPE)
This function must be called before any FMOD System object is created.
Valid usage of this function requires either poolmem and poollen or useralloc, userrealloc and userfree being set.
If 'useralloc' and 'userfree' are provided without 'userrealloc' the reallocation is implemented via an allocation of the new size, copy from old address to new, then a free of the old address.
To find out the required fixed size call Memory_Initialize with an overly large pool size (or no pool) and find out the maximum RAM usage at any one time with Memory_GetStats.
Callback implementations must be thread safe.
If you specify a fixed size pool that is too small, FMOD will return FMOD_ERR_MEMORY when the limit of the fixed size pool is exceeded. At this point, it's possible that FMOD may become unstable. To maintain stability, do not allow FMOD to run out of memory.
See Also: Callback Behavior
Callback to re-allocate a block of memory to a different size.
void * F_CALL FMOD_MEMORY_REALLOC_CALLBACK(
void *ptr,
unsigned int size,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
delegate IntPtr MEMORY_REALLOC_CALLBACK(
IntPtr ptr,
uint size,
MEMORY_TYPE type,
IntPtr sourcestr
);
Not supported for JavaScript.
- ptr
- Block of memory to be resized. If this is null, then a new block of memory is allocated and no memory is freed.
- size
-
Size of the memory to be reallocated.
- type
- Memory allocation type. (FMOD_MEMORY_TYPE)
- sourcestr
- String with the FMOD source code filename and line number in it. Only valid in logging versions of FMOD. (UTF-8 string)
When allocating new memory, the contents of the old memory block must be preserved.
Returning an aligned pointer, of 16 byte alignment is recommended for performance reasons.
The 'sourcestr' argument can be used via StringWrapper by using FMOD.StringWrapper sourceStr = new FMOD.StringWrapper(sourcestr);
See Also: Memory_Initialize, Memory_GetStats, FMOD_MEMORY_ALLOC_CALLBACK, FMOD_MEMORY_FREE_CALLBACK
Bitfields for memory allocation type being passed into FMOD memory callbacks.
#define FMOD_MEMORY_NORMAL 0x00000000
#define FMOD_MEMORY_STREAM_FILE 0x00000001
#define FMOD_MEMORY_STREAM_DECODE 0x00000002
#define FMOD_MEMORY_SAMPLEDATA 0x00000004
#define FMOD_MEMORY_DSP_BUFFER 0x00000008
#define FMOD_MEMORY_PLUGIN 0x00000010
#define FMOD_MEMORY_PERSISTENT 0x00200000
#define FMOD_MEMORY_ALL 0xFFFFFFFF
[Flags]
enum MEMORY_TYPE : uint
{
NORMAL = 0x00000000,
STREAM_FILE = 0x00000001,
STREAM_DECODE = 0x00000002,
SAMPLEDATA = 0x00000004,
DSP_BUFFER = 0x00000008,
PLUGIN = 0x00000010,
PERSISTENT = 0x00200000,
ALL = 0xFFFFFFFF
}
Not supported for JavaScript.
- FMOD_MEMORY_NORMAL
- Standard memory.
- FMOD_MEMORY_STREAM_FILE
- Stream file buffer, size controllable with System::setStreamBufferSize.
- FMOD_MEMORY_STREAM_DECODE
- Stream decode buffer, size controllable with FMOD_CREATESOUNDEXINFO::decodebuffersize.
- FMOD_MEMORY_SAMPLEDATA
- Sample data buffer. Raw audio data, usually PCM/MPEG/ADPCM/XMA data.
- FMOD_MEMORY_DSP_BUFFER
- Deprecated.
- FMOD_MEMORY_PLUGIN
- Memory allocated by a third party plugin.
- FMOD_MEMORY_PERSISTENT
- Persistent memory. Memory will be freed when System::release is called.
- FMOD_MEMORY_ALL
- Mask specifying all memory types.
See Also: FMOD_MEMORY_ALLOC_CALLBACK, FMOD_MEMORY_REALLOC_CALLBACK, FMOD_MEMORY_FREE_CALLBACK, Memory_Initialize
Sound description bitfields, bitwise OR them together for loading and describing Sounds.
#define FMOD_DEFAULT 0x00000000
#define FMOD_LOOP_OFF 0x00000001
#define FMOD_LOOP_NORMAL 0x00000002
#define FMOD_LOOP_BIDI 0x00000004
#define FMOD_2D 0x00000008
#define FMOD_3D 0x00000010
#define FMOD_CREATESTREAM 0x00000080
#define FMOD_CREATESAMPLE 0x00000100
#define FMOD_CREATECOMPRESSEDSAMPLE 0x00000200
#define FMOD_OPENUSER 0x00000400
#define FMOD_OPENMEMORY 0x00000800
#define FMOD_OPENMEMORY_POINT 0x10000000
#define FMOD_OPENRAW 0x00001000
#define FMOD_OPENONLY 0x00002000
#define FMOD_ACCURATETIME 0x00004000
#define FMOD_MPEGSEARCH 0x00008000
#define FMOD_NONBLOCKING 0x00010000
#define FMOD_UNIQUE 0x00020000
#define FMOD_3D_HEADRELATIVE 0x00040000
#define FMOD_3D_WORLDRELATIVE 0x00080000
#define FMOD_3D_INVERSEROLLOFF 0x00100000
#define FMOD_3D_LINEARROLLOFF 0x00200000
#define FMOD_3D_LINEARSQUAREROLLOFF 0x00400000
#define FMOD_3D_INVERSETAPEREDROLLOFF 0x00800000
#define FMOD_3D_CUSTOMROLLOFF 0x04000000
#define FMOD_3D_IGNOREGEOMETRY 0x40000000
#define FMOD_IGNORETAGS 0x02000000
#define FMOD_LOWMEM 0x08000000
#define FMOD_VIRTUAL_PLAYFROMSTART 0x80000000
[Flags]
enum MODE : uint
{
DEFAULT = 0x00000000,
LOOP_OFF = 0x00000001,
LOOP_NORMAL = 0x00000002,
LOOP_BIDI = 0x00000004,
_2D = 0x00000008,
_3D = 0x00000010,
CREATESTREAM = 0x00000080,
CREATESAMPLE = 0x00000100,
CREATECOMPRESSEDSAMPLE = 0x00000200,
OPENUSER = 0x00000400,
OPENMEMORY = 0x00000800,
OPENMEMORY_POINT = 0x10000000,
OPENRAW = 0x00001000,
OPENONLY = 0x00002000,
ACCURATETIME = 0x00004000,
MPEGSEARCH = 0x00008000,
NONBLOCKING = 0x00010000,
UNIQUE = 0x00020000,
_3D_HEADRELATIVE = 0x00040000,
_3D_WORLDRELATIVE = 0x00080000,
_3D_INVERSEROLLOFF = 0x00100000,
_3D_LINEARROLLOFF = 0x00200000,
_3D_LINEARSQUAREROLLOFF = 0x00400000,
_3D_INVERSETAPEREDROLLOFF = 0x00800000,
_3D_CUSTOMROLLOFF = 0x04000000,
_3D_IGNOREGEOMETRY = 0x40000000,
IGNORETAGS = 0x02000000,
LOWMEM = 0x08000000,
VIRTUAL_PLAYFROMSTART = 0x80000000
}
DEFAULT = 0x00000000
LOOP_OFF = 0x00000001
LOOP_NORMAL = 0x00000002
LOOP_BIDI = 0x00000004
_2D = 0x00000008
_3D = 0x00000010
CREATESTREAM = 0x00000080
CREATESAMPLE = 0x00000100
CREATECOMPRESSEDSAMPLE = 0x00000200
OPENUSER = 0x00000400
OPENMEMORY = 0x00000800
OPENMEMORY_POINT = 0x10000000
OPENRAW = 0x00001000
OPENONLY = 0x00002000
ACCURATETIME = 0x00004000
MPEGSEARCH = 0x00008000
NONBLOCKING = 0x00010000
UNIQUE = 0x00020000
_3D_HEADRELATIVE = 0x00040000
_3D_WORLDRELATIVE = 0x00080000
_3D_INVERSEROLLOFF = 0x00100000
_3D_LINEARROLLOFF = 0x00200000
_3D_LINEARSQUAREROLLOFF = 0x00400000
_3D_INVERSETAPEREDROLLOFF = 0x00800000
_3D_CUSTOMROLLOFF = 0x04000000
_3D_IGNOREGEOMETRY = 0x40000000
IGNORETAGS = 0x02000000
LOWMEM = 0x08000000
VIRTUAL_PLAYFROMSTART = 0x80000000
- FMOD_DEFAULT
- Default for all modes listed below. FMOD_LOOP_OFF, FMOD_2D, FMOD_3D_WORLDRELATIVE, FMOD_3D_INVERSEROLLOFF
- FMOD_LOOP_OFF
- For non looping Sounds. (DEFAULT). Overrides FMOD_LOOP_NORMAL / FMOD_LOOP_BIDI.
- FMOD_LOOP_NORMAL
- For forward looping Sounds.
- FMOD_LOOP_BIDI
- For bidirectional looping Sounds. (only works on non-streaming, real voices).
- FMOD_2D
- Ignores any 3d processing. (DEFAULT).
- FMOD_3D
- Makes the Sound, Channel or ChannelGroup positionable in 3D. Overrides FMOD_2D.
- FMOD_CREATESTREAM
- Decompress at runtime, streaming from the source provided (ie from disk). Overrides FMOD_CREATESAMPLE and FMOD_CREATECOMPRESSEDSAMPLE. Note a stream can only be played once at a time due to a stream only having 1 stream buffer and file handle. Open multiple streams to have them play concurrently.
- FMOD_CREATESAMPLE
- Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format (ie PCM). Fastest for playback and most flexible.
- FMOD_CREATECOMPRESSEDSAMPLE
- Load MP2/MP3/FADPCM/IMAADPCM/Vorbis/AT9 or XMA into memory and leave it compressed. Vorbis/AT9/FADPCM encoding only supported in the .FSB container format. During playback the FMOD software mixer will decode it in realtime as a 'compressed sample'. Overrides FMOD_CREATESAMPLE. If the sound data is not one of the supported formats, it will behave as if it was created with FMOD_CREATESAMPLE and decode the sound into PCM.
- FMOD_OPENUSER
- Opens a user-created static sample or stream. When used, the first argument of System::createSound and System::createStream,
name_or_data, is ignored, so recommended practice is to pass null or equivalent. The following data must be provided using FMOD_CREATESOUNDEXINFO: cbsize, length, numchannels, defaultfrequency, format, and optionally readcallback. If a user-created 'sample' is created with no read callback, the sample will be empty. If this is the case, use Sound::lock and Sound::unlock to place sound data into the Sound.
- FMOD_OPENMEMORY
- When used, the first argument of System::createSound and System::createStream,
name_or_data, is interpreted as a pointer to memory instead of filename for creating sounds. The following data must be provided using FMOD_CREATESOUNDEXINFO: cbsize, and length. If used with FMOD_CREATESAMPLE or FMOD_CREATECOMPRESSEDSAMPLE, FMOD duplicates the memory into its own buffers. Your own buffer can be freed after open, unless you are using FMOD_NONBLOCKING then wait until the Sound is in the FMOD_OPENSTATE_READY state. If used with FMOD_CREATESTREAM, FMOD will stream out of the buffer whose pointer you passed in. In this case, your own buffer should not be freed until you have finished with and released the stream.
- FMOD_OPENMEMORY_POINT
- When used, the first argument of System::createSound and System::createStream,
name_or_data, is interpreted as a pointer to memory instead of filename for creating sounds. The following data must be provided using FMOD_CREATESOUNDEXINFO: cbsize, and length. This differs to FMOD_OPENMEMORY in that it uses the memory as is, without duplicating the memory into its own buffers. Cannot be freed after open, only after Sound::release. Will not work if the data is compressed and FMOD_CREATECOMPRESSEDSAMPLE is not used. Cannot be used in conjunction with FMOD_CREATESOUNDEXINFO::encryptionkey.
- FMOD_OPENRAW
- Will ignore file format and treat as raw PCM. The following data must be provided using FMOD_CREATESOUNDEXINFO:
cbsize, numchannels, defaultfrequency, and format. Must be little endian data, and integer data must also be signed.
- FMOD_OPENONLY
- Just open the file, don't prebuffer or read. Good for fast opens for info, or when Sound::readData is to be used.
- FMOD_ACCURATETIME
- For System::createSound - for accurate Sound::getLength / Channel::setPosition on VBR MP3, and MOD/S3M/XM/IT/MIDI files. Scans file first, so takes longer to open. FMOD_OPENONLY does not affect this.
- FMOD_MPEGSEARCH
- For corrupted / bad MP3 files. This will search all the way through the file until it hits a valid MPEG header. Normally only searches for 4k.
- FMOD_NONBLOCKING
- For opening Sounds and getting streamed subsounds (seeking) asynchronously. Use Sound::getOpenState to poll the state of the Sound as it opens or retrieves the subsound in the background.
- FMOD_UNIQUE
- Unique Sound, can only be played one at a time.
- FMOD_3D_HEADRELATIVE
- Make the Sound's position, velocity and orientation relative to the listener.
- FMOD_3D_WORLDRELATIVE
- Make the Sound's position, velocity and orientation absolute (relative to the world). (DEFAULT)
- FMOD_3D_INVERSEROLLOFF
- This sound follows an inverse roll-off model. Below
mindistance, the volume is unattenuated; as distance increases above mindistance, the volume attenuates using mindistance/distance as the gradient until it reaches maxdistance, where it stops attenuating. For this roll-off mode, distance values greater than mindistance are scaled according to the rolloffscale. This roll-off mode accurately models the way sounds attenuate over distance in the real world. (DEFAULT)

- FMOD_3D_LINEARROLLOFF
- This sound follows a linear roll-off model. Below
mindistance, the volume is unattenuated; as distance increases from mindistance to maxdistance, the volume attenuates to silence using a linear gradient. For this roll-off mode, distance values greater than mindistance are scaled according to the rolloffscale. While this roll-off mode is not as realistic as inverse roll-off mode, it is easier to comprehend.

- FMOD_3D_LINEARSQUAREROLLOFF
- This sound follows a linear-square roll-off model. Below
mindistance, the volume is unattenuated; as distance increases from mindistance to maxdistance, the volume attenuates to silence according to a linear squared gradient. For this roll-off mode, distance values greater than mindistance are scaled according to the rolloffscale. This roll-off mode provides steeper volume ramping close to the mindistance, and more gradual ramping close to the maxdistance, than linear roll-off mode.

- FMOD_3D_INVERSETAPEREDROLLOFF
- This sound follows a combination of the inverse and linear-square roll-off models. At short distances where inverse roll-off would provide greater attenuation, it functions as inverse roll-off mode; then at greater distances where linear-square roll-off mode would provide greater attenuation, it uses that roll-off mode instead. For this roll-off mode, distance values greater than
mindistance are scaled according to the rolloffscale. Inverse tapered roll-off mode approximates realistic behavior while still guaranteeing the sound attenuates to silence at maxdistance.

- FMOD_3D_CUSTOMROLLOFF
- This sound follow a roll-off model defined by Sound::set3DCustomRolloff / ChannelControl::set3DCustomRolloff. This roll-off mode provides greater freedom and flexibility than any other, but must be defined manually.
- FMOD_3D_IGNOREGEOMETRY
- Is not affected by geometry occlusion. If not specified in Sound::setMode, or ChannelControl::setMode, the flag is cleared and it is affected by geometry again.
- FMOD_IGNORETAGS
- Skips id3v2/asf/etc tag checks when opening a Sound, to reduce seek/read overhead when opening files.
- FMOD_LOWMEM
- Removes some features from samples to give a lower memory overhead, like Sound::getName.
- FMOD_VIRTUAL_PLAYFROMSTART
- For Channels that start virtual (due to being quiet or low importance), instead of swapping back to audible, and playing at the correct offset according to time, this flag makes the Channel play from the start.
By default a Sound will open as a static sound that is decompressed fully into memory to PCM. (ie equivalent of FMOD_CREATESAMPLE) To have a stream instead, use FMOD_CREATESTREAM, or use the wrapper function System::createStream.
Some opening modes (ie FMOD_OPENUSER, FMOD_OPENMEMORY, FMOD_OPENMEMORY_POINT, FMOD_OPENRAW) will need extra information. This can be provided using the FMOD_CREATESOUNDEXINFO structure.
Specifying FMOD_OPENMEMORY_POINT will POINT to your memory rather allocating its own sound buffers and duplicating it internally. This means you cannot free the memory while FMOD is using it, until after Sound::release is called.
With FMOD_OPENMEMORY_POINT, for PCM formats, only WAV, FSB, and RAW are supported. For compressed formats, only those formats supported by FMOD_CREATECOMPRESSEDSAMPLE are supported.
With FMOD_OPENMEMORY_POINT and FMOD_OPENRAW or PCM, if using them together, note that you must pad the data on each side by 16 bytes. This is so fmod can modify the ends of the data for looping / interpolation / mixing purposes. If a wav file, you will need to insert silence, and then reset loop points to stop the playback from playing that silence.
See Also: System::createSound, System::createStream, Sound::setMode, ChannelControl::setMode
Error codes returned from every function.
typedef enum FMOD_RESULT {
FMOD_OK,
FMOD_ERR_BADCOMMAND,
FMOD_ERR_CHANNEL_ALLOC,
FMOD_ERR_CHANNEL_STOLEN,
FMOD_ERR_DMA,
FMOD_ERR_DSP_CONNECTION,
FMOD_ERR_DSP_DONTPROCESS,
FMOD_ERR_DSP_FORMAT,
FMOD_ERR_DSP_INUSE,
FMOD_ERR_DSP_NOTFOUND,
FMOD_ERR_DSP_RESERVED,
FMOD_ERR_DSP_SILENCE,
FMOD_ERR_DSP_TYPE,
FMOD_ERR_FILE_BAD,
FMOD_ERR_FILE_COULDNOTSEEK,
FMOD_ERR_FILE_DISKEJECTED,
FMOD_ERR_FILE_EOF,
FMOD_ERR_FILE_ENDOFDATA,
FMOD_ERR_FILE_NOTFOUND,
FMOD_ERR_FORMAT,
FMOD_ERR_HEADER_MISMATCH,
FMOD_ERR_HTTP,
FMOD_ERR_HTTP_ACCESS,
FMOD_ERR_HTTP_PROXY_AUTH,
FMOD_ERR_HTTP_SERVER_ERROR,
FMOD_ERR_HTTP_TIMEOUT,
FMOD_ERR_INITIALIZATION,
FMOD_ERR_INITIALIZED,
FMOD_ERR_INTERNAL,
FMOD_ERR_INVALID_FLOAT,
FMOD_ERR_INVALID_HANDLE,
FMOD_ERR_INVALID_PARAM,
FMOD_ERR_INVALID_POSITION,
FMOD_ERR_INVALID_SPEAKER,
FMOD_ERR_INVALID_SYNCPOINT,
FMOD_ERR_INVALID_THREAD,
FMOD_ERR_INVALID_VECTOR,
FMOD_ERR_MAXAUDIBLE,
FMOD_ERR_MEMORY,
FMOD_ERR_MEMORY_CANTPOINT,
FMOD_ERR_NEEDS3D,
FMOD_ERR_NEEDSHARDWARE,
FMOD_ERR_NET_CONNECT,
FMOD_ERR_NET_SOCKET_ERROR,
FMOD_ERR_NET_URL,
FMOD_ERR_NET_WOULD_BLOCK,
FMOD_ERR_NOTREADY,
FMOD_ERR_OUTPUT_ALLOCATED,
FMOD_ERR_OUTPUT_CREATEBUFFER,
FMOD_ERR_OUTPUT_DRIVERCALL,
FMOD_ERR_OUTPUT_FORMAT,
FMOD_ERR_OUTPUT_INIT,
FMOD_ERR_OUTPUT_NODRIVERS,
FMOD_ERR_PLUGIN,
FMOD_ERR_PLUGIN_MISSING,
FMOD_ERR_PLUGIN_RESOURCE,
FMOD_ERR_PLUGIN_VERSION,
FMOD_ERR_RECORD,
FMOD_ERR_REVERB_CHANNELGROUP,
FMOD_ERR_REVERB_INSTANCE,
FMOD_ERR_SUBSOUNDS,
FMOD_ERR_SUBSOUND_ALLOCATED,
FMOD_ERR_SUBSOUND_CANTMOVE,
FMOD_ERR_TAGNOTFOUND,
FMOD_ERR_TOOMANYCHANNELS,
FMOD_ERR_TRUNCATED,
FMOD_ERR_UNIMPLEMENTED,
FMOD_ERR_UNINITIALIZED,
FMOD_ERR_UNSUPPORTED,
FMOD_ERR_VERSION,
FMOD_ERR_EVENT_ALREADY_LOADED,
FMOD_ERR_EVENT_LIVEUPDATE_BUSY,
FMOD_ERR_EVENT_LIVEUPDATE_MISMATCH,
FMOD_ERR_EVENT_LIVEUPDATE_TIMEOUT,
FMOD_ERR_EVENT_NOTFOUND,
FMOD_ERR_STUDIO_UNINITIALIZED,
FMOD_ERR_STUDIO_NOT_LOADED,
FMOD_ERR_INVALID_STRING,
FMOD_ERR_ALREADY_LOCKED,
FMOD_ERR_NOT_LOCKED,
FMOD_ERR_RECORD_DISCONNECTED,
FMOD_ERR_TOOMANYSAMPLES
} FMOD_RESULT;
enum RESULT : int
{
OK,
ERR_BADCOMMAND,
ERR_CHANNEL_ALLOC,
ERR_CHANNEL_STOLEN,
ERR_DMA,
ERR_DSP_CONNECTION,
ERR_DSP_DONTPROCESS,
ERR_DSP_FORMAT,
ERR_DSP_INUSE,
ERR_DSP_NOTFOUND,
ERR_DSP_RESERVED,
ERR_DSP_SILENCE,
ERR_DSP_TYPE,
ERR_FILE_BAD,
ERR_FILE_COULDNOTSEEK,
ERR_FILE_DISKEJECTED,
ERR_FILE_EOF,
ERR_FILE_ENDOFDATA,
ERR_FILE_NOTFOUND,
ERR_FORMAT,
ERR_HEADER_MISMATCH,
ERR_HTTP,
ERR_HTTP_ACCESS,
ERR_HTTP_PROXY_AUTH,
ERR_HTTP_SERVER_ERROR,
ERR_HTTP_TIMEOUT,
ERR_INITIALIZATION,
ERR_INITIALIZED,
ERR_INTERNAL,
ERR_INVALID_FLOAT,
ERR_INVALID_HANDLE,
ERR_INVALID_PARAM,
ERR_INVALID_POSITION,
ERR_INVALID_SPEAKER,
ERR_INVALID_SYNCPOINT,
ERR_INVALID_THREAD,
ERR_INVALID_VECTOR,
ERR_MAXAUDIBLE,
ERR_MEMORY,
ERR_MEMORY_CANTPOINT,
ERR_NEEDS3D,
ERR_NEEDSHARDWARE,
ERR_NET_CONNECT,
ERR_NET_SOCKET_ERROR,
ERR_NET_URL,
ERR_NET_WOULD_BLOCK,
ERR_NOTREADY,
ERR_OUTPUT_ALLOCATED,
ERR_OUTPUT_CREATEBUFFER,
ERR_OUTPUT_DRIVERCALL,
ERR_OUTPUT_FORMAT,
ERR_OUTPUT_INIT,
ERR_OUTPUT_NODRIVERS,
ERR_PLUGIN,
ERR_PLUGIN_MISSING,
ERR_PLUGIN_RESOURCE,
ERR_PLUGIN_VERSION,
ERR_RECORD,
ERR_REVERB_CHANNELGROUP,
ERR_REVERB_INSTANCE,
ERR_SUBSOUNDS,
ERR_SUBSOUND_ALLOCATED,
ERR_SUBSOUND_CANTMOVE,
ERR_TAGNOTFOUND,
ERR_TOOMANYCHANNELS,
ERR_TRUNCATED,
ERR_UNIMPLEMENTED,
ERR_UNINITIALIZED,
ERR_UNSUPPORTED,
ERR_VERSION,
ERR_EVENT_ALREADY_LOADED,
ERR_EVENT_LIVEUPDATE_BUSY,
ERR_EVENT_LIVEUPDATE_MISMATCH,
ERR_EVENT_LIVEUPDATE_TIMEOUT,
ERR_EVENT_NOTFOUND,
ERR_STUDIO_UNINITIALIZED,
ERR_STUDIO_NOT_LOADED,
ERR_INVALID_STRING,
ERR_ALREADY_LOCKED,
ERR_NOT_LOCKED,
ERR_RECORD_DISCONNECTED,
ERR_TOOMANYSAMPLES,
}
OK
ERR_BADCOMMAND
ERR_CHANNEL_ALLOC
ERR_CHANNEL_STOLEN
ERR_DMA
ERR_DSP_CONNECTION
ERR_DSP_DONTPROCESS
ERR_DSP_FORMAT
ERR_DSP_INUSE
ERR_DSP_NOTFOUND
ERR_DSP_RESERVED
ERR_DSP_SILENCE
ERR_DSP_TYPE
ERR_FILE_BAD
ERR_FILE_COULDNOTSEEK
ERR_FILE_DISKEJECTED
ERR_FILE_EOF
ERR_FILE_ENDOFDATA
ERR_FILE_NOTFOUND
ERR_FORMAT
ERR_HEADER_MISMATCH
ERR_HTTP
ERR_HTTP_ACCESS
ERR_HTTP_PROXY_AUTH
ERR_HTTP_SERVER_ERROR
ERR_HTTP_TIMEOUT
ERR_INITIALIZATION
ERR_INITIALIZED
ERR_INTERNAL
ERR_INVALID_FLOAT
ERR_INVALID_HANDLE
ERR_INVALID_PARAM
ERR_INVALID_POSITION
ERR_INVALID_SPEAKER
ERR_INVALID_SYNCPOINT
ERR_INVALID_THREAD
ERR_INVALID_VECTOR
ERR_MAXAUDIBLE
ERR_MEMORY
ERR_MEMORY_CANTPOINT
ERR_NEEDS3D
ERR_NEEDSHARDWARE
ERR_NET_CONNECT
ERR_NET_SOCKET_ERROR
ERR_NET_URL
ERR_NET_WOULD_BLOCK
ERR_NOTREADY
ERR_OUTPUT_ALLOCATED
ERR_OUTPUT_CREATEBUFFER
ERR_OUTPUT_DRIVERCALL
ERR_OUTPUT_FORMAT
ERR_OUTPUT_INIT
ERR_OUTPUT_NODRIVERS
ERR_PLUGIN
ERR_PLUGIN_MISSING
ERR_PLUGIN_RESOURCE
ERR_PLUGIN_VERSION
ERR_RECORD
ERR_REVERB_CHANNELGROUP
ERR_REVERB_INSTANCE
ERR_SUBSOUNDS
ERR_SUBSOUND_ALLOCATED
ERR_SUBSOUND_CANTMOVE
ERR_TAGNOTFOUND
ERR_TOOMANYCHANNELS
ERR_TRUNCATED
ERR_UNIMPLEMENTED
ERR_UNINITIALIZED
ERR_UNSUPPORTED
ERR_VERSION
ERR_EVENT_ALREADY_LOADED
ERR_EVENT_LIVEUPDATE_BUSY
ERR_EVENT_LIVEUPDATE_MISMATCH
ERR_EVENT_LIVEUPDATE_TIMEOUT
ERR_EVENT_NOTFOUND
ERR_STUDIO_UNINITIALIZED
ERR_STUDIO_NOT_LOADED
ERR_INVALID_STRING
ERR_ALREADY_LOCKED
ERR_NOT_LOCKED
ERR_RECORD_DISCONNECTED
ERR_TOOMANYSAMPLES
- FMOD_OK
- No errors.
- FMOD_ERR_BADCOMMAND
- 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).
- FMOD_ERR_CHANNEL_ALLOC
- Error trying to allocate a Channel.
- FMOD_ERR_CHANNEL_STOLEN
- The specified Channel has been reused to play another Sound.
- FMOD_ERR_DMA
- DMA Failure. See debug output for more information.
- FMOD_ERR_DSP_CONNECTION
- DSP connection error. Connection possibly caused a cyclic dependency or connected DSPs with incompatible buffer counts.
- FMOD_ERR_DSP_DONTPROCESS
- 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.
- FMOD_ERR_DSP_FORMAT
- DSP format error. A DSP unit may have attempted to connect to this graph with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map.
- FMOD_ERR_DSP_INUSE
- DSP is already in the mixer's DSP graph. It must be removed before being reinserted or released.
- FMOD_ERR_DSP_NOTFOUND
- DSP connection error. Couldn't find the DSP unit specified.
- FMOD_ERR_DSP_RESERVED
- DSP operation error. Cannot perform operation on this DSP as it is reserved by the system.
- FMOD_ERR_DSP_SILENCE
- DSP return code from a DSP process query callback. Tells the mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph.
- FMOD_ERR_DSP_TYPE
- DSP operation cannot be performed on a DSP of this type.
- FMOD_ERR_FILE_BAD
- Error loading file.
- FMOD_ERR_FILE_COULDNOTSEEK
- Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.
- FMOD_ERR_FILE_DISKEJECTED
- Media was ejected while reading.
- FMOD_ERR_FILE_EOF
- End of file unexpectedly reached while trying to read essential data (truncated?).
- FMOD_ERR_FILE_ENDOFDATA
- End of current chunk reached while trying to read data.
- FMOD_ERR_FILE_NOTFOUND
- File not found.
- FMOD_ERR_FORMAT
- Unsupported file or audio format.
- There is a version mismatch between the FMOD header and either the FMOD API library or the Core API library.
- FMOD_ERR_HTTP
- A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.
- FMOD_ERR_HTTP_ACCESS
- The specified resource requires authentication or is forbidden.
- FMOD_ERR_HTTP_PROXY_AUTH
- Proxy authentication is required to access the specified resource.
- FMOD_ERR_HTTP_SERVER_ERROR
- A HTTP server error occurred.
- FMOD_ERR_HTTP_TIMEOUT
- The HTTP request timed out.
- FMOD_ERR_INITIALIZATION
- FMOD was not initialized correctly to support this function.
- FMOD_ERR_INITIALIZED
- Cannot call this command after System::init.
- FMOD_ERR_INTERNAL
- An error occured in the FMOD system. Use the logging version of FMOD for more information.
- FMOD_ERR_INVALID_FLOAT
- Value passed in was a NaN, Inf or denormalized float.
- FMOD_ERR_INVALID_HANDLE
- An invalid object handle was used.
- FMOD_ERR_INVALID_PARAM
- An invalid parameter was passed to this function.
- FMOD_ERR_INVALID_POSITION
- An invalid seek position was passed to this function.
- FMOD_ERR_INVALID_SPEAKER
- An invalid speaker was passed to this function based on the current speaker mode.
- FMOD_ERR_INVALID_SYNCPOINT
- The syncpoint did not come from this Sound handle.
- FMOD_ERR_INVALID_THREAD
- Tried to call a function on a thread that is not supported.
- FMOD_ERR_INVALID_VECTOR
- The vectors passed in are not unit length, or perpendicular.
- FMOD_ERR_MAXAUDIBLE
- Reached maximum audible playback count for this Sound's SoundGroup.
- FMOD_ERR_MEMORY
- Not enough memory or resources.
- FMOD_ERR_MEMORY_CANTPOINT
- Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used.
- FMOD_ERR_NEEDS3D
- Tried to call a command on a 2D Sound when the command was meant for 3D Sound.
- FMOD_ERR_NEEDSHARDWARE
- Tried to use a feature that requires hardware support.
- FMOD_ERR_NET_CONNECT
- Couldn't connect to the specified host.
- FMOD_ERR_NET_SOCKET_ERROR
- A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.
- FMOD_ERR_NET_URL
- The specified URL couldn't be resolved.
- FMOD_ERR_NET_WOULD_BLOCK
- Operation on a non-blocking socket could not complete immediately.
- FMOD_ERR_NOTREADY
- Operation could not be performed because specified Sound/DSP connection is not ready.
- FMOD_ERR_OUTPUT_ALLOCATED
- Error initializing output device, but more specifically, the output device is already in use and cannot be reused.
- FMOD_ERR_OUTPUT_CREATEBUFFER
- Error creating hardware sound buffer.
- FMOD_ERR_OUTPUT_DRIVERCALL
- A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted.
- FMOD_ERR_OUTPUT_FORMAT
- Soundcard does not support the specified format.
- FMOD_ERR_OUTPUT_INIT
- Error initializing output device.
- FMOD_ERR_OUTPUT_NODRIVERS
- 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.
- FMOD_ERR_PLUGIN
- An unspecified error has been returned from a plug-in.
- FMOD_ERR_PLUGIN_MISSING
- A requested output, dsp unit type or codec was not available.
- FMOD_ERR_PLUGIN_RESOURCE
- A resource that the plug-in requires (e.g.: The DLS file for MIDI playback) cannot be allocated or found.
- FMOD_ERR_PLUGIN_VERSION
- A plug-in was built with an unsupported SDK version.
- FMOD_ERR_RECORD
- An error occurred trying to initialize the recording device.
- FMOD_ERR_REVERB_CHANNELGROUP
- Reverb properties cannot be set on this Channel because a parent ChannelGroup owns the reverb connection.
- FMOD_ERR_REVERB_INSTANCE
- 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.
- FMOD_ERR_SUBSOUNDS
- 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.
- FMOD_ERR_SUBSOUND_ALLOCATED
- 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.
- FMOD_ERR_SUBSOUND_CANTMOVE
- Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file.
- FMOD_ERR_TAGNOTFOUND
- The specified tag could not be found or there are no tags.
- FMOD_ERR_TOOMANYCHANNELS
- The Sound created exceeds the allowable input speaker channel count. This result occurs only when a signal's speaker channel format requires more than 32 channels.
- FMOD_ERR_TRUNCATED
- The retrieved string is too long to fit in the supplied buffer and has been truncated.
- FMOD_ERR_UNIMPLEMENTED
- Something in FMOD hasn't been implemented when it should be. Contact support.
- FMOD_ERR_UNINITIALIZED
- This command failed because System::init or System::setDriver was not called.
- FMOD_ERR_UNSUPPORTED
- A command issued was not supported by this object. Possibly a plug-in without certain callbacks specified.
- FMOD_ERR_VERSION
- The version number of this file format is not supported.
- FMOD_ERR_EVENT_ALREADY_LOADED
- The specified bank has already been loaded.
- FMOD_ERR_EVENT_LIVEUPDATE_BUSY
- The live update connection failed due to the game already being connected.
- FMOD_ERR_EVENT_LIVEUPDATE_MISMATCH
- The live update connection failed due to the game data being out of sync with the tool.
- FMOD_ERR_EVENT_LIVEUPDATE_TIMEOUT
- The live update connection timed out.
- FMOD_ERR_EVENT_NOTFOUND
- The requested event, parameter, bus or vca could not be found.
- FMOD_ERR_STUDIO_UNINITIALIZED
- The Studio::System object is not yet initialized.
- FMOD_ERR_STUDIO_NOT_LOADED
- The specified resource is not loaded, so it can't be unloaded.
- FMOD_ERR_INVALID_STRING
- An invalid string was passed to this function.
- FMOD_ERR_ALREADY_LOCKED
- The specified resource is already locked.
- FMOD_ERR_NOT_LOCKED
- The specified resource is not locked, so it can't be unlocked.
- FMOD_ERR_RECORD_DISCONNECTED
- The specified recording driver has been disconnected.
- FMOD_ERR_TOOMANYSAMPLES
- The length provided exceeds the allowable limit.
Assigns an enumeration for a speaker index.
typedef enum FMOD_SPEAKER {
FMOD_SPEAKER_NONE = -1,
FMOD_SPEAKER_FRONT_LEFT,
FMOD_SPEAKER_FRONT_RIGHT,
FMOD_SPEAKER_FRONT_CENTER,
FMOD_SPEAKER_LOW_FREQUENCY,
FMOD_SPEAKER_SURROUND_LEFT,
FMOD_SPEAKER_SURROUND_RIGHT,
FMOD_SPEAKER_BACK_LEFT,
FMOD_SPEAKER_BACK_RIGHT,
FMOD_SPEAKER_TOP_FRONT_LEFT,
FMOD_SPEAKER_TOP_FRONT_RIGHT,
FMOD_SPEAKER_TOP_BACK_LEFT,
FMOD_SPEAKER_TOP_BACK_RIGHT,
FMOD_SPEAKER_MAX
} FMOD_SPEAKER;
enum SPEAKER : int
{
NONE = -1,
FRONT_LEFT,
FRONT_RIGHT,
FRONT_CENTER,
LOW_FREQUENCY,
SURROUND_LEFT,
SURROUND_RIGHT,
BACK_LEFT,
BACK_RIGHT,
TOP_FRONT_LEFT,
TOP_FRONT_RIGHT,
TOP_BACK_LEFT,
TOP_BACK_RIGHT,
MAX,
}
SPEAKER_NONE = -1
SPEAKER_FRONT_LEFT
SPEAKER_FRONT_RIGHT
SPEAKER_FRONT_CENTER
SPEAKER_LOW_FREQUENCY
SPEAKER_SURROUND_LEFT
SPEAKER_SURROUND_RIGHT
SPEAKER_BACK_LEFT
SPEAKER_BACK_RIGHT
SPEAKER_TOP_FRONT_LEFT
SPEAKER_TOP_FRONT_RIGHT
SPEAKER_TOP_BACK_LEFT
SPEAKER_TOP_BACK_RIGHT
SPEAKER_MAX
- FMOD_SPEAKER_NONE
- No speaker
- FMOD_SPEAKER_FRONT_LEFT
- The front left speaker
- FMOD_SPEAKER_FRONT_RIGHT
- The front right speaker
- FMOD_SPEAKER_FRONT_CENTER
- The front center speaker
- FMOD_SPEAKER_LOW_FREQUENCY
- The LFE or 'subwoofer' speaker
- FMOD_SPEAKER_SURROUND_LEFT
- The surround left (usually to the side) speaker
- FMOD_SPEAKER_SURROUND_RIGHT
- The surround right (usually to the side) speaker
- FMOD_SPEAKER_BACK_LEFT
- The back left speaker
- FMOD_SPEAKER_BACK_RIGHT
- The back right speaker
- FMOD_SPEAKER_TOP_FRONT_LEFT
- The top front left speaker
- FMOD_SPEAKER_TOP_FRONT_RIGHT
- The top front right speaker
- FMOD_SPEAKER_TOP_BACK_LEFT
- The top back left speaker
- FMOD_SPEAKER_TOP_BACK_RIGHT
- The top back right speaker
- FMOD_SPEAKER_MAX
- Maximum number of speaker types supported.
See Also: System::setSpeakerPosition, System::getSpeakerPosition
Speaker mode types.
typedef enum FMOD_SPEAKERMODE {
FMOD_SPEAKERMODE_DEFAULT,
FMOD_SPEAKERMODE_RAW,
FMOD_SPEAKERMODE_MONO,
FMOD_SPEAKERMODE_STEREO,
FMOD_SPEAKERMODE_QUAD,
FMOD_SPEAKERMODE_SURROUND,
FMOD_SPEAKERMODE_5POINT1,
FMOD_SPEAKERMODE_7POINT1,
FMOD_SPEAKERMODE_7POINT1POINT4,
FMOD_SPEAKERMODE_MAX
} FMOD_SPEAKERMODE;
enum SPEAKERMODE : int
{
DEFAULT,
RAW,
MONO,
STEREO,
QUAD,
SURROUND,
_5POINT1,
_7POINT1,
_7POINT1POINT4,
MAX,
}
SPEAKERMODE_DEFAULT
SPEAKERMODE_RAW
SPEAKERMODE_MONO
SPEAKERMODE_STEREO
SPEAKERMODE_QUAD
SPEAKERMODE_SURROUND
SPEAKERMODE_5POINT1
SPEAKERMODE_7POINT1
SPEAKERMODE_7POINT1POINT4
SPEAKERMODE_MAX
- FMOD_SPEAKERMODE_DEFAULT
- Default speaker mode for the chosen output mode which will resolve after System::init.
- FMOD_SPEAKERMODE_RAW
- Assume there is no special mapping from a given channel to a speaker, channels map 1:1 in order. Use System::setSoftwareFormat to specify the speaker count.
- FMOD_SPEAKERMODE_MONO
- 1 speaker setup (monaural).
- FMOD_SPEAKERMODE_STEREO
- 2 speaker setup (stereo) front left, front right.
- FMOD_SPEAKERMODE_QUAD
- 4 speaker setup (4.0) front left, front right, surround left, surround right.
- FMOD_SPEAKERMODE_SURROUND
- 5 speaker setup (5.0) front left, front right, center, surround left, surround right.
- FMOD_SPEAKERMODE_5POINT1
- 6 speaker setup (5.1) front left, front right, center, low frequency, surround left, surround right.
- FMOD_SPEAKERMODE_7POINT1
- 8 speaker setup (7.1) front left, front right, center, low frequency, surround left, surround right, back left, back right.
- FMOD_SPEAKERMODE_7POINT1POINT4
- 12 speaker setup (7.1.4) front left, front right, center, low frequency, surround left, surround right, back left, back right, top front left, top front right, top back left, top back right.
- FMOD_SPEAKERMODE_MAX
- Maximum number of speaker modes supported.
Note below the phrase 'sound channels' is used. These are the subchannels inside a sound, they are not related and have nothing to do with the FMOD class "Channel".
For example a mono sound has 1 sound channel, a stereo sound has 2 sound channels, and an AC3 or 6 channel wav file have 6 "sound channels".
FMOD_SPEAKERMODE_RAW
This mode is for output devices that are not specifically mono/stereo/quad/surround/5.1 or 7.1, but are multi-channel.
FMOD_SPEAKERMODE_MONO
This mode is for a 1 speaker arrangement.
- Panning does not work in this speaker mode.
- Mono, stereo and multi-channel sounds have each sound channel played on the one speaker at unity.
- Mix behavior for multi-channel sounds can be set with ChannelControl::setMixMatrix.
FMOD_SPEAKERMODE_STEREO
This mode is for 2 speaker arrangements that have a left and right speaker.
- Mono sounds default to an even distribution between left and right. They can be panned with ChannelControl::setPan.
- Stereo sounds default to the middle, or full left in the left speaker and full right in the right speaker. They can be cross faded with ChannelControl::setPan.
- Multi-channel sounds have each sound channel played on each speaker at unity.
- Mix behavior for multi-channel sounds can be set with ChannelControl::setMixMatrix.
FMOD_SPEAKERMODE_QUAD
This mode is for 4 speaker arrangements that have a front left, front right, surround left and a surround right speaker.
- Mono sounds default to an even distribution between front left and front right. They can be panned with ChannelControl::setPan.
- Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right. They can be cross faded with ChannelControl::setPan.
- Multi-channel sounds default to all of their sound channels being played on each speaker in order of input.
- Mix behavior for multi-channel sounds can be set with ChannelControl::setMixMatrix.
FMOD_SPEAKERMODE_SURROUND
This mode is for 5 speaker arrangements that have a left/right/center/surround left/surround right.
- Mono sounds default to the center speaker. They can be panned with ChannelControl::setPan.
- Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right. They can be cross faded with ChannelControl::setPan.
- Multi-channel sounds default to all of their sound channels being played on each speaker in order of input.
- Mix behavior for multi-channel sounds can be set with ChannelControl::setMixMatrix.
FMOD_SPEAKERMODE_5POINT1
This mode is for 5.1 speaker arrangements that have a left/right/center/surround left/surround right and a subwoofer speaker.
- Mono sounds default to the center speaker. They can be panned with ChannelControl::setPan.
- Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right. They can be cross faded with ChannelControl::setPan.
- Multi-channel sounds default to all of their sound channels being played on each speaker in order of input.
- Mix behavior for multi-channel sounds can be set with ChannelControl::setMixMatrix.
FMOD_SPEAKERMODE_7POINT1
This mode is for 7.1 speaker arrangements that have a left/right/center/surround left/surround right/rear left/rear right and a subwoofer speaker.
- Mono sounds default to the center speaker. They can be panned with ChannelControl::setPan.
- Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right. They can be cross faded with ChannelControl::setPan.
- Multi-channel sounds default to all of their sound channels being played on each speaker in order of input.
- Mix behavior for multi-channel sounds can be set with ChannelControl::setMixMatrix.
See the FMOD Studio Mixing Guide for graphical depictions of each speaker mode.
See Also: System::getSoftwareFormat, DSP::setChannelFormat
Named marker for a given point in time.
typedef struct FMOD_SYNCPOINT FMOD_SYNCPOINT;
Not supported for JavaScript.
This is an opaque type that you fetch with Sound::getSyncPoint then query with Sound::getSyncPointInfo.
See Also: Sound::addSyncPoint, Sound::deleteSyncPoint
Bitfield for specifying the CPU core a given thread runs on.
#define FMOD_THREAD_AFFINITY_GROUP_DEFAULT 0x4000000000000000
#define FMOD_THREAD_AFFINITY_GROUP_A 0x4000000000000001
#define FMOD_THREAD_AFFINITY_GROUP_B 0x4000000000000002
#define FMOD_THREAD_AFFINITY_GROUP_C 0x4000000000000003
#define FMOD_THREAD_AFFINITY_MIXER FMOD_THREAD_AFFINITY_GROUP_A
#define FMOD_THREAD_AFFINITY_FEEDER FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_STREAM FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_FILE FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_NONBLOCKING FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_RECORD FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_GEOMETRY FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_PROFILER FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_STUDIO_UPDATE FMOD_THREAD_AFFINITY_GROUP_B
#define FMOD_THREAD_AFFINITY_STUDIO_LOAD_BANK FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_STUDIO_LOAD_SAMPLE FMOD_THREAD_AFFINITY_GROUP_C
#define FMOD_THREAD_AFFINITY_CORE_ALL 0
#define FMOD_THREAD_AFFINITY_CORE_0 (1 << 0)
#define FMOD_THREAD_AFFINITY_CORE_1 (1 << 1)
#define FMOD_THREAD_AFFINITY_CORE_2 (1 << 2)
#define FMOD_THREAD_AFFINITY_CORE_3 (1 << 3)
#define FMOD_THREAD_AFFINITY_CORE_4 (1 << 4)
#define FMOD_THREAD_AFFINITY_CORE_5 (1 << 5)
#define FMOD_THREAD_AFFINITY_CORE_6 (1 << 6)
#define FMOD_THREAD_AFFINITY_CORE_7 (1 << 7)
#define FMOD_THREAD_AFFINITY_CORE_8 (1 << 8)
#define FMOD_THREAD_AFFINITY_CORE_9 (1 << 9)
#define FMOD_THREAD_AFFINITY_CORE_10 (1 << 10)
#define FMOD_THREAD_AFFINITY_CORE_11 (1 << 11)
#define FMOD_THREAD_AFFINITY_CORE_12 (1 << 12)
#define FMOD_THREAD_AFFINITY_CORE_13 (1 << 13)
#define FMOD_THREAD_AFFINITY_CORE_14 (1 << 14)
#define FMOD_THREAD_AFFINITY_CORE_15 (1 << 15)
[Flags]
enum THREAD_AFFINITY : long
{
GROUP_DEFAULT = 0x4000000000000000,
GROUP_A = 0x4000000000000001,
GROUP_B = 0x4000000000000002,
GROUP_C = 0x4000000000000003,
MIXER = GROUP_A,
FEEDER = GROUP_C,
STREAM = GROUP_C,
FILE = GROUP_C,
NONBLOCKING = GROUP_C,
RECORD = GROUP_C,
GEOMETRY = GROUP_C,
PROFILER = GROUP_C,
STUDIO_UPDATE = GROUP_B,
STUDIO_LOAD_BANK = GROUP_C,
STUDIO_LOAD_SAMPLE = GROUP_C,
CORE_ALL = 0,
CORE_0 = 1 << 0,
CORE_1 = 1 << 1,
CORE_2 = 1 << 2,
CORE_3 = 1 << 3,
CORE_4 = 1 << 4,
CORE_5 = 1 << 5,
CORE_6 = 1 << 6,
CORE_7 = 1 << 7,
CORE_8 = 1 << 8,
CORE_9 = 1 << 9,
CORE_10 = 1 << 10,
CORE_11 = 1 << 11,
CORE_12 = 1 << 12,
CORE_13 = 1 << 13,
CORE_14 = 1 << 14,
CORE_15 = 1 << 15
}
Not supported for JavaScript.
- FMOD_THREAD_AFFINITY_GROUP_DEFAULT
- For a given thread use the default listed below, i.e. FMOD_THREAD_TYPE_MIXER uses FMOD_THREAD_AFFINITY_MIXER.
- FMOD_THREAD_AFFINITY_GROUP_A
- Grouping A is recommended to isolate the mixer thread FMOD_THREAD_TYPE_MIXER.
- FMOD_THREAD_AFFINITY_GROUP_B
- Grouping B is recommended to isolate the Studio update thread FMOD_THREAD_TYPE_STUDIO_UPDATE.
- FMOD_THREAD_AFFINITY_GROUP_C
- Grouping C is recommended for all remaining threads.
- FMOD_THREAD_AFFINITY_MIXER
- Default affinity for FMOD_THREAD_TYPE_MIXER.
- FMOD_THREAD_AFFINITY_FEEDER
- Default affinity for FMOD_THREAD_TYPE_FEEDER.
- FMOD_THREAD_AFFINITY_STREAM
- Default affinity for FMOD_THREAD_TYPE_STREAM.
- FMOD_THREAD_AFFINITY_FILE
- Default affinity for FMOD_THREAD_TYPE_FILE.
- FMOD_THREAD_AFFINITY_NONBLOCKING
- Default affinity for FMOD_THREAD_TYPE_NONBLOCKING.
- FMOD_THREAD_AFFINITY_RECORD
- Default affinity for FMOD_THREAD_TYPE_RECORD.
- FMOD_THREAD_AFFINITY_GEOMETRY
- Default affinity for FMOD_THREAD_TYPE_GEOMETRY.
- FMOD_THREAD_AFFINITY_PROFILER
- Default affinity for FMOD_THREAD_TYPE_PROFILER.
- FMOD_THREAD_AFFINITY_STUDIO_UPDATE
- Default affinity for FMOD_THREAD_TYPE_STUDIO_UPDATE.
- FMOD_THREAD_AFFINITY_STUDIO_LOAD_BANK
- Default affinity for FMOD_THREAD_TYPE_STUDIO_LOAD_BANK.
- FMOD_THREAD_AFFINITY_STUDIO_LOAD_SAMPLE
- Default affinity for FMOD_THREAD_TYPE_STUDIO_LOAD_SAMPLE.
- FMOD_THREAD_AFFINITY_CONVOLUTION1
- Default affinity for FMOD_THREAD_TYPE_CONVOLUTION1.
- FMOD_THREAD_AFFINITY_CONVOLUTION2
- Default affinity for FMOD_THREAD_TYPE_CONVOLUTION2.
- FMOD_THREAD_AFFINITY_CORE_ALL
- Assign to all cores.
- FMOD_THREAD_AFFINITY_CORE_0
- Assign to core 0.
- FMOD_THREAD_AFFINITY_CORE_1
- Assign to core 1.
- FMOD_THREAD_AFFINITY_CORE_2
- Assign to core 2.
- FMOD_THREAD_AFFINITY_CORE_3
- Assign to core 3.
- FMOD_THREAD_AFFINITY_CORE_4
- Assign to core 4.
- FMOD_THREAD_AFFINITY_CORE_5
- Assign to core 5.
- FMOD_THREAD_AFFINITY_CORE_6
- Assign to core 6.
- FMOD_THREAD_AFFINITY_CORE_7
- Assign to core 7.
- FMOD_THREAD_AFFINITY_CORE_8
- Assign to core 8.
- FMOD_THREAD_AFFINITY_CORE_9
- Assign to core 9.
- FMOD_THREAD_AFFINITY_CORE_10
- Assign to core 10.
- FMOD_THREAD_AFFINITY_CORE_11
- Assign to core 11.
- FMOD_THREAD_AFFINITY_CORE_12
- Assign to core 12.
- FMOD_THREAD_AFFINITY_CORE_13
- Assign to core 13.
- FMOD_THREAD_AFFINITY_CORE_14
- Assign to core 14.
- FMOD_THREAD_AFFINITY_CORE_15
- Assign to core 15.
The platform agnostic thread groups, A, B and C give recommendations about FMOD threads that should be separated from one another.
Platforms with fixed CPU core counts will try to honor this request, those that don't will leave affinity to the operating system.
See the FMOD platform specific docs for each platform to see how the groups map to cores.
If an explicit core affinity is given, i.e. FMOD_THREAD_AFFINITY_CORE_11 and that core is unavailable a fatal error will be produced.
Explicit core assignment up to (1 << 61) is supported for platforms with that many cores.
See Also: Thread_SetAttributes
Scheduling priority to assign a given thread to.
#define FMOD_THREAD_PRIORITY_PLATFORM_MIN (-32 * 1024)
#define FMOD_THREAD_PRIORITY_PLATFORM_MAX ( 32 * 1024)
#define FMOD_THREAD_PRIORITY_DEFAULT (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 1)
#define FMOD_THREAD_PRIORITY_LOW (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 2)
#define FMOD_THREAD_PRIORITY_MEDIUM (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 3)
#define FMOD_THREAD_PRIORITY_HIGH (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 4)
#define FMOD_THREAD_PRIORITY_VERY_HIGH (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 5)
#define FMOD_THREAD_PRIORITY_EXTREME (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 6)
#define FMOD_THREAD_PRIORITY_CRITICAL (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 7)
#define FMOD_THREAD_PRIORITY_MIXER FMOD_THREAD_PRIORITY_EXTREME
#define FMOD_THREAD_PRIORITY_FEEDER FMOD_THREAD_PRIORITY_CRITICAL
#define FMOD_THREAD_PRIORITY_STREAM FMOD_THREAD_PRIORITY_VERY_HIGH
#define FMOD_THREAD_PRIORITY_FILE FMOD_THREAD_PRIORITY_HIGH
#define FMOD_THREAD_PRIORITY_NONBLOCKING FMOD_THREAD_PRIORITY_HIGH
#define FMOD_THREAD_PRIORITY_RECORD FMOD_THREAD_PRIORITY_HIGH
#define FMOD_THREAD_PRIORITY_GEOMETRY FMOD_THREAD_PRIORITY_LOW
#define FMOD_THREAD_PRIORITY_PROFILER FMOD_THREAD_PRIORITY_MEDIUM
#define FMOD_THREAD_PRIORITY_STUDIO_UPDATE FMOD_THREAD_PRIORITY_MEDIUM
#define FMOD_THREAD_PRIORITY_STUDIO_LOAD_BANK FMOD_THREAD_PRIORITY_MEDIUM
#define FMOD_THREAD_PRIORITY_STUDIO_LOAD_SAMPLE FMOD_THREAD_PRIORITY_MEDIUM
enum THREAD_PRIORITY : int
{
PLATFORM_MIN = -32 * 1024,
PLATFORM_MAX = 32 * 1024,
DEFAULT = PLATFORM_MIN - 1,
LOW = PLATFORM_MIN - 2,
MEDIUM = PLATFORM_MIN - 3,
HIGH = PLATFORM_MIN - 4,
VERY_HIGH = PLATFORM_MIN - 5,
EXTREME = PLATFORM_MIN - 6,
CRITICAL = PLATFORM_MIN - 7,
MIXER = EXTREME,
FEEDER = CRITICAL,
STREAM = VERY_HIGH,
FILE = HIGH,
NONBLOCKING = HIGH,
RECORD = HIGH,
GEOMETRY = LOW,
PROFILER = MEDIUM,
STUDIO_UPDATE = MEDIUM,
STUDIO_LOAD_BANK = MEDIUM,
STUDIO_LOAD_SAMPLE = MEDIUM
}
Not supported for JavaScript.
- FMOD_THREAD_PRIORITY_PLATFORM_MIN
- Lower bound of platform specific priority range.
- FMOD_THREAD_PRIORITY_PLATFORM_MAX
- Upper bound of platform specific priority range.
- FMOD_THREAD_PRIORITY_DEFAULT
- For a given thread use the default listed below, i.e. FMOD_THREAD_TYPE_MIXER uses FMOD_THREAD_PRIORITY_MIXER.
- FMOD_THREAD_PRIORITY_LOW
- Low platform agnostic priority.
- FMOD_THREAD_PRIORITY_MEDIUM
- Medium platform agnostic priority.
- FMOD_THREAD_PRIORITY_HIGH
- High platform agnostic priority.
- FMOD_THREAD_PRIORITY_VERY_HIGH
- Very high platform agnostic priority.
- FMOD_THREAD_PRIORITY_EXTREME
- Extreme platform agnostic priority.
- FMOD_THREAD_PRIORITY_CRITICAL
- Critical platform agnostic priority.
- FMOD_THREAD_PRIORITY_MIXER
- Default priority for FMOD_THREAD_TYPE_MIXER.
- FMOD_THREAD_PRIORITY_FEEDER
- Default priority for FMOD_THREAD_TYPE_FEEDER.
- FMOD_THREAD_PRIORITY_STREAM
- Default priority for FMOD_THREAD_TYPE_STREAM.
- FMOD_THREAD_PRIORITY_FILE
- Default priority for FMOD_THREAD_TYPE_FILE.
- FMOD_THREAD_PRIORITY_NONBLOCKING
- Default priority for FMOD_THREAD_TYPE_NONBLOCKING.
- FMOD_THREAD_PRIORITY_RECORD
- Default priority for FMOD_THREAD_TYPE_RECORD.
- FMOD_THREAD_PRIORITY_GEOMETRY
- Default priority for FMOD_THREAD_TYPE_GEOMETRY.
- FMOD_THREAD_PRIORITY_PROFILER
- Default priority for FMOD_THREAD_TYPE_PROFILER.
- FMOD_THREAD_PRIORITY_STUDIO_UPDATE
- Default priority for FMOD_THREAD_TYPE_STUDIO_UPDATE.
- FMOD_THREAD_PRIORITY_STUDIO_LOAD_BANK
- Default priority for FMOD_THREAD_TYPE_STUDIO_LOAD_BANK.
- FMOD_THREAD_PRIORITY_STUDIO_LOAD_SAMPLE
- Default priority for FMOD_THREAD_TYPE_STUDIO_LOAD_SAMPLE.
- FMOD_THREAD_PRIORITY_CONVOLUTION1
- Default priority for FMOD_THREAD_TYPE_CONVOLUTION1.
- FMOD_THREAD_PRIORITY_CONVOLUTION2
- Default priority for FMOD_THREAD_TYPE_CONVOLUTION2.
The platform agnostic priorities are used to rank FMOD threads against one another for best runtime scheduling.
Platforms will translate these values in to platform specific priorities.
See the FMOD platform specific docs for each platform to see how the agnostic priorities map to specific values.
Explicit platform specific priorities can be given within the range of FMOD_THREAD_PRIORITY_PLATFORM_MIN to FMOD_THREAD_PRIORITY_PLATFORM_MAX.
See platform documentation for details on the available priority values for a given operating system.
See Also: Thread_SetAttributes
Specify the affinity, priority and stack size for all FMOD created threads.
FMOD_RESULT Thread_SetAttributes(
FMOD_THREAD_TYPE type,
FMOD_THREAD_AFFINITY affinity = FMOD_THREAD_AFFINITY_GROUP_DEFAULT,
FMOD_THREAD_PRIORITY priority = FMOD_THREAD_PRIORITY_DEFAULT,
FMOD_THREAD_STACK_SIZE stacksize = FMOD_THREAD_STACK_SIZE_DEFAULT
);
FMOD_RESULT FMOD_Thread_SetAttributes(
FMOD_THREAD_TYPE type,
FMOD_THREAD_AFFINITY affinity,
FMOD_THREAD_PRIORITY priority,
FMOD_THREAD_STACK_SIZE stacksize
);
static RESULT Thread.SetAttributes(
THREAD_TYPE type,
THREAD_AFFINITY affinity = THREAD_AFFINITY.GROUP_DEFAULT,
THREAD_PRIORITY priority = THREAD_PRIORITY.DEFAULT,
THREAD_STACK_SIZE stacksize = THREAD_STACK_SIZE.DEFAULT
);
Not supported for JavaScript.
- type
- Identifier for an FMOD thread. (FMOD_THREAD_TYPE)
- affinity Opt
- Bitfield of desired CPU cores to assign the given thread to. (FMOD_THREAD_AFFINITY)
- priority Opt
- Scheduling priority to assign the given thread to. (FMOD_THREAD_PRIORITY)
- stacksize Opt
- Amount of stack space available to the given thread. (FMOD_THREAD_STACK_SIZE)
You must call this function for the chosen thread before that thread is created for the settings to take effect.
Affinity can be specified using one (or more) of the FMOD_THREAD_AFFINITY constants or by providing the bits explicitly, i.e. (1<<3) for logical core three (core affinity is zero based).
See platform documentation for details on the available cores for a given device.
Priority can be specified using one of the FMOD_THREAD_PRIORITY constants or by providing the value explicitly, i.e. (-2) for the lowest thread priority on Windows.
See platform documentation for details on the available priority values for a given operating system.
Stack size can be specified explicitly, however for each thread you should provide a size equal to or larger than the expected default or risk causing a stack overflow at runtime.
Stack space available to the given thread.
#define FMOD_THREAD_STACK_SIZE_DEFAULT 0
#define FMOD_THREAD_STACK_SIZE_MIXER (80 * 1024)
#define FMOD_THREAD_STACK_SIZE_FEEDER (16 * 1024)
#define FMOD_THREAD_STACK_SIZE_STREAM (96 * 1024)
#define FMOD_THREAD_STACK_SIZE_FILE (64 * 1024)
#define FMOD_THREAD_STACK_SIZE_NONBLOCKING (112 * 1024)
#define FMOD_THREAD_STACK_SIZE_RECORD (16 * 1024)
#define FMOD_THREAD_STACK_SIZE_GEOMETRY (48 * 1024)
#define FMOD_THREAD_STACK_SIZE_PROFILER (128 * 1024)
#define FMOD_THREAD_STACK_SIZE_STUDIO_UPDATE (96 * 1024)
#define FMOD_THREAD_STACK_SIZE_STUDIO_LOAD_BANK (96 * 1024)
#define FMOD_THREAD_STACK_SIZE_STUDIO_LOAD_SAMPLE (96 * 1024)
enum THREAD_STACK_SIZE : uint
{
DEFAULT = 0,
MIXER = 80 * 1024,
FEEDER = 16 * 1024,
STREAM = 96 * 1024,
FILE = 64 * 1024,
NONBLOCKING = 112 * 1024,
RECORD = 16 * 1024,
GEOMETRY = 48 * 1024,
PROFILER = 128 * 1024,
STUDIO_UPDATE = 96 * 1024,
STUDIO_LOAD_BANK = 96 * 1024,
STUDIO_LOAD_SAMPLE = 96 * 1024
}
Not supported for JavaScript.
- FMOD_THREAD_STACK_SIZE_DEFAULT
- For a given thread use the default listed below, i.e. FMOD_THREAD_TYPE_MIXER uses FMOD_THREAD_STACK_SIZE_MIXER.
- FMOD_THREAD_STACK_SIZE_MIXER
- Default stack size for FMOD_THREAD_TYPE_MIXER.
- FMOD_THREAD_STACK_SIZE_FEEDER
- Default stack size for FMOD_THREAD_TYPE_FEEDER.
- FMOD_THREAD_STACK_SIZE_STREAM
- Default stack size for FMOD_THREAD_TYPE_STREAM.
- FMOD_THREAD_STACK_SIZE_FILE
- Default stack size for FMOD_THREAD_TYPE_FILE.
- FMOD_THREAD_STACK_SIZE_NONBLOCKING
- Default stack size for FMOD_THREAD_TYPE_NONBLOCKING.
- FMOD_THREAD_STACK_SIZE_RECORD
- Default stack size for FMOD_THREAD_TYPE_RECORD.
- FMOD_THREAD_STACK_SIZE_GEOMETRY
- Default stack size for FMOD_THREAD_TYPE_GEOMETRY.
- FMOD_THREAD_STACK_SIZE_PROFILER
- Default stack size for FMOD_THREAD_TYPE_PROFILER.
- FMOD_THREAD_STACK_SIZE_STUDIO_UPDATE
- Default stack size for FMOD_THREAD_TYPE_STUDIO_UPDATE.
- FMOD_THREAD_STACK_SIZE_STUDIO_LOAD_BANK
- Default stack size for FMOD_THREAD_TYPE_STUDIO_LOAD_BANK.
- FMOD_THREAD_STACK_SIZE_STUDIO_LOAD_SAMPLE
- Default stack size for FMOD_THREAD_TYPE_STUDIO_LOAD_SAMPLE.
- FMOD_THREAD_STACK_SIZE_CONVOLUTION1
- Default stack size for FMOD_THREAD_TYPE_CONVOLUTION1.
- FMOD_THREAD_STACK_SIZE_CONVOLUTION2
- Default stack size for FMOD_THREAD_TYPE_CONVOLUTION2.
Stack size can be specified explicitly, however for each thread you should provide a size equal to or larger than the expected default or risk causing a stack overflow at runtime.
See Also: Thread_SetAttributes
Named constants for threads created at runtime.
typedef enum FMOD_THREAD_TYPE {
FMOD_THREAD_TYPE_MIXER,
FMOD_THREAD_TYPE_FEEDER,
FMOD_THREAD_TYPE_STREAM,
FMOD_THREAD_TYPE_FILE,
FMOD_THREAD_TYPE_NONBLOCKING,
FMOD_THREAD_TYPE_RECORD,
FMOD_THREAD_TYPE_GEOMETRY,
FMOD_THREAD_TYPE_PROFILER,
FMOD_THREAD_TYPE_STUDIO_UPDATE,
FMOD_THREAD_TYPE_STUDIO_LOAD_BANK,
FMOD_THREAD_TYPE_STUDIO_LOAD_SAMPLE,
FMOD_THREAD_TYPE_CONVOLUTION1,
FMOD_THREAD_TYPE_CONVOLUTION2,
FMOD_THREAD_TYPE_MAX
} FMOD_THREAD_TYPE;
enum THREAD_TYPE : int
{
MIXER,
FEEDER,
STREAM,
FILE,
NONBLOCKING,
RECORD,
GEOMETRY,
PROFILER,
STUDIO_UPDATE,
STUDIO_LOAD_BANK,
STUDIO_LOAD_SAMPLE,
CONVOLUTION1,
CONVOLUTION2,
MAX
}
Not supported for JavaScript.
- FMOD_THREAD_TYPE_MIXER
- Thread responsible for mixing and processing blocks of audio.
- FMOD_THREAD_TYPE_FEEDER
- Thread used by some output plug-ins for transferring buffered audio from FMOD_THREAD_TYPE_MIXER to the sound output device.
- FMOD_THREAD_TYPE_STREAM
- Thread that decodes compressed audio to PCM for Sounds created as FMOD_CREATESTREAM.
- FMOD_THREAD_TYPE_FILE
- Thread that reads compressed audio from disk to be consumed by FMOD_THREAD_TYPE_STREAM.
- FMOD_THREAD_TYPE_NONBLOCKING
- Thread that processes the creation of Sounds asynchronously when opened with FMOD_NONBLOCKING.
- FMOD_THREAD_TYPE_RECORD
- Thread used by some output plug-ins for transferring audio from a microphone to FMOD_THREAD_TYPE_MIXER.
- FMOD_THREAD_TYPE_GEOMETRY
- Thread used by the Geometry system for performing background calculations.
- FMOD_THREAD_TYPE_PROFILER
- Thread for network communication when using FMOD_INIT_PROFILE_ENABLE.
- FMOD_THREAD_TYPE_STUDIO_UPDATE
- Thread for processing Studio API commands and scheduling sound playback.
- FMOD_THREAD_TYPE_STUDIO_LOAD_BANK
- Thread for asynchronously loading Studio::Bank metadata.
- FMOD_THREAD_TYPE_STUDIO_LOAD_SAMPLE
- Thread for asynchronously loading Studio::Bank sample data.
- FMOD_THREAD_TYPE_CONVOLUTION1
- Thread for processing medium size delay lines for FMOD_DSP_TYPE_CONVOLUTIONREVERB.
- FMOD_THREAD_TYPE_CONVOLUTION2
- Thread for processing larger size delay lines for FMOD_DSP_TYPE_CONVOLUTIONREVERB.
- FMOD_THREAD_TYPE_MAX
- Maximum number of thread types supported.
See Also: Thread_SetAttributes
Time types used for position or length.
#define FMOD_TIMEUNIT_MS 0x00000001
#define FMOD_TIMEUNIT_PCM 0x00000002
#define FMOD_TIMEUNIT_PCMBYTES 0x00000004
#define FMOD_TIMEUNIT_RAWBYTES 0x00000008
#define FMOD_TIMEUNIT_PCMFRACTION 0x00000010
#define FMOD_TIMEUNIT_MODORDER 0x00000100
#define FMOD_TIMEUNIT_MODROW 0x00000200
#define FMOD_TIMEUNIT_MODPATTERN 0x00000400
[Flags]
enum TIMEUNIT : uint
{
MS = 0x00000001,
PCM = 0x00000002,
PCMBYTES = 0x00000004,
RAWBYTES = 0x00000008,
PCMFRACTION = 0x00000010,
MODORDER = 0x00000100,
MODROW = 0x00000200,
MODPATTERN = 0x00000400,
}
TIMEUNIT_MS = 0x00000001
TIMEUNIT_PCM = 0x00000002
TIMEUNIT_PCMBYTES = 0x00000004
TIMEUNIT_RAWBYTES = 0x00000008
TIMEUNIT_PCMFRACTION = 0x00000010
TIMEUNIT_MODORDER = 0x00000100
TIMEUNIT_MODROW = 0x00000200
TIMEUNIT_MODPATTERN = 0x00000400
- FMOD_TIMEUNIT_MS
- Milliseconds.
- FMOD_TIMEUNIT_PCM
- PCM samples, related to milliseconds * samplerate / 1000.
- FMOD_TIMEUNIT_PCMBYTES
- Bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes).
- FMOD_TIMEUNIT_RAWBYTES
- Raw file bytes of (compressed) sound data (does not include headers). Only used by Sound::getLength and Channel::getPosition.
- FMOD_TIMEUNIT_PCMFRACTION
- Fractions of 1 PCM sample. Unsigned int range 0 to 0xFFFFFFFF. Used for sub-sample granularity for DSP purposes.
- FMOD_TIMEUNIT_MODORDER
- MOD/S3M/XM/IT. Order in a sequenced module format. Use Sound::getFormat to determine the PCM format being decoded to.
- FMOD_TIMEUNIT_MODROW
- MOD/S3M/XM/IT. Current row in a sequenced module format. Cannot use with Channel::setPosition. Sound::getLength will return the number of rows in the currently playing or seeked to pattern.
- FMOD_TIMEUNIT_MODPATTERN
- MOD/S3M/XM/IT. Current pattern in a sequenced module format. Cannot use with Channel::setPosition. Sound::getLength will return the number of patterns in the song and Channel::getPosition will return the currently playing pattern.
See Also: Sound::getLength, Channel::setPosition, Channel::getPosition
Structure describing a point in 3D space.
typedef struct FMOD_VECTOR {
float x;
float y;
float z;
} FMOD_VECTOR;
struct VECTOR
{
float x;
float y;
float z;
}
FMOD_VECTOR
{
x,
y,
z,
};
- x
- X coordinate in 3D space.
- y
- Y coordinate in 3D space.
- z
- Z coordinate in 3D space.
FMOD uses a left handed coordinate system by default.
To use a right handed coordinate system specify FMOD_INIT_3D_RIGHTHANDED from FMOD_INITFLAGS in System::init.
See Also: System::set3DListenerAttributes, ChannelControl::set3DAttributes
Current FMOD version number.
class VERSION
{
const int number = ...;
}
Not supported for JavaScript.
- FMOD_VERSION
- Current FMOD version number.
The version is a 32 bit hexadecimal value formatted as 16:8:8, with the upper 16 bits being the product version, the middle 8 bits being the major version and the bottom 8 bits being the minor version. For example a value of 0x00010203 is equal to 1.02.03.
See Also: Studio::System::create, System::getVersion