FMOD UE4 Integration ( PDFDrive )
FMOD UE4 Integration ( PDFDrive )
Introduction
FMOD Studio is an audio content creation tool for games, with a focus on a Pro
Audio approach. It has an entirely new interface that will be more familiar to
those using professional Digital Audio Workstations than existing game audio
tools and is loaded with powerful features.
The integration is a code plugin that is available from the FMOD download
page.
We provide the plug-in already compiled for Win64 and Mac. For other
platforms, you can compile the plug-in by regenerating the project file and
building in Visual Studio or XCode.
What's New
The What's New In 1.08 page highlights the new features of FMOD Studio.
Getting Started
The Getting Started page will help you get up and running.
General information
The UE4 Integration page has general information about the integration,
including platform coverage and licensing.
Support
Find out more information at our Questions and Answers database, or contact us
directly at [email protected].
Firelight Technologies FMOD Studio API
FMOD Low Level API - An Overview
Table of Contents
What the Low Level API is
API Features
File formats - Support for the most optimal format for games (FSB)
Streaming
Internet streaming
Streaming settings
Decompressed samples
Standard Reverb
Convolution Reverb
Performance
It is standalone and does not require any sound designer tools to interface with.
The features are all implemented by the programmer in code.
API Features
This section will give a broad overview of FMOD Low Level API features.
FMOD Low Level API has an automatic configuration feature, which makes it
simple to start.
At the most basic level, creating the System object and calling System::init on it.
This is all that is needed. A more detailed description of initialization can be
found in the FMOD Low Level API Getting Started Tutorial.
The sound card can be manually selected, using the System::setDriver function.
More settings can be configured, such as the mixing rate of the FMOD system,
the resampling method, or the speaker mode with System::setSoftwareFormat.
When modifying the mixer settings, this only adjusts the internal mixing format.
At the end, the audio stream is always converted to the settings that are set by
the user (ie the settings in the control panel in Windows, or the standard
7.1/48khz output mode on Xbox One or PS4).
FMOD Low Level API has automatic sound card detection and recovery during
playback. If a new device is inserted after initialization, FMOD will seamlessly
jump to it, assuming it is the higher priority device. An example of this would be
a USB headset being plugged in.
If the device that is being played on is removed (such as a USB audio device), it
will automatically jump to the device considered next most important (ie on
Windows, it would be the new 'default' device).
If a device is inserted, then removed, it will jump to the device it was originally
playing on.
The programmer can override the sound card detection behavior, with a custom
callback. This is the
FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED callback.
FMOD Low Level API has support for user created output plugins. A developer
can create a plugin to take FMOD audio output to a custom target. This could be
a hardware device, or a non standard file/memory/network based system.
An output mode can run in real-time, or non real-time which allows the
developer to run FMOD's mixer/streamer/system at faster or slower than real-
time rates.
FMOD Low Level API has native/built in code to support many file formats out
of the box. WAV, MP3 and Ogg Vorbis are supported by default, but many more
obscure formats like AIFF, FLAC and others. Sequenced formats that are played
back in realtime with a real time sequencer, are included.
MIDI/MOD/S3M/XM/IT are examples of these.
File formats - Support for the most optimal format for games
(FSB)
FMOD also supports an optimal format for games, called FSB (FMOD Sound
Bank).
Many sound file formats are not well suited to games. They are not efficient, and
can lead to lots of random file access, large memory overhead, and slow load
times.
'Memory point' feature. An FSB can be loaded into memory by the user,
and simply 'pointed to' so that FMOD uses the memory where it is, and
does not allocate extra memory. See FMOD_OPENMEMORY_POINT.
Low memory overhead. A lot of file formats contain 'fluff' such as tags, and
metadata. FSB stores information in compressed, bit packed formats for
efficiency.
Efficient Ogg Vorbis. FSB strips out the 'Ogg' and keeps the 'Vorbis'. 1
codebook can be shared between all sounds, saving megabytes of memory
(compared to loading .ogg files individually).
FMOD Low Level API has support for user created file format plugins. A
developer can create callbacks for FMOD to call when System::createSound or
System::createStream is executed by the user, or when the decoding engine is
asking for data.
The simplest way to get started, and basic functionality of FMOD Low Level
API - is to initialize the FMOD system, load a sound, and play it. That's it!
Refer to the Getting Started tutorial on how to initialize and load/play a sound
with the FMOD Low Level API.
Look at the play sound example to refer to sample code for the simple playback
of a sound file.
FMOD Low Level API benefits from over 15 years of use, in millions of end
user devices, causing the evolution of a highly stable and low latency
mixing/streaming engine.
Streaming
Streaming is the ability to take a large file, and read/play it in realtime in small
chunks at a time, avoiding the need to load the entire file into memory. This is
typically reserved for
Music
Internet streaming
Streaming settings
For shorter sounds, rather than decompressing the sound into memory, the user
may wish to play the sound in memory, as is.
This is more efficient than a stream, as it does not require disk access, or extra
threads to read or decode. A stream has a limit of 1 sound at a time, but a
compressed sample does not. It can be played multiple times simultaneously.
Decompressed samples
PCM data is just raw uncompressed sound data, for more information go to the
Terminology / Basic Concepts tutorial.
Decompressed PCM data uses a lot more memory than Vorbis encoded FSB for
example. It could be up to 10x more.
A typical use case for mobile developers: Compress the sound heavily for
distribution (to reduce the download size), then decompress it at start-up/load
time, to save CPU time, rather than playing it compressed.
FMOD Low Level includes a 'virtual voice system'. It allows the developer to
play hundreds or even thousands of sounds at once, but only have a small
number actually producing sound. The remainder are 'virtual' or emulated with a
simple position update, and are not heard, and don't consume CPU time.
As an example: a dungeon may have 200 torches burning on the wall in various
places but only the loudest torches will be really audible. FMOD will
dynamically make voices 'virtual' or 'real' depending on real time audibility
calculations (based on distance/volume/priority/occlusion).
A sound which is playing far away, or with a low volume will become virtual,
and will change to a real voice when it comes closer, or becomes louder due to
Channel or ChannelGroup API calls.
Read more about the virtual voice system on the Virtual Voice tutorial.
Grouping voices so that they can have a single effect on them, can be achieved
with what is typically called a 'bus' or a 'submix'. In FMOD Low Level, channels
are grouped into 'Channel Groups', which are the same as a bus or submix.
The volume of a ChannelGroup can be altered, which allows for master volume
groups. The volume is scaled based on a fader DSP inside a ChannelGroup. All
Channels and Channel Groups have a fader DSP by default.
'Master Volume', 'SFX Volume' and 'Music Volume' are typical settings in a
game. Setting up an 'SFX' ChannelGroup, and a 'Music' ChannelGroup, and
having them children of the master channel group (see
System::getMasterChannelGroup)
FMOD Low Level API has support for a variety of features that allow sounds to
be placed in 3D space, so that they move around the listener as part of an
environment, by panning, pitch shifting with doppler, and attenuating with
volume scaling or even special filtering.
3. Vector Based Amplitude Panning (VBAP). This system pans the sounds in
the user's speakers in real time, supporting mono, stereo, up to 5.1 and 7.1
surround speaker setups.
5. 3D Reverb Zones for reverb panning. See more about this in the 3D Reverb
section. Reverb can also be occluded to not go through walls or objects.
9. Stereo and multichannel sounds can be 3D. Typically a mono sound is used
for 3D audio. Multi-channel sounds can be used to give extra impact. By
default a multichannel sound is collapsed into a mono point source. To
'spread' the channels of the multichannel sound, use Channel::set3DSpread
or ChannelGroup::set3DSpread. This can give a more a more spatial effect
for a sound that is coming from a certain direction. A subtle spread of sound
in the distance may gives the impression of being more effectively
spatialized as if it were reflecting off nearby surfaces, or being 'big' and
emitting different parts of the sound in different directions.
10. Spatialization plugin support. 3rd party VR audio plugins can be used to
give more realistic panning over headphones.
To load a sound as 3D simply add the FMOD_3D flag to the
System::createSound function, or the System::createStream function.
1. Set the 'listener' position, orientation and velocity once per frame with
System::set3DListenerAttributes.
2. Set the Channel 3D attributes for handle that was returned from
System::playSound, with Channel::set3DAttributes. If 3D positioning of a
group of channels, or a ChannelGroup is required, set the ChannelGroup to
be 3D once with ChannelGroup::setMode, then call
ChannelGroup::set3DAttributes instead.
Read more about 3D sound in the 3D Sound tutorial or the Spatial Audio
tutorial.
FMOD Low Level API supports the supply of polygon mesh data, that can be
processed in realtime to create the effect of occlusion in a real 3D world. In real
world terms, the user can stop sounds travelling through walls, or even confine
reverb inside a geometric volume so that it doesn't leak out into other areas.
This sound can then be played back after it has been recorded, or the raw data
can be retrieved with Sound::lock and Sound::unlock functions.
The sound can also be played while it is recording, to allow realtime effects. A
simple technique to achieve this is to start recording, then wait a small amount of
time, like 50ms, then play the sound. This will keep the play cursor just behind
the record cursor. See the record example for source and information on how to
do this.
FMOD Low Level API has native/built in code to support many special effects
out of the box, such as low-pass, compressor, reverb and parametric EQ. A more
comprehensive list can be found in the FMOD_DSP_TYPE list.
FMOD Low Level API has 2 types of physical reverb available, and a virtual 3d
reverb system which can be used to simulate hundreds of environments or more,
with only 1 physical reverb.
Standard Reverb
A built in, high quality I3DL2 standard compliant reverb, which is used for a
fast, configurable environment simulation, and is used for the 3D reverb zone
system, described below.
Each channel can have a different reverb wet mix by setting the level in
Channel::setReverbProperties.
Read more about the I3DL2 configuration in the Reverb Notes section of the
documentation. To avoid confusion when starting out, simply play with the pre-
set list of environments in FMOD_REVERB_PRESETS.
Convolution Reverb
There is also an even higher quality Convolution Reverb which allows a user to
import an impulse response file (a recording of a impulse in an environment
which is used to convolve the signal playing at the time), and have the
environment sound like it is in the space the impulse was recorded in.
A Virtual 3D reverb zone system is supported, using the main built-in system
I3DL2 reverb.
Virtual '3D reverb spheres' can be created and placed around a 3D world, in
unlimited numbers, causing no extra CPU expense.
As the listener travels through these spheres, FMOD will automatically morph
and attenuate the levels of the system reverb to make it sound like you are in
different environments as you move around the world.
Spheres can be overlapped and based on where the listener is within each
spheres. FMOD will morph the reverb to the appropriate mix of environments.
A 3D reverb sphere can be created with System::createReverb3D and the
position set with Reverb3D::set3DAttributes. To set a sphere's reverb properties,
Reverb3D::setProperties can be used.
FMOD Low Level API has support for user created DSP plugins. A developer
can either load a pre-existing plugin, or create one inside the application, using
'callbacks'.
To create a stand alone dynamic library, use the same callbacks, but export the
symbols through a the FMOD_DSP_DESCRIPTION struct, via the exported
FMODGetDSPDescription function.
See the DSP Plugin API tutorial on how to make a plugin, and
/examples/fmod_gain.cpp in the API distribution as a working example.
FMOD Low Level API runs on a modular synth architecture, which allows
connections of signal processing nodes (the 'FMOD DSP' concept. See the
FMOD DSP Class to be joined together to create deeper more complicated audio
signals and flow.
A directed graph processing tree allows the signal to flow from 'generators' (a
sound playing through from System::playSound, or a DSP creating sound from
System::playDSP for example), to other nodes, mixing together until they reach
the head node, where the final result is sent to the sound card.
A visual representation taken directly from the FMOD Profiler tool (in the /bin
directory of the API distribution).
FMOD typically processes the sound in the graph, in blocks of 512 samples
(10ms) on some platforms, or 1024 on other platforms (21ms). This is the
granularity of the system, and affects how smooth parameter changes, such as
pitch or volume will heard.
FMOD pre-built DSP effects can be inserted into the graph with functions like
DSP::addInput and DSP::disconnectFrom.
For detailed information read the DSP Architecture and Usage tutorial.
FMOD Low Level API commands are thread safe and queued. They get
processed either immediately, or in background threads, depending on the
command.
By default, things like initialization, and loading a sound are processed on the
main thread.
Mixing, streaming, geometry processing, file reading and file loading are or can
be done in the background, in background threads. Every effort is made to avoid
blocking the main application's loop unexpectedly.
One of the slowest operations is loading a sound. To place a sound load into the
background so that it doesn't affect processing in the main application thread, the
user can use the FMOD_NONBLOCKING flag in System::createSound or
System::createStream.
For detailed information about FMOD and threads please refer to the Threads
and Thread Safety tutorial.
Performance
The FMOD Low Level API has evolved over the years to have a comprehensive
suite of effects and codecs with minimal overhead for memory and CPU.
All platforms come with performance saving features. For example vector
optimized floating point math is used heavily. Some of the technologies used
include SSE, NEON, AVX, VMX, and VFP assembler.
The FMOD API will allow configuration of how many sounds should be audible
at once, to reduce CPU overhead. This is configurable as mentioned in the
Compressed sample playback section of this document, using the
System::setAdvancedSettings function.
Adjusting the sample rate quality, resampling quality, number of mixed voices
and decoded voices is configurable to get the best scalability for your
application.
To find out more about configuring FMOD to save CPU time, refer to the CPU
Performance tutorial, or to get an idea about Low Level performance figures on
various platforms, refer to the Performance Reference section of the
documentation.
Configuration - memory and file systems
The FMOD Low Level API caters to the needs of applications and their memory
and file systems. A file system can be 'plugged in' so that FMOD uses it, and not
its own system, as well as memory allocation.
The file system handles the normal cases of open, read, seek, close, but adds an
extra feature which is useful for prioritized/delayed file systems, FMOD
supports the FMOD_FILE_ASYNCREAD_CALLBACK callback, for deferred,
prioritized loading and reading, which is a common feature in advanced game
streaming engines.
An async read callback can immediately return without supplying data, then
when the application supplies data at a later time, even in a different thread, it
can set the 'done' flag in the FMOD_ASYNCREADINFO structure to get
FMOD to consume it. Consideration has to be made to not wait too long or
increase stream buffer sizes, so that streams don't audibly stutter/skip.
To facilitate getting signal into the height speakers FMOD can play 12 channel
audio (7.1.4) as a source or upmix with the help of FMOD_DSP_TYPE_PAN
and the new FMOD_DSP_PAN_2D_HEIGHT_BLEND parameter.
For more detail about using spatial audio features with FMOD please refer to the
dedicated Spatial Audio page.
Firelight Technologies FMOD Studio API
Previous Releases
What's New In 1.08
What's New In 1.07
What's New In 1.06
What's New In 1.05
What's New In 1.04
What's New In 1.03
What's New In 1.02
What's New In 1.01
Firelight Technologies FMOD Studio API
What's New in 1.09
This section describes the major features introduced in the 1.09 release. See the
Detailed Revision History for information regarding each patch release.
Multiple listener weighting
Studio's multiple listener support has been improved with the ability to set a
weighting per listener with Studio::System::setListenerWeight. The weight
allows listeners to be smoothly faded in or out of existence.
Listener weight is used in the 3D panner, the doppler calculation, and the
automatic distance event parameter.
It allows the sound designer to set up automations on parameters which the game
can query and drive other game side systems, as well as getting volume of buses
after snapshots are applied. For existing codebases, the second argument defaults
to NULL which is unchanged behaviour.
Studio::EventInstance::getVolume
Studio::EventInstance::getPitch
Studio::EventInstance::getParameterValue
Studio::EventInstance::getParameterValueByIndex
Studio::Bus::getVolume
Studio::VCA::getVolume
As part of this change, the older function names have been renamed for
consistency:
This new effect will supercede existing lowpass, highpass, lowpass simple,
highpass simple and parametric eq effects. It has better performance and a
superset of functionality compared with the now deprecated effects and thus
should be considered as a replacement. For more information on how to use the
new effect as a replacement see FMOD_DSP_TYPE remarks.
What's new since 1.08 initial release
This section covers some of the improvements introduced between the first 1.08
release and the new 1.09 release. See the Detailed Revision History for more
information on features introduced during the 1.08 lifetime.
Sound Play / Stop callbacks
You can now set a callback to be fired when the Studio runtime plays or stops an
events. With the callback is the low level FMOD::Sound through which you can
query the name of the sound played
Listener mask
Events can be set up to only be influenced by some of the listeners.
Studio::EventInstance::setListenerMask can be used to specify a mask for what
listeners apply to that event.
Studio sample data loading occurs on its own thread. Affinity can be controlled
via per platform affinity settings.
Sample Data Idle Pool
To avoid spurious sample data reloading, Studio will keep a pool of recently
used sounds in memory. This can help for cases where programmer doesn't
manually preload data via Studio::EventDescription::loadSampleData or
Studio::Bank::loadSampleData. See the Studio Bank Programmer Topic for
more information.
Studio Profiler file I/O display
The FMOD Studio Profiler now displays the file I/O used for sample data,
stream data, and bank metadata loading. The event instance lifetime view has
indicators for when event instances are stalling waiting for sample data to load
in.
3D Object Panner
The new 3D object panner DSP (FMOD_DSP_TYPE_OBJECTPAN) allows
channels to be spatialized using Dolby Atmos
(FMOD_OUTPUTTYPE_ATMOS) and Playstation VR
(FMOD_OUTPUTTYPE_AUDIO3D) technology.
Applications include sending the output of a global reverb back out in to the
world to be spacialized, playing in-game radio both inside the cabin and also
through loudspeakers placed outside, and many more.
Firelight Technologies FMOD Studio API
What's New in 1.07
This section describes the major features introduced in the 1.07 release. See the
Detailed Revision History for information regarding each patch release.
64-bit version of Studio
Studio is now a 64-bit application, providing greater memory capacity and
improved performance. On Windows, separate 32-bit and 64-bit versions are
available. On Mac, Studio is now 64-bit only.
All plugin libraries must be built for 64-bit architecture in order to be compatible
with the 64-bit version of Studio.
Nested events have been converted to reference events
The concept of nested events and referenced events has been unified to just
having reference events. As part of this change, Studio::Bank::getEventCount
and Studio::Bank::getEventList now only return top level events that have been
explicitly added to banks by the sound designer. They do not include any
reference events that have been included in the bank implicitly via event
instrument references.
Bus Polyphony
This setting allows the designer to set a limit on the number of event instances
that route through a bus.
Improved recording and enumeration support
When using System::getRecordNumDrivers and System::getRecordDriverInfo
you can now be sure that a particular list index will always be valid. As devices
are added the list will grow over time, if a device is removed it will remain in the
list. You can now query FMOD_DRIVER_STATE to determine
FMOD_DRIVER_STATE_CONNECTED.
See the Detailed Revision History for more information on features introduced
during the 1.06 lifetime.
Firelight Technologies FMOD Studio API
What's New in 1.06
This section describes the major features introduced in the 1.06 release. See the
Detailed Revision History for information regarding each patch release.
Bank Loading Changes
Studio now does all file loading on a separate loading thread. This avoids any
hitches in scheduling that may occur when loading large banks. The interface is
unchanged since the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag
already exists.
The load_banks example has been updated to demonstrate all the methods of
loading banks.
API Capture and Replay
API command capture functionality has been improved. API commands are now
captured when recording a profiling session in Studio, allowing sound designers
to create API command captures without the need for programmer support.
API captures now write out the initial state of the playback system including
currently loaded banks as well as the state of all created event instances. This
allows API captures to be taken mid-game without missing any information.
This change also means that event callbacks will continue to be fired after
Studio::EventInstance::release is called until the instance is actually destroyed.
This can be prevented by setting the callback to NULL before calling
Studio::EventInstance::release.
Event Stop Behavior Change
Events with sounds triggered by parameters will now stop once all sounds have
finished and the timeline cursor has reached the end. Previously these events
would go idle instead of stopping. The old behavior can be achieved by adding a
sustain point to the timeline.
Deprecated Function Removed
Studio::EventInstance::createSubEvent has been removed. Use Event Sounds
instead.
Wide String API
All FMOD functions dealing with file names and paths now accept UTF-8
encoded strings. All arguments that take or return UTF-16 encoded strings have
been removed, as have flags that indicate an UTF-16 string has been passed.
UTF-8 encoded strings can be used to access file paths containing non-ASCII
characters on Windows, PS3, PS4, PS Vita, XBox One, iOS, Android, Mac,
Linux, Windows Phone, and Windows Store.
Added AAC Support for Android
It is now possible to load AAC files on Android 4.2 or newer devices. This can
make use of any hardware accelerated decoding provided by the platform.
Improved Logging Output
For greater control of the logging version of FMOD, i.e. fmodL / fmodstudioL
you can now use FMOD::Debug_Initialize to specify both logging level and
destination. By default all output will go to the TTY / stderr / logcat / platform
specific debug location. Using this new API you can also send output to file or
callback for integration into custom logging systems.
DSP Reset Callback Behavior Clarified
The FMOD_DSP_RESET_CALLBACK documentation has been updated to
make it clear that it should leave public parameters unchanged.
Firelight Technologies FMOD Studio API
What's New in 1.04
This section describes the major features introduced in the 1.04 release. See the
Detailed Revision History for information regarding each patch release.
Studio Profiling
FMOD Studio now supports profiling. Profiling sends event, parameter, and bus
information across the network to FMOD Studio, allowing the profiling session
to be visualised and replayed. Profiling is supported automatically when the
FMOD_STUDIO_INIT_LIVEUPDATE flag is used.
Note that the existing low level profiler is still supported, and can be used for in-
depth analysis of the DSP graph when using the Studio API or the Low Level
API. The low level profiler is provided in the Windows or Mac Programmer's
API package as the "FMOD Profiler" executable. The low level profiler is
supported automatically when either the FMOD_STUDIO_INIT_LIVEUPDATE
or the low level FMOD_INIT_PROFILE_ENABLE flag is used.
Audio Tables
FMOD Studio now supports adding audio tables to banks. These are designed to
hold large numbers of sounds for use cases like localized VO. Each entry in the
table is identified by a key string, and the mapping from key to sound can be
changed by loading a different audio table.
Studio::EventInstance::getLoadingState - use
Studio::EventDescription::getSampleLoadingState instead
Studio.Factory.System_Create (C# only) - use Studio.System.create instead
Studio.System.init (C# only) - use Studio.System.initialize instead
PS3 Support
FMOD Studio now officially supports PS3.
WiiU Support
FMOD Studio now officially supports WiiU.
Linux Support
FMOD Studio now officially supports Linux.
Windows Phone 8.1 Support
FMOD Studio now officially supports Windows Phone 8.1.
Firelight Technologies FMOD Studio API
What's New in 1.03
This section describes the major features introduced in the 1.03 release. See the
Detailed Revision History for information regarding each patch release.
Threading Changes
FMOD Studio has support for multi-threading in both low-level and Studio API.
The Studio API supports issuing commands from any number of threads, and by
default now does all execution in its own thread. The Low Level API now
supports thread safety by default. FMOD Studio and Low Level threading and
thread safety can be disabled with new initialization flags. See the Threads and
Thread Safety section for more information.
Handle and Studio API Changes
As part of the threading changes, the Studio API handle system has been
changed. The Studio C++ API now matches the Low level C++ API which has a
pointer-based system. This means existing code will have to change from
directly using Studio types to retrieving and calling API with a pointer style. The
underlying handle system has been rewritten to be thread-safe and more
efficient. This change also means that the C API now properly deals with invalid
handles safely, and that the C API and C++ API types are equivalent and can be
cast between each other. See the Handle System for more information.
Recording and Playback
All Studio API calls can be recorded to a file and played back at a later time.
This is intended for debug functionality. See
Studio::System::startRecordCommands, Studio::System::stopRecordCommands
and Studio::System::playbackCommands for more details.
Studio Enumeration Functions
FMOD Studio enumeration functions have been changed to a getCount/getList
style which is thread-safe and accessible by the C interface. More functions have
been added to enumerate banks, events, and mixer strips. See
Studio::System::getBankCount, Studio::System::getBankList,
Studio::Bank::getEventCount, Studio::Bank::getEventList,
Studio::Bank::getMixerStripCount, Studio::Bank::getMixerStripList,
Studio::EventDescription::getInstanceCount, and
Studio::EventDescription::getInstanceList.
Events in multiple banks
FMOD Studio now supports duplicate events in multiple banks. Studio resources
are reference counted and loading will skip the event data that has already been
loaded in an existing bank.
Error Callback
All Low Level API and Studio API errors can now be intercepted by registering
a user callback. The callback includes the function that generated the error, the
instance data, and the optional function parameter arguments. This is particularly
useful for Studio API commands which have been deferred to run on the Studio
asynchronous thread. See System::setCallback for more information.
PS Vita support
FMOD Studio now officially supports PS Vita.
Windows Store Applications support
FMOD Studio now officially supports Windows Store Applications for both x86
and ARM devices.
Additional Studio features
FMOD Studio now supports sounds placed on transition timelines, transition
marker probability, and loop region probability.
Documentation
The Studio API documentation has now improved and extended.
Firelight Technologies FMOD Studio API
What's New in 1.02
This section describes the major features introduced in the 1.02 release. See the
Detailed Revision History for information regarding each patch release.
Android Platform
FMOD Studio now officially supports the Android platform.
Unity Support
FMOD Studio has added support for the Unity game engine via a native plugin.
New Bank Loading API
The existing loadBank API has been renamed to Studio::System::loadBankFile,
and two extra versions have been added. Studio::System::loadBankMemory
allows loading from a memory location. Studio::System::loadBankCustom
supports loading banks with bank-specific callbacks to do the reading.
Memory and performance optimisations
This revision includes a number of memory and CPU optimisations to both low-
level and the Studio API.
Documentation
FMOD Studio now ships with documentation that covers the full API.
Firelight Technologies FMOD Studio API
What's New in 1.01
This section describes the major features introduced in the 1.01 release. See the
Detailed Revision History for information regarding each patch release.
Sends
Support has been added for Send DSP connections to send sound data to
different areas of the mix graph.
Fade Points
Support has been added for setting sample-accurate fade ramp points. The fade
points allow Studio to schedule sound volume gradients to occur in future mixes.
Studio API
A number of additional Studio API functions have been added. See the
revision.txt for more details.
Firelight Technologies FMOD Studio API
Detailed Revision History
07/12/17 1.10.03 - Studio API minor release
Features:
LowLevel API - Added ASIO support for drivers that use PCM32 as a
container for smaller sized data.
Profiler - Draw different DSP connection types with different line styles.
UE4 - Added option to specify memory pool size, per platform, in the
project FMOD Studio settings.
UE4 - Now complying with IWYU mode, this should increase compilation
speed.
Fixes:
Studio API - Fixed the DSP network sometimes getting into a bad state
when a sidechain is connected to the next effect in the chain.
Studio API - Fixed event playback sometimes using stale parameter values.
Studio API - Fixed events failing to stop if they contain empty Single
Instruments.
LowLevel API - Fixed potential crash in device list changed callback when
there are no available devices remaining.
LowLevel API - Fix 3D 5.1 sound not panning correctly if
Channel::set3DLevel(0) is used.
LowLevel API - Fixed ID3v2.4 compatibility issue causing missing or
corrupted tags.
LowLevel API - Android - Fixed incorrect floating point check on ARM64
devices causing FMOD_ERR_NEEDSHARDWARE with some devices.
LowLevel API - Xbox One - Fixed race condition causing internal errors
with XMA sounds loaded as FMOD_CREATECOMPRESSEDSAMPLE.
LowLevel API - PS4 - Fixed internal assertion caused by setPosition on an
AT9 sound loaded as FMOD_CREATECOMPRESSEDSAMPLE.
FSBank API - Fixed creation of C header so it goes next to the FSB instead
of the working directory of the application.
Unity - Fixed pause working properly in Play In Editor mode.
Unity - Removed excess memory allocation from APIs that return strings in
C#.
UE4 - Fixed velocity of FMODAudioComponents.
Notes:
Fixes:
Studio API - Fixed Quietest stealing behavior so new events don't start if
they are quieter than all currently playing events.
Studio API - Fixed buses that have reached their Max Instances limit
incorrectly preventing their input buses from applying their stealing
behavior.
Studio API - Fixed a crash caused by wav files with invalid loop points.
LowLevel API - Fixed recording devices still being marked as connected
when switching to FMOD_OUTPUTTYPE_NOSOUND.
LowLevel API - UWP - Made device reset / unplug behavior more robust
against failure.
LowLevel API - Xbox One - Fixed WASAPI init error if WinSonic was
attempted first.
FSBank API - Fixed crash in 64bit version when encoding low sample rate
mono sounds as Vorbis with low quality.
Unity - PlayOneshot and PlayOneshotAttached now log a warning when the
event is not found, rather than throwing an exception.
Notes:
Added Resonance Audio plugin version 1.0, this plugin represents the
continuation of the Google VR plugin under new branding. The Google VR
plugin is now considered deprecated in favour of Resonance Audio,
consider migrating to the new plugin as the GVR plugin will be removed in
FMOD 1.11.
Xbox One - Now built with June 2017 QFE 8 XDK.
01/11/17 1.10.01 - Studio API minor release (build
91339)
Features:
Fixes:
Notes:
Fixes:
Studio API - Sequential multi and scatterer instruments now track their
current playlist entry on a per-event-instance basis, rather than globally.
UE4 - Removed all reference to Oculus, now that Oculus functions as all
other FMOD Studio plugins.
UE4 - Removed all legacy UE4 version code, if you are not using UE4.16
the plugin will not work without making changes to source code.
UE4 - Overhauled details interaction in editor and improved usability.
Grouped all FMOD functionality together, added Parameters, and removed
unnecessary information from attenuation/occlusion.
Unity - Removed garbage allocations from C# wrapper.
Notes:
UE4 - Cache dsp used for occlusion lowpass effect & add support for use of
Multiband EQ (lowpass on band A only).
UE4 - FMODAudioComponent now reuses event instances until the object
is no longer needed or Release() is called.
UE4 - Added support for UWP.
Unity - Added support for Unity v2017.1.
Unity - Added a button in the FMOD menu for Refreshing Bank files.
Fixes:
Studio API - Reduced memory usage for events with a small number of
instances.
LowLevel API - FMOD_CREATESOUNDEXINFO::initialseekposition will
now wrap if the value given is longer than the FMOD::Sound length.
LowLevel API - Added documentation to the top of fmod_codec_raw to be
more instructional for plugin writers.
UE4 - Added support for UE4.17.
Unity - Device specific errors will now cause only a single exception to be
thrown and the integration will assume no-sound mode.
Switch - Now built with SDK 1.7.0.
Xbox One - Now built with March 2017 QFE 3 XDK.
06/07/17 1.09.06 - Studio API minor release (build
88495)
Features:
Fixes:
Notes:
Fixes:
Notes:
Notes:
Notes:
Fixes:
Studio API - Fixed event doppler settings not being applied to sounds
spawned by scatterer.
Studio API - Fixed bus and VCA handles not being set up properly in
Studio::Bank::getBusList and Studio::Bank::getVCAList.
Studio API - Fixed crashes caused by stopping events that are routed into a
bus with instance limiting enabled when they are in the
FMOD_STUDIO_PLAYBACK_STARTING state.
Studio API - Fixed tempo and marker event callbacks not being fired when
the timeline cursor is in the lead-in or lead-out region of a transition
timeline.
LowLevel API - Fixed glitches with Transceiver DSP after inputs go idle.
LowLevel API - Fix Channel::setPosition(pos,
FMOD_TIMEUNIT_MODORDER) not working when playing paused.
LowLevel API - Fixed short streams created as non-looping then switched
to looping via the Channel API not looping seamlessly.
LowLevel API - Fixed DSP plugin version >= 109 data parameters other
than 3D attributes not applying if FMOD_INIT_3D_RIGHTHANDED is
used.
LowLevel API - Fixed rare crash in FMOD Panner DSP. Introduced in
1.09.00.
LowLevel API - Re-Fix MOD/S3M/XM/IT file crash with samples that
have 0 length, for 1.09 only.
LowLevel API - Fixed potential memory leak if System::init returned an
error.
LowLevel API - Fix FMOD_ACCURATETIME not looping a mod file
properly, and not seeking correctly with
FMOD_TIMEUNIT_MODORDER.
LowLevel API - HTML5 - Loading FSB sounds did not work properly.
LowLevel API - Windows - Fixed 5.1->stereo SRS downmix causing lack of
bass.
LowLevel API - Windows - Fix
FMOD_INIT_PREFER_DOLBY_DOWNMIX not working.
FSBank API - Fix crash if
FSBANK_INIT_GENERATEPROGRESSITEMS is not used.
Unity - Removed error when plugin field is added but empty.
UE4 - Removed error when plugin field is added but empty.
Notes:
Fixes:
Unity - Fixed compatibility with Unity 4.6 & 4.7 for OSX and IOS.
Unity - Fixed "file not found" error when settings asset is corrupt
Unity - Fixed set3DAttributes ambiguity.
Unity - Fixed not being able to copy ReadOnly banks into StreamingAssets.
Unity - Fixed event instance leak in Unity PlayOneshotAttached not
releasing.
Unity - Specified version to check for WiiU BuildTarget for early Unity5.
UE4 - Fixed XboxOne delayload error now that UE4 handles it.
UE4 - Android - Added ARM64 support.
Studio API - AHDSR modulator curve shapes now work correctly. In
previous versions the envelope was interpolated linearly regardless of the
shape displayed in the UI.
Studio API - Fixed looping single sounds in an async multi sound being cut-
off when the multi sound is un-triggered.
LowLevel API - Fixed Channel::setReverbProperties not resetting reverb
connection to a new tail DSP when turning wet mix off and on.
LowLevel API - If the system is initialized in right-handed mode, FMOD
will now swap to left-handed when passing attributes into plugins. This
only applies to plugins rebuilt against this version, old plugins remain
unswapped.
LowLevel API - Fix MOD/S3M/XM/IT file crash with samples that have 0
length.
LowLevel API - Fixed some potential crashes when running out of memory,
these will correctly return FMOD_ERR_MEMORY now.
LowLevel API - Win - Fixed WASAPI recording device enumeration taking
a couple of seconds after System::init before being correct.
LowLevel API - Win - Fixed potential error returned from System::update if
device is unplugged.
LowLevel API - MIDI - Fixed Sound::set/getMusicChannelVolume referring
to wrong track indices rather than just a normal 0-15 track index.
LowLevel API - MIDI - Fixed Channel::setPosition causing loud drum bang
noise after seek
Notes:
Studio API - When loading legacy banks with looping sounds nested in
multi sounds, the multi sound is set to cut-off all sounds when untriggered,
including non-looping sounds. This is a change in behaviour compared to
earlier versions where only looping sounds were cut-off.
LowLevel API - DSP plugin API version has been increased, for maximum
compatibility plugin writers should only rebuild against this version if they
need the getlistenerattributes feature. Old plugins are still supported.
Switch - Now built with SDK 0.12.10
01/12/16 1.09.00 - Studio API major release (build
82164)
Important:
Features:
Studio API - Fixed incorrect playback volume for instruments and playlist
items whose volume property is set to a non-zero dB value.
Notes:
Fixes:
Notes:
FSBank API - FSBs / Banks may not be binary identical to previous release
due to FADPCM encoder bug fix, however full compatibility is maintained.
20/10/16 1.08.14 - Studio API minor release (build
80900)
Fixes:
UE4 - Fix for crash when using "Validate FMOD" menu item
Notes:
Studio API - Fixed potential crash after the following sequence of actions:
load master bank, try to load master bank again and fail with
FMOD_ERR_EVENT_ALREADY_LOADED, unload master bank, reload
master bank.
LowLevel API - Fix circular DSP connection causing hang in certain
situations.
Unity 2 - Fix issues with multi-object editing of emitters.
22/09/16 1.08.12 - Studio API minor release (build
80229)
Features:
Fixes:
Studio API - Fix auto pitch cutting off at zero for parameter with minimum
value that is less than zero.
Studio API - Fix events with a transciever effect not allowing the event to
stop
Android - Fixed crash when loading FSBs or Banks that contain a sound
that isn't mono, stereo, 5.1 or 7.1.
Android - Fixed compatibility issue with some devices introduced in
previous release due to r12b update. Presents as a runtime linker error when
loading the FMOD library, failing to locate __aeabi_atexit.
iOS - Fixed stuttering during fade out when device screen goes to sleep.
LowLevel API - Fix FMOD_DSP_TRANSCEIVER memory stomp.
LowLevel API - Fix channels playing at incorrect pitch. Introduced in
1.08.10.
Notes:
Fixes:
FSBank - Fix crash on 64-bit when encoding 16kHz or 24kHz sources using
Vorbis at low quality settings.
LowLevel API - Fix FMOD_SOUND_PCMSETPOS_CALLBACK getting
invalid position value when a sound opened with FMOD_OPENUSER
loops.
LowLevel API - Android - Fixed crash on load with old devices when using
armeabi.
Unity 2 - Fix CREATESOUNDEXINFO not getting marshalled properly.
Notes:
Fixes:
LowLevel API - Fixed error trying to create a Return DSP when the system
format is set to FMOD_SPEAKERMODE_RAW.
LowLevel API - Fixed FFT DSP crash if window size is smaller than DSP
block size.
LowLevel API - Removed spurious warning messages when loading plugins
on some platforms.
LowLevel API - Android - Tweaked OpenSL auto detection, now requires
device to specify low latency and a block size <= 1024.
Unity 2 - Fix bank import issues when the strings bank contains bank names
that differ in case from the files on disk.
Unity 2 - Bank import now has a longer timeout after last detected file
activity before starting import.
Unity 2 - Fixed settings screen allowing real channels to be set higher then
256.
Unity 2 - Fix up errors when StudioEventEmitter is created dynamically.
Unity 2 - Small fixes for the settings screen when overriding the parent
platform settings.
UE4 - Fix for crash when previewing animations using the FMOD event
notifier.
Notes:
LowLevel API - PS4 - Add support for social screen audio to the ports API.
Studio API - Added Studio::EventInstance:setListenerMask and
Studio::EventInstance::getListenerMask, that adds the ability to specify
which listeners apply to each event instance.
Unity 2 - Warning is now produced when playing in editor if the position of
a 3D event is not set.
UE4 - Added blueprint functions to set event properties.
Fixes:
Studio API - Fixed case of indeterminism when building banks that contain
events with automation curves.
LowLevel API - Fixed FMOD_OUTPUT_OBJECT3DINFO::gain so it only
includes distance attenuation not bus gain (which is now pre-applied to
FMOD_OUTPUT_OBJECT3DINFO::buffer.
LowLevel API - Fixed channelmix DSP volume not always being
initialized.
LowLevel API - WiiU - Fixed potential crash during System::init if
System::setDriver or System::setOutput has been called.
LowLevel API - Fix hang on netstreams when the connection times out.
LowLevel API - Linux - Fix FPU control word of the calling thread being
modified when the FMOD dynamic library is loaded.
LowLevel API - Android - Fixed potential crash if FMOD isn't loaded with
System.loadLibrary, now a proper error will be issued.
FSBank API - Fixed FADPCM not looping seamlessly for non-zero
crossing loops.
UE4 - Fixed plugin loading assuming a "lib" prefix for plugins on Android,
Mac, Linux and PS4. Now plugin loading will attempt to load the name
with and without adding a lib prefix.
UE4 - Respect FApp::IsUnattended for message-box errors.
UE4 - Fixed deprecation warnings about AttachTo usage.
Unity 2 - Fix errors when bank source files are updated while Event
Browser preview is playing or paused.
Unity 2 - Fix unnecessary copying of Bank files in OSX editor.
Notes:
Fixes:
Studio API - Fixed looping sounds in a multi sound playlist failing to stop if
the multi sound itself is non-looping.
Studio API - Fixed rare crash calling the following functions while the bank
containing the event is unloading: Studio::EventInstance::getDescription,
Studio::EventInstance::getParameter,
Studio::EventInstance::getParameterValue,
Studio::EventInstance::setParameterValue,
Studio::EventInstance::setParameterValueByIndex,
Studio::EventInstance::triggerCue,
Studio::ParameterInstance::getDescription and
Studio::ParameterInstance::setValue.
Studio API - Fixed shared events becoming invalidated when one of the
banks containing them is unloaded. Could also manifest as
Studio::EventInstance::getDescription failing with
FMOD_ERR_INTERNAL.
Studio API - Fixed crash that could occur when using
FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE and calling
Studio::System::update from multiple threads at the same time.
Studio API - Increased scheduling lookahead time to ensure sample
accurate timeline scheduling even if there is an output stall.
Studio API - Fixed crash that could occur when improperly calling
Studio::Bus::getChannelGroup without first calling
Studio::Bus::lockChannelGroup, if the bus was being destroyed as the call
was made.
Studio API - Fixed rare crash calling the following functions while the
master bank containing the bus or VCA is unloading:
Studio::System::getBus, Studio::System::getBusByID,
Studio::System::getVCA and Studio::System::getVCAByID.
Studio API - Fixed rare timing issue where Studio::System::getEvent would
succeed but Studio::EventDescription::createInstance would fail with
FMOD_ERR_INTERNAL, if called just as the bank containing the event
finished loading.
Studio API - Fixed rare hang in Studio::System::getBankCount when called
while banks are currently unloading.
LowLevel API - Fixed rare glitch at the start of XMA playback causing non-
seamless looping.
LowLevel API - Fixed rare hang on shutdown when using multiple systems.
LowLevel API - Fix streams with an unknown file length remaining in the
playing state after an end of file is encountered.
LowLevel API - Windows - Enumeration of record devices will now reflect
a change of default device with WASAPI output.
LowLevel API - Linux - Enumeration will now correctly display GUIDs and
speaker modes for ALSA output.
LowLevel API - Linux - Fixed potential crash if both PulseAudio and ALSA
are missing / unavailable.
Unity 2 - Fix plugin loading on Linux standalone builds.
Unity 2 - Fix script compilation errors in standalone builds.
Unity 2 - Fix Event Browser preview of events with built-in parameters.
Unity 2 - Fix missing tvOS files.
Notes:
Fixes:
Studio API - Fixed Studio command buffer assert and crash that could occur
when using FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE in
conjunction with multiple threads.
LowLevel API - Fix crash when closing a system with a multi-plugin DLL
still loaded.
LowLevel API - iOS / Android - Improved audio stability when mixer thread
is overloaded.
FSBank API - Fixed calling convention linker error on Windows in
FSBankLib header.
FSBank API - Fixed issue when passing duplicate source files with different
encoding settings would cause cache file conflicts.
Notes:
Unity 2 - Renamed "Level Start" and "Level End" triggers to "Object Start"
and "Object Destroy" to more accurately reflect when the triggers occur.
17/06/16 1.08.06 - Studio API minor release (build
76937)
Features:
Unity 2 - Added framework for registering native plugins on iOS and tvOS.
Unity 2 - Added support for importing Studio Banks as TextAssets so they
can be added to Unity AssetBundles.
Fixes:
Fixes:
Notes:
Fixes:
LowLevel API - Fixed unnecessary DSP queue flush when using ports.
LowLevel API - Fixed ADPCM and FADPCM compressed FSBs not
returning FMOD_ERR_MEMORY_CANTPOINT when loaded as
FMOD_OPENMEMORY_POINT FMOD_CREATESAMPLE.
LowLevel API - Fix pops when channels with a mix matrix that are started
virtual become real.
LowLevel API - Fixed DSP panner reset not clearing ramps, causing
ramping when setting initial parameters.
LowLevel API - Fixed Sound::getSyncPointInfo returning first sync point
info when loading sounds from FSBs with multiple sync points.
Studio API - Fixed memory stomp that can occur when sharing events
between multiple banks, if a streaming sound is in the middle of loading
when one of the shared banks is unloaded.
Unity 2 - Fix error messages when previewing an event contained in the
Master Bank.
Unity 2 - Fix WinPhone 8.1 DLL's conflicting with UWP builds.
Notes:
Fixes:
Studio API - Events that fail to start due to bus polyphony now invoke the
FMOD_STUDIO_EVENT_CALLBACK_START_FAILED callback.
Studio API - Fixed crash when calling Studio::System::unloadAll with
crossfading nested events.
Studio API - Fixed unnecessary up/down mix applied to 2D events that
have sidechain modulators.
Studio API - Fixed mixing issues and degraded performance if the system
speaker mode does not match the Studio project format.
Studio API - Fixed case of stereo sounds panning hard right when
downmixed to a mono track and later upmixed again, introduced in 1.07.04.
LowLevel API - Fixed potential incorrect position when voice comes back
from being virtual, which can cause a hang on XboxOne.
LowLevel API - Improved handling for out of memory errors when mixing
DSP buffers.
LowLevel API - Fixed incorrect propagation of
FMOD_DSP_STATE::channelmask when mixing signals with differing
masks.
LowLevel API - Fixed http streams (file from http, not shoutcast/icecast)
returning FMOD_ERR_FORMAT. Introduced 1.08.01
LowLevel API - Fixed m3u playlist file format support. Was returning
FMOD_ERR_FORMAT.
LowLevel API - Android - Improved detection of low-latency devices
allowing better automatic output mode selection and less stuttering.
LowLevel API - Sound::getName will now return "" for sounds without
names, instead of "(null)".
LowLevel API - Object 3D Panning fix for silent objects in certain speaker
modes
Studio API - More robust live update handshaking when attempting to
connect with multiple copies of FMOD Studio at once.
Unity 2 - Added missing Studio::EventDescription::getSoundSize function.
Notes:
Notes:
Fixes:
Studio API - Fixed errors being generated when the initial seek is past the
loop end point of a sound.
Studio API - Fixed error loading sample data for banks loaded by
Studio::System::loadBankMemory with
FMOD_STUDIO_LOAD_BANK_DECOMPRESS_SAMPLES flag.
Studio API - Fixed rare Studio update error FMOD_ERR_NOTREADY
when stopping modules with streaming sounds.
Studio API - Fixed unnecessary up/down mix on sidechain effects in game.
Studio API - Eliminated API stalls due to holding a lock when creating
event instances on the Studio Update thread.
Studio API - Fixed error when loading an API capture that contains
Studio::System::flushSampleLoading commands.
Studio API - PS4 - Fixed incorrect linking options on fmodstudio.prx that
caused package creation to fail.
LowLevel API - Fixed rare hang when rapidly creating and releasing Return
DSPs.
LowLevel API - Fixed hang or crash when loading a .it/s3m/mod/mid file as
a decompressed sound.
LowLevel API - Fixed some shoutcast streams playing back garbled.
LowLevel API - Fixed Sound::readData returning 0 for bytes read, instead
of a valid number if FMOD_ERR_FILE_EOF was returned. Introduced in
1.07.08.
LowLevel API - PS4 - Fix AT9 playback when a sound created as looping is
played with the channel loop-count explicitly set to zero before starting.
LowLevel API - Win - Fixed ASIO device enumeration not supplying a
GUID.
LowLevel API - Win - Fixed ASIO device enumeration having a blank name
if the device is not connected.
UE4 - Added lock around file accesses to avoid Unreal pak file thread
safety issue.
UE4 - Fixed logging callback not being initialized.
UE4 - Avoid asset table system from mixing while normal mixer is in
operation, to work around an AT9 mixer issue.
UE4 - Fixed always linking against ovrfmod even if it isn't present.
Unity 2 - Rewrote Timeline Callback and Programmer Sound Callback
examples to work on iOS.
Unity 2 - Fix marshalling of FMOD.CREATESOUNDEXINFO structure on
iOS.
Unity 2 - Fix DLL not found errors in standalone Windows builds.
Notes:
Studio API - Sample data loading has been optimised. Load time, file
access, and memory use have all been substantially improved. A new entry
has been added to the per platform thread affinity settings.
Studio API - FMOD_STUDIO_PARAMETER_DESCRIPTION now has
the parameter index and default value.
Studio API - Added Studio::System::flushSampleLoading.
Studio API - Support for left edge trimming of timelocked sounds.
Studio API - Support for Start Offset as a percentage of sound length.
Studio API - Added idle resource pool to keep recently used sounds in
memory in case they might be re-used. It can be controlled by the
idleResourcePoolSize field in FMOD_STUDIO_ADVANCEDSETTINGS.
See the Studio Banks Programmer Topic for more information.
LowLevel API - Increased performance of System::createSound and
System::createStream, since they no longer block against System::update.
LowLevel API - Added filebuffersize to FMOD_CREATESOUNDEXINFO
for customizable file buffering.
LowLevel API - Added System::getFileUsage to query file loading
information.
LowLevel API - Custom DSP effects now always receive a buffer length
that is equal to the mix block size. The input and output buffers will always
be 16-byte aligned. Custom DSP sounds still have be able to generate signal
less than a mix block.
LowLevel API - Added getclock callback to
FMOD_DSP_STATE_SYSTEMCALLBACKS to get the clock, offset and
length for a custom DSP.
LowLevel API - Added support for multiple plugins within one plugin file.
See FMOD_PLUGINLIST, System::getNumNestedPlugins,
System::getNestedPlugin, and the DSP Plugin API Programmer Topic for
more information.
LowLevel API - Added support for object based panning with two backend
providers, Dolby Atmos (FMOD_OUTPUTTYPE_ATMOS) and
Playstation VR (FMOD_OUTPUTTYPE_AUDIO3D).
LowLevel API - Added 3D object panner DSP
(FMOD_DSP_TYPE_OBJECTPAN) to be used with new object pan
enabled outputs.
LowLevel API - Extended output mode plugin API
(FMOD_OUTPUT_DESCRIPTION) to allow custom object panner
backends.
LowLevel API - Win - Reduced WASAPI latency by 40ms and improved
mixer thread regularity.
FSBank - AT9 Band Extension is now enabled by default for supported bit-
rates.
FSBank - Added Mac versions of the FSBank tool and FSBankLib API.
Included in the Mac and iOS API packages.
Profiler - Added Mac version of the Profiler tool. Included in the Mac and
iOS API packages.
Unity 2 - Added ability to create new studio events from within the Unity
editor.
Unity 2 - Improved event selection UI on emitter component and when
using EventRef attribute.
Unity 2 - Added support for default parameter values in emitter component.
Notes:
Fixes:
Notes:
Fixes:
Notes:
LowLevel API - Android - Lollipop devices may now select 7.1 with
AudioTrack output mode. Older devices will gracefully fall back to stereo.
Fixes:
LowLevel API - Fixed bug if streams start virtual, they may not come back
as audible. Introduced in 1.07.00
LowLevel API - Update URL in Netstream example.
LowLevel API - Fixed net streams not working when server delivers
shoutcast with chunked HTTP data.
LowLevel API - Fixed memory leak when a network connection fails.
LowLevel API - Android - Devices that don't support 5.1 output will now
gracefully fallback to stereo.
LowLevel API - WinStore / UWP - Fixed WASAPI output so it return the
correct 'no drivers' error when none are detected.
LowLevel API - WinStore / UWP - Fixed WASAPI output swapped sides
and rears in 7.1.
LowLevel API - Fix C# wrapper of ChannelGroup.addGroup missing
arguments.
LowLevel API - Fix crash when using chorus effect on a channel group with
channel count greater than the system channel count.
LowLevel API - PS4 - Fix validation of thread affinity settings.
LowLevel API - iOS - Fixed compatibility issue introduced in 1.07.02 for
old devices running iOS 6.X.
Unity 2 - Fixed UI when EventRef attribute is used on an array of strings.
Unity 2 - Work around DLL loading issues on some standalone Windows
builds.
Unity 2 - Fix DLL loading issues for play-in-editor when platform is iOS.
Unity 2 - Fix RuntimeManager being recreated during shutdown and
leaking FMOD native instances.
Unity 2 - Fix issue when using RuntimeManager.LowLevelSystem and
RuntimeManager.StudioSystem before RuntimeManager has initialized.
Unity 2 - Increase channels for Play-In-Editor.
Unity 2 - Fix play-in-editor not setting the speaker mode correctly.
Unity 2 - PS4 - Fix script compile errors.
Notes:
Unity 2 - When using the file browser in the settings editor to set the Studio
source paths the result will be set relative to the Unity project if it is a sub-
directory.
Unity 2 - Added Parameter Trigger component.
Fixes:
Notes:
Fixes:
Studio API - Fixed blocking bank loads stalling for longer than necessary
when other threads are constantly issuing new Studio commands.
LowLevel API - Fixed corrupted playback for big endian PCM FSBs.
LowLevel API - Fixed crash when switching channel count of generator
DSPs during playback.
LowLevel API - PS3 - Fix crash reallocating buffers on flange effect.
LowLevel API - Xbox One - Fixed rare stall when playing XMA streams
and compressed samples at the same time.
LowLevel API - Fix crash if the Master Channel Group head DSP was set
inactive right after initialization.
LowLevel API - Fix Sound::getOpenState() moving from
FMOD_OPENSTATE_PLAYING too early on some streaming sounds.
LowLevel API - Fix Sound::Release() freeing memory still in use by the
mixer.
LowLevel API - Fix convolution reverb not correctly producing tails on
long impulse responses when it has no input.
Unity 2 - Fixed issue with plugins not being loaded correctly.
Unity 2 - Work around DLL loading issues on some standalone Windows
builds.
Unity 2 - Fix leaking system objects leading to ERR_MEMORY.
Unity 2 - Updated signature of DSP::setWetDryMix, DSP::getWetDryMix.
Notes:
Fixes:
Studio API - Fixed snapshot applied to VCA level not working in game.
Studio API - Fixed profiler session timing when recording a game with a
non-standard sample rate.
Studio API - PS4 - Fix linker error in examples.
LowLevel API - Fixed buffer overrun when convolution reverb is set up
with mismatched input and output channels.
LowLevel API - Fix crash with invalid .mp3 files.
LowLevel API - Fix Sound::getName() not returning a valid UTF8 string
when loading a sound with ID3 tags specifying the title as a latin1 string.
LowLevel API - Fix pops in flange and chorus effects.
LowLevel API - Fix crash when using flange effect on a channel group with
channel count greater than the system channel count.
LowLevel API - FLAC - Fix crash when seeking in certain flac files.
LowLevel API - Android - Automatic selection of OpenSL output mode will
now be stricter to reduce stuttering on devices that incorrectly report they
are low latency.
LowLevel API - PS4 - Fix signal not being routed back to the main output
when detaching a channel group from a port.
LowLevel API - Fix FMOD_ADVANCEDSETTINGS::reverb3Dinstance
not working.
Notes:
Features:
Fixes:
Notes:
iOS - Now built with iOS SDK 9.1 and tvOS SDK 9.0 (Xcode 7.1).
Mac - Now built with SDK 10.11 (Xcode 7.1).
27/10/15 1.07.01 - Studio API patch release (build
69235)
Features:
Fixes:
Studio API - Fixed auto-pitch, cutoff and looping not live updating properly.
LowLevel API - Fixed potential crash on ARM platforms when seeking
Vorbis compressed FSBs.
LowLevel API - Fix ChannelGroup::setReverbProperties from returning
FMOD_ERR_REVERB_CHANNELGROUP if a child channel had a
reverb connection previously.
LowLevel API - Fixed
FMOD_CREATESOUNDEXINFO::suggestedsoundtype being ignored if a
custom codec of higher priority has been registered.
LowLevel API - Fixed System::getRecordNumDrivers incorrectly reporting
0 if called within 1 second of application start on some platforms.
LowLevel API - Fixed stereo AIFF files producing static.
LowLevel API - Xbox One - Fixed rare crash for stereo XMA streams.
LowLevel API - iOS - Fixed MP3 decoding being performed by FMOD
cross-platform decoder instead of native AudioQueue.
LowLevel API - Fix mp3 crash seeking, introduced in 1.07.00 if using
certain types of MP3 file in FMOD_CREATECOMPRESSEDSAMPLE
mode.
Unity - Change Android to read banks straight from APK
Unity - Will automatically append a "64" suffix to plugins if required.
Unity - Fix OSX bundles having incorrect settings
Unity - Fix compatibility with Unity 5.2.2
Unity - Fix crashes when creating a standalone OSX build.
UE4 - Fix for audio component direction not being set into FMOD.
UE4 - Fixed IOS deployment error "libfmod does not exist"
Notes:
Studio is now a 64-bit application. All plugin libraries must be built for 64-
bit architecture to be compatible with the 64-bit version of the tool.
Added Universal Windows Platform (UWP) support.
Added AppleTV platform support. Contact [email protected] for beta
access.
Features:
Fixes:
Notes:
Fixes:
Studio API - Fixed input buses not being released when there are no longer
any event instances routed into the bus.
Studio API - Fixed API capture recording the initial VCA level as 0.
LowLevel API - Fix rare crash when changing the master channel group
head DSP when the software format and system output don't match.
LowLevel API - Fix Channel::AddDSP() and ChannelGroup::AddDSP() not
correctly moving a DSP if it's already a member.
LowLevel API - Fix for noise being produced when panning a surround
input when the system format doesn't match the panner input format.
Unity - FMOD RNG seed set at initialization time.
Unity - Can now properly cancel the copy step of the import process.
Unity - Updated documentation links in menu.
Notes:
Fixes:
Notes:
Studio API - Additional logging when banks have been exported with out of
date plugin effects.
Fixes:
Notes:
Fixes:
Notes:
Studio API - Reduced memory usage for instruments that do not require
up/down mix.
LowLevel API - Improved performance of DSP::getParameterFloat,
DSP::getParameterInt, DSP::getParameterBool and DSP::getParameterData
when 'valuestr' argument is NULL.
22/07/15 1.06.07 - Studio API patch release (build
66161)
Fixes:
LowLevel API - Win - Fix audio glitches at initialization time when using
the WASAPI output mode on Windows 10.
LowLevel API - Fix UTF8 strings in MP3 ID3V2 tags not being null
terminated properly leading to possible string overflow crash.
Lowlevel API - PS4 - Fixed issue with non-1024 sample aligned loop-points
and AT9 compressed samples.
Lowlevel API - Fixed memory leak when releasing connections that have a
user allocated mix matrix.
LowLevel API - Added pre-wet and post-wet arguments to WetDryMix in
C# wrapper.
Lowlevel API - Fixed crash with FADPCM streams.
LowLevel API - Fixed another potential crash in PitchShifter DSP if
changing channel count while running.
LowLevel API - Win - Fix issues caused by WASAPI allocating the output
buffer at the mixer's sample rate instead of the device's sample rate.
Studio API - XboxOne - Fix setting the thread affinity of the studio loading
thread.
Studio API - Fixed case of nested events on parameters being stopped while
still active. Introduced in 1.06.04.
Notes:
Fixes:
Fixes:
Studio API - Fixed Scatterer sounds having incorrect volume when min and
max scatter distances are equal. Introduced in 1.06.00.
Studio API - Fixed FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES
position to return the beat position, rather than the tempo marker position.
Studio API - Fix deadlock in studio when removing an output device that
runs at a different sample rate to the system.
Studio API - Fix deadlock in studio when removing certain USB headsets.
LowLevel API - Fixed rare case of DSP mixer not responding momentarily
if output mode was switched during playback.
LowLevel API - Fix declaration of DSP.getMeteringInfo in C# wrapper.
Notes:
Fixes:
Lowlevel API - Fixed MIDI playback not correctly handling CC1 (mod
wheel).
Studio API - Fixed livelock when scheduling nested events in a playlist that
have 0 duration.
Studio API - Fixed events staying active when they have active but idle
nested events on parameters. Events now finish once their nested parameter
events go idle.
Studio API - Fixed Scatterer sounds not being spatialized properly.
Introduced in 1.06.00.
FSBank - Fix bug that prevented selection of FMOD ADPCM in the tool.
LowLevel API - Fix set3DPanLevel not respecting reverb mix when pan
level was approaching 0.
LowLevel API - Fix 2d channels not having the wet mix scaled for reverb
when parent ChannelGroup volume/mute functions were called.
Unity - Remove warnings about banks already loaded
Unity - Fix Unity Editor crashing when using FMOD_LIVEUPDATE and
FMOD_DEBUG pre-processor commands simultaneously.
Notes:
Fixes:
Studio API - Fixed steal oldest polyphony behaviour using instance creation
instead of instance start time.
Studio API - Fixed playlist instrument cutoff not applying a volume ramp
down which could cause pops when using polyphony.
LowLevel API - Fixed invalid memory access when loading an incorrectly
formatted or truncated IMA ADPCM wav file using
FMOD_OPENMEMORY_POINT and
FMOD_CREATECOMPRESSEDSAMPLE.
LowLevel API - Fix rare crash due to race condition when calling
Sound::Release() just after the sound has been loaded using
NON_BLOCKING.
LowLevel API - PS3 - Fix deadlock in streaming when using SPU Threads.
LowLevel API - Attempting to attach the Master ChannelGroup to a port
will now return FMOD_ERR_INVALID_PARAM.
LowLevel API - PS4 - Fix issues with recording at rates other than the
driver default.
LowLevel API - Fix crash in DSPFader when voice goes virtual with DSP
effect added at a position lower than the fader (ie post fader), and the effect
is freed.
UE4 Integration - Fixed incorrect listener orientation.
Notes:
Studio API - Sounds on parameters that are cross-fading in will now apply a
ramp volume up to the initial cross-fade value. This avoids pops even if the
sound has been improperly authored.
UE4 Integration - Added support for Reverb zones.
UE4 Integration - Exposed Studio::EventInstance::getTimelinePosition and
Studio::EventInstance::setTimelinePosition as blueprint functions.
Fixes:
Studio API - Fixed transition timeline modules not crossfading their volume
properly when overlapping the lead out region.
Studio API - Fixed C# wrapper not linking against 64bit dll when WIN64 is
defined.
Studio API - Fixed events with sidechains never naturally stopping.
Studio API - Fixed runtime crash caused by a compiler bug for customers
compiling from source using VS2015 CTP.
LowLevel API - WiiU - Fixed incorrect pitch for DRC if System is running a
rate other than 48KHz or 32KHz.
LowLevel API - PS4 - Fix small memory leak when closing output ports.
LowLevel API - Fixed documentation regarding
FMOD_DSP_COMPRESSOR_USESIDECHAIN and
FMOD_DSP_ENVELOPEFOLLOWER_USESIDECHAIN.
LowLevel API - WinStore - Fix System::Init() freezing when called from the
UI thread.
Unity Integration - Logging libs for OSX are now included. Defining
FMOD_DEBUG will now route FMOD internal logging to the Unity
console in the OSX editor and standalone OSX builds.
Unity Integration - Make members of the REVERB_PROPERTIES
structure public.
Unity Integration - Fix compile error on XBox One when defining
FMOD_DEBUG.
Notes:
Fixes:
LowLevel API - PS3 - Fix rare crash if sound stops on a channelgroup with
a matrix set in it.
Unity Integration - Fix banks not being loaded on standalone OSX builds.
Unity Integration - Logging libs for windows are now included. Defining
FMOD_DEBUG will now route FMOD internal logging to the Unity
console in the Windows editor and standalone Windows builds.
Notes:
Studio API - Scatterer sounds now steal the oldest spawned sound if the
polyphony limit has been reached when spawning a new sound.
Features:
Fixes:
Studio API - Fixed parameter modulation being unable to go below the
value set from the public API.
Studio API - Fixed effect bypass setting not being saved to banks.
Notes:
Notes:
Lowlevel API - Fixed some cases where channel group audibility was not
refreshed when fade points are active. This could happen when a Studio
event instance is paused and unpaused.
Lowlevel API - PS3 - Fixed FMOD_PS3_INITFLAGS overlapping
FMOD_INITFLAGS causing certain FMOD_INITFLAGS to affect PS3
specific bit-stream encoding options.
Lowlevel API - PS3 - Fixed a rare hang when releasing a DSP that exposes
a FMOD_DSP_PARAMETER_OVERALLGAIN parameter.
Lowlevel API - PS3 - Fixed opening URL failing with network streams.
Lowlevel API - Xbox One - Fixed recording API, you can now specify any
sample rate to record at. Native rate of 48KHz is still recommended for
lowest latency.
Studio API - Fixed virtualized event failing to become real if the number of
playing instances drops back below max polyphony.
Notes:
Fixes:
Studio API - Fixed case of nested event not being destroyed even after it
had finished producing sound.
Studio API - Fixed crash when changing output bus on an event when live
update is connected.
Studio API - Fixed deadlock when calling Studio commands when mixer is
suspended.
Studio API - System::release now ensures release even if flushing pending
commands causes an error.
Studio API - The name of the string bank is now added to the string bank.
Studio API - Event instance restart now flushes parameter values before
timeline rescheduling occurs. This avoids a potential issue for transitions
with parameter conditions, where they may not have used the most recent
parameter value.
LowLevel API - Fix unnecessary querying of recording driver capabilities
during recording.
LowLevel API - PS4 - Remove AT9 workaround added in 1.05.12. Fix AT9
compressed codecs with finite loop counts.
LowLevel API - PS4 - Removed stalls when an AT9 compressed sample
channel is started.
LowLevel API - PS4 - Fix crash in recording.
LowLevel API - Fix multiple listener support not working properly.
LowLevel API - Fix user file crash if using asyncfileread callback, and file
open and close happens without any read occuring.
LowLevel API - Fix rare crash with Sound::release if a nonblocking
setPosition is in process and it is an FSB sound.
LowLevel API - Fix thread safety issue loading multiple mod/s3m/xm/it
files simultaneously.
LowLevel API - Fix rare crash if FMOD_ACCURATETIME was used with
.mp3 file followed by mp3 encoded FSB file after a time, both using
FMOD_CREATECOMPRESSEDSAMPLE.
LowLevel API - PS3 - Fixed custom DSP that use the plugindata member.
Notes:
Studio API - Improved memory use for events with repeated nested events.
Fixes:
Studio API - Fixed crash when stopping multiple one-shot events on a bus.
Studio API - Fixed nested event polyphony from cutting off immediately,
causing pops.
LowLevel API - Fixed rare crash in mixer if DSP::reset is called on a
FMOD_DSP_TYPE_FADER dsp (ie ChannelControl head DSP) after
DSP::setPan/setMixLevelsOutput/setMixMatrix.
LowLevel API - Fixed race condition setting resampling speed while
resampling is occurring.
LowLevel API - Fixed crash loading mod/s3m/xm/it file using
FMOD_NONBLOCKING and FMOD_CREATECOMPRESSEDSAMPLE
and then immediately calling SoundI::release
LowLevel API - PS4 - Work around AT9 codec issues that have appeared
when using SDK 2.000
22/01/15 1.05.11 - Studio API patch release
Features:
Fixes:
Studio API - Fixed crash setting Studio event callback to null as it is being
invoked.
Studio API - Fixed crash in hashmap reallocation when running out of
memory.
Studio API - Fixed Studio::loadBankCustom from freeing its custom
userdata before the close callback for failed banks.
Studio API - If FMOD_OUTTPUTTYPE_WAVWRITER_NRT or
NOSOUND_NRT is used as an output mode, Studio runtime will now
internally force FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE to
avoid a hang.
LowLevel API - Fix pop noise when 3d sound goes virtual then becomes
real again, only if ChannelControl::addDSP was used.
Notes:
Fixes:
Fixes:
Studio API - Fixed looping event cursor position from getting slightly out of
sync with scheduled position when running at 44.1kHz.
Studio API - Fixed playlist steal-oldest polyphony returning errors when
used with extremely small durations.
Studio API - Fixed silence after unpausing an event instance. Introduced in
1.05.08.
Lowlevel API - Fixed crash after setting the input format of a Return DSP to
stereo, when the mixer output format is mono.
Lowlevel API - Windows - Fix crash calling
FMOD_ASYNCREADINFO::done function pointer when default calling
convention is not cdecl.
Lowlevel API - Fixed FMOD_SPEAKERMODE_RAW panning incorrectly
during an up or down mix.
Lowlevel API - Fix crash when a Channel::setPosition is called on a non-
blocking stream that is going virtual.
Lowlevel API - Fixed potential audio corruption when playing sounds with
more than 8 channels.
Lowlevel API - Fixed emulated channels not updating their parent when
when Channel::setChannelGroup is called.
Lowlevel API - Fixed channels having their volume reset when changing
channel group parents.
Lowlevel API - Fixed channels not going virtual when being paused if no
other volume changes were occurring.
Lowlevel API - Fixed FMOD_INIT_PROFILE_ENABLE enabling all DSP
metering regardless of whether FMOD_INIT_PROFILE_METER_ALL
was used.
Lowlevel API - Added volume ramp up for 3d channels coming back from
virtual to real.
Lowlevel API - Fixed rare crash if the master channelgroup's DSP Head unit
was changed then released.
Lowlevel API - PS3 - Fix loudness meter not functioning.
LowLevel API - PS3 - Re-enabled playDSP.
Notes:
Lowlevel API - Xbox One - Added check to ensure DSP buffer size is
specified as the default 512 samples to avoid performance degradation of
XMA decoding.
Lowlevel API - Windows - Changed default ASIO speaker mapping to 1:1
for outputs with more than 8 channels.
28/11/14 1.05.08 - Studio API patch release
Features:
Fixes:
Studio API - Fixed pops that could occur when stopping events that have
instruments scheduled to stop already.
Studio API - Fixed pop that could occur when playing an sound that has an
AHDSR fade in.
Studio API - Fixed indeterminism when exporting string banks that have
multiple string entries with inconsistent case.
Lowlevel API - Android - Improved compatibility with Java 1.6.
Lowlevel API - iOS - Added armv7s back to the universal binary.
Lowlevel API - Windows - Fix System::getRecordDriverInfo returning
incorrect device names. Introduced in 1.05.00.
Lowlevel API - Fix FMOD_SPEAKERMODE_RAW creating silence if
playing more than 1 sound, introduced in 1.04.15.
LowLevel API - Fix CELT and Vorbis FSB being allowed with
FMOD_OPENMEMORY_POINT and FMOD_CREATESAMPLE when it
should in fact return FMOD_ERR_MEMORY_CANTPOINT
21/11/14 1.05.07 - Studio API patch release
Important:
Studio API - Fixed scheduling for looping nested events which are cut off
from the parent event. Previously the looping nested event would attempt to
play to end but would cut off halfway through with a noticeable click. The
nested event now cuts off immediately with a fade out ramp.
Features:
Fixes:
Notes:
Fixes:
Studio API - Fixed thread safety issue when accessing sound tables as new
banks with sound tables are being added.
Studio API - Fixed duplicate streaming sounds keeping playing when
unloading the memory bank that it is streaming from. Now the stream will
stop if the memory bank is unloaded.
Lowlevel API - Fixed sound going mono in certain DSP configurations.
Introduced 1.05.00.
Lowlevel API - Fixed rare timing issue with fade points that caused the
fader DSP to generate invalid floats.
Lowlevel API - Android - Fixed crashes due to insufficient stack size when
running ART instead of Dalvik.
Lowlevel API - Windows - Fixed potential crash if using multiple
FMOD::System with ASIO output mode. This is not supported by ASIO
and is now disabled.
Lowlevel API - Linux - Fixed PulseAudio device enumeration not placing
the default device at position 0.
Notes:
Fixes:
Studio API - Fixed various errors after deleting objects via Live Update
Studio API - Fixed possible crash using shared waveforms across multiple
banks after some of the duplicate banks have been unloaded.
Studio API - Fixed duplicate events becoming invalidated when the first
bank that contains them is unloaded.
Studio API - Fixed bug in load_banks example.
Studio API - Fixed crash when calling Studio::Bus::stopAllEvents while
playing event instances that have had release called.
LowLevel API - Fixed memory leaks.
22/10/14 1.05.04 - Studio API patch release
Fixes:
Studio API - Fixed transition markers failing at the start of the timeline.
LowLevel API - PS3/X360/Wii-U - Fix vorbis seek getting stuck in an
infinite loop.
LowLevel API - Fixed incorrect behaviour when changing the channel mode
from 3D to 2D.
FSBank - Fixed setting the cache directory and printing log messages.
Notes:
Fixes:
Studio API - Fixed event fadeout cutting off DSP effects with long tails.
Studio API - Fixed crash when accessing events with a lifetime across
duplicate banks. Note that when unloading the initial bank for an event, that
event will be invalidated.
Lowlevel API - Fixed for enum mismatches in C# wrapper.
Lowlevel API - Fixed FMOD_DSP_LOWPASS click when being reused, ie
stopping then starting a new sound.
Lowlevel API - Fixed rare hang during Sound::release for sounds created as
FMOD_NONBLOCKING.
Lowlevel API - Fixed corrupted playback of MOD/S3M/XM/IT/MID
sequenced formats. Introduced 1.04.05
Lowlevel API - Fixed ChannelGroup::setReverbProperties on the master
channel group causing a stack overflow. This is now disallowed as it creates
a circular dependency.
Lowlevel API - Mac - Replaced error condition if initializing FMOD before
activating the AudioSession with a TTY warning.
Lowlevel API - Android - Fixed Sound::readData going forever when
reading AAC audio.
Lowlevel API - Fix the pancallbacks member of the
FMOD_DSP_STATE_SYSTEMCALLBACKS structure passed into
custom DSP callbacks being NULL.
Lowlevel API - Fix crash in mixer if user used System::playDSP and made
the dsp inactive with DSP::setByPass or DSP::setActive
01/10/14 1.05.02 - Studio API patch release
Fixes:
Studio API - Fixed a bug where event sounds could have incorrectly
synchronized playback.
Lowlevel API - Fixed compiler warning in public header.
Studio API - Disabled embedded loop points on all sounds played by the
Studio API to fix incorrect playback of timelocked sounds.
Studio API - Snapshot volumes are now interpolated in terms of linear gain.
LowLevel API - Fixed 3EQ DSP not clearing out internal state when
DSP::reset is called, potentially causing audible artifacts when reused.
LowLevel API - Fixed resampler inaccuracies when reading partial looping
data.
LowLevel API - Mac - CoreAudio output mode will now allow any DSP
block size and will correctly use the desired buffer count.
LowLevel API - Mac - CoreAudio now correctly exposes its output
AudioUnit via the System::getOutputHandle function.
LowLevel API - PS3 - Fixed resampler strict aliasing bug on PPU release
builds.
LowLevel API - PS3 - Fixed playDSP crash.
LowLevel API - Fixed convolution reverb input downmix
Lowlevel API - Greatly increase speed of mixing multichannel source data.
Notes:
Fixed possible large memory blowout if certain DSP pools were exceeded.
Features:
Fixes:
Notes:
Features:
Fixes:
Studio API - Fixed transitions to the end of a loop region failing to escape
the loop.
Studio API - Fixed sends inside events occasionally having a brief period of
full volume when the event is started.
LowLevel API - Fix for crash when creating multiple Systems with profiling
enabled.
Notes:
Studio API - Transition regions no longer include the end of their range.
Studio API - FMOD_ERR_EVENT_WONT_STOP has been removed.
Studio API - Studio::EventInstance::start now resets all DSPs inside the
event to prevent incorrect ramping. This relies on
FMOD_DSP_RESET_CALLBACK leaving public parameters unchanged.
Studio API - Studio::System::getEvent's unimplemented mode parameter
has been removed, along with FMOD_STUDIO_LOADING_MODE.
Studio API - FMOD_STUDIO_PLAYBACK_IDLE and
FMOD_STUDIO_EVENT_CALLBACK_IDLE have been removed.
Studio API - Removed deprecated function
Studio::EventInstance::createSubEvent.
LowLevel API - Changed FMOD_FILE_ASYNCCANCEL_CALLBACK
to take FMOD_ASYNCREADINFO structure rather than void *handle.
LowLevel API - The FMOD_DSP_RESET_CALLBACK documentation
has been updated to make it clear that it should leave public parameters
unchanged.
LowLevel API - PS4 - Thread affinity can now be set as a mask of allowed
cores.
LowLevel API - iOS / Mac - Reduced default block size to 512 for lower
latency.
LowLevel API - Android - Renamed Java interface from
FMODAudioDevice to simply FMOD, i.e. org.fmod.FMOD.init().
LowLevel API - Channel::setMode moved to ChannelControl::setMode so
that ChannelGroups can now also have 2D/3D mode bits set.
09/09/14 1.04.08 - Studio API patch release
Fixes:
Studio API - Fixed crash when a second system is created but never
initialized.
Studio API - Fixed a few ordering issues that can cause binary changes in
identical banks.
LowLevel API - Fix for pop due to unwanted volume ramping after calling
DSP::reset on fader DSP. This can happen when a Studio event instance is
stopped and then restarted. Caused by timing issue with
ChannelControl::setVolumeRamp.
LowLevel API - Fix crash if FMOD_DSP_TYPE_MIXER or DSP with no
read/process function is passed to System::playDSP.
LowLevel API - iOS - Fixed MP2 files being intercepted by AudioQueue
causing an internal error.
LowLevel API - XboxOne - Fixed network connect not resolving host names
and not honoring the requested time out.
LowLevel API - Fix rare crash if calling Channel::stop() which a non
blocking Channel::setPosition is happening with a stream.
LowLevel API - Winphone and Windows Store Apps - fixed detection of
socket errors.
LowLevel API - If a user DSP is added after the master ChannelGroup's
fader that changes the output channel count to something other than the
software mixer's channel count, stuttering could occur. Fixed.
Studio API - Windows - Fixed Studio API functions deadlocking when in
asynchronous mode and a sound device is removed.
LowLevel API - PS3 - Fixed some DSP parameter sets being ignored
(overwritten by SPU DMA)
LowLevel API - Fix System::playDSP not working with custom DSP effects
that use the read callback
LowLevel API - Added Memory.Initialize function to the C# wrapper.
LowLevel API - Fixed incorrect truncation of
FMOD_CREATECOMPRESSEDSAMPLE sounds created from MP3 or
MP2 files (does not affect FSB).
LowLevel API - Fixed FMOD_ACCURATETIME for
FMOD_CREATECOMPRESSEDSAMPLE sounds created from MP3 or
MP2 files (does not affect FSB).
Notes:
Notes:
Fixes:
LowLevel API - Fixed bug where channels with post-fader DSP units would
not play after transitioning from virtual to real.
LowLevel API - Fix pops with resampler on loops.
LowLevel API - Fix playDSP returning FMOD_ERR_DSP_SILENCE or
FMOD_ERR_DSP_DONTPROCESS if the dsp played returned that during
query mode.
LowLevel API - PS3 - Fix ITEcho, SFXReverb, FFT DSP effects rarely
getting parameters reset to old values.
LowLevel API - Xbox One - Fixed audio corruption when playing mono
streams from an XMA FSB that has both mono and stereo subsounds.
LowLevel API - PS3 - Moved vorbis decode work during stream setPosition
to the SPU.
LowLevel API - Windows - Fix System::setSoftwareFormat with differing
samplerate and speaker mode causing static.
FSBank API - Fixed cache being incorrectly reused when replacing source
files of identical name with a different file that has an old time stamp.
Notes:
PS3 - Now built with SDK 460.001
25/07/14 1.04.05 - Studio API patch release
Fixes:
Notes:
Studio API - Fixed a bug where quantized timeline transitions could fail to
play the audio at the destination marker.
LowLevel API - Fix channel stealing not calling end callback in playDSP
case.
LowLevel API - Fix rare crash if System::playDSP is called, and it steals a
channel with a sound on it, and System::update wasnt called in between.
LowLevel API - Mac, iOS and Android - Improved network error reporting.
08/07/14 1.04.03 - Studio API patch release
Features:
Fixes:
Studio API - Fixed incorrect virtualization of events that have more than
one 3D position dependent effect.
Studio API - Studio::EventDescription::getInstanceList,
Studio::Bank::getEventList, Studio::Bank::getMixerStripList and
Studio::System::getBankList now accept a capacity of 0.
LowLevel API - Fixed a race condition that could lead to DSP graph
changes not being handled correctly.
LowLevel API - Linux - Fixed "spurious thread death event" messages
appearing when attached with GDB.
LowLevel API - Linux - Fixed internal PulseAudio assert if
System::getNumDrivers or System::getDriverInfo is used before
System::init.
LowLevel API - Linux - Fixed ALSA not using correct default driver in
some cases.
LowLevel API - Send levels set before connecting the Return DSP are now
applied immediately rather than fading in over a short time.
19/06/14 1.04.01 - Studio API patch release
Features:
Fixes:
Features:
Fixes:
Studio API - Fixed nested events never ending if they have a parameter with
non-zero seek speed.
Studio API - Fixed AHDSR modulation on snapshot intensity
LowLevel API - Fixed incorrect fader interpolation when reparenting
channels with propagate clocks.
LowLevel API - Win - Fixed several issues with ASIO playback.
LowLevel API - Android - Fixed audio corruption on devices without
NEON support.
LowLevel API - Fixed FMOD_CREATESOUNDEXINFO.length being
handled incorrectly for memory sounds. This length represents the amount
of data to access starting at the specified fileoffset.
LowLevel API - Fix truncated FSB causing zero length subsounds, now
returns FMOD_ERR_FILE_BAD
Notes:
Studio API - Fixed truncation error when loading sample data from bank
opened with Studio::System::loadBankMemory.
Studio API - Fixed numerical error when blending multiple snapshots with
zero intensity.
Studio API - Fixed incorrect pitch when an instrument has a non-zero base
pitch combined with pitch automation or modulation.
LowLevel API - Xbox One - Fixed potential seeking inaccuracies with XMA
sounds.
LowLevel API - Fix occasional audio pops when starting a channel or
channel group.
LowLevel API - Fix crash when running out of memory during channel
group creation.
LowLevel API - Fixed the C# wrapper for Sound.setDefaults and
Sound.getDefaults.
Notes:
Fixes:
Notes:
Fixes:
Studio API - Fixed AHDSR Release not working when timelocked sounds
are stopped by a parameter condition.
Studio API - Removed some unnecessary file seeks.
Studio API - Fixed AHDSR Release resetting to Sustain value when
instruments with limited Max Voices are stopped repeatedly.
Studio API - Fixed channels within paused events not going virtual.
Studio API - Fixed AHDSR Release not working inside nested events
LowLevel API - Fixed downmixing to a quad speaker setup.
LowLevel API - Fixed fsb peak volume levels on big endian platforms.
LowLevel API - Fixed paused channels not going virtual.
17/04/14 1.03.06 - Studio API patch release
Features:
Fixes:
Studio API - Fixed crash when creating new automation via LiveUpdate
Studio API - Fixed possible internal error being returned from
Studio::Bank::getSampleLoadingState when called on an unloading bank.
14/04/14 1.03.05 - Studio API patch release
Fixes:
Fixes:
Notes:
Fixes:
Studio API - Fix for setting parameter values that could cause volume
changes without the appropriate volume ramp.
LowLevel API - Fix for some incorrect declarations in the C header files.
LowLevel API - Fixed a linker error when calling some C API functions.
LowLevel API - Fixed FMOD_ChannelGroup_AddGroup not returning the
DSP connection on success.
LowLevel API - PS4 - Fixed FMOD macros for declaring plugin functions.
Notes:
LowLevel API - Blocking commands are not allowed to be called from the
low level non-blocking callback. Attempting to do so will log an error and
return FMOD_ERR_INVALID_THREAD. See
FMOD_SOUND_NONBLOCK_CALLBACK for more information.
Fixes:
Studio API - Fixed simple nested events not terminating properly when
inside multi sounds
LowLevel API - Fix SRS downmix crash on startup if software mixer was
set to 5.1, and the OS was set to stereo, and the system sample rate was not
44/48/96khz
LowLevel API - Fix for deadlock that could occur when executing
commands in the non-blocking callback as another thread is releasing
sounds.
LowLevel API - Fix for Channel::getPosition and
ChannelControl::getDSPClock returning errors when called on emulated
channels created with System::playDSP.
LowLevel API - PS4 - Fixed leak of audio output handles on shutdown.
LowLevel API - Fix crash in compressor when placed on a channel with a
delay.
Notes:
Features:
Studio API - The new .bank file format provides improved support for
backward and forward compatibility. Future version updates will not
generally require banks to be rebuilt.
Studio API - Added support for events duplicated across banks.
Studio API - Added support for transition marker and loop region
probability.
Studio API - Added support for sounds on transition timelines.
Studio API - Added asset enumeration functions:
Studio::System::getBankCount, Studio::System::getBankList,
Studio::Bank::getEventCount, Studio::Bank::getEventList,
Studio::Bank::getMixerStripCount, Studio::Bank::getMixerStripList.
Studio API - Added path retrieval functions: Studio::System::lookupPath,
Studio::EventDescription::getPath, Studio::MixerStrip::getPath,
Studio::Bank::getPath.
Studio API - Bank loading now takes an extra flags argument. It is possible
to load banks in non-blocking mode in which case the function will return
while the bank is still in the process of loading.
Studio API - Added Studio::System::setAdvancedSettings.
Studio API - Added Studio::System::getCPUUsage.
Studio API - Studio repositories have improved performance and no longer
depend on the standard library map.
LowLevel API - The system callback now includes the error callback type
which will be invoked whenever a public FMOD function returns a result
which is not FMOD_OK.
LowLevel API - Optimize Sound::getNumSyncPoints when using large FSB
files with many subsounds and many syncpoints.
LowLevel API - Made improvements to virtual voices for DSP graphs using
sends, returns, fade points, and sounds with varying peak volumes.
LowLevel API - PS4 - Added recording support.
LowLevel API - XBox One - Added dll loading support.
FSBank API - Added support for exporting peak volume per sound using
the FSBANK_BUILD_WRITEPEAKVOLUME flag.
Fixes:
LowLevel API - Channels now take fade points into account for
virtualisation
LowLevel API - Fixed pops when changing Echo DSP Delay parameter
LowLevel API - Xbox One - Removed a CPU spike when first playing a
compressed sample XMA.
Notes:
Notes:
Fixes:
Notes:
LowLevel API - PCM data will now be read the main data in a single read
instead of breaking the reads up into 16kb chunks.
Studio API - Changed behavior of Studio::EventInstance::getCue to return
FMOD_ERR_EVENT_NOTFOUND if the event has no sustain points.
02/12/13 1.02.10 - Studio API patch release
Important:
Fixes:
LowLevel API - DSP clock now uses 64 bit integers. The following
functions have been modified to accept a 64 bit integer argument:
ChannelControl::getDSPClock, ChannelControl::setDelay,
ChannelControl::getDelay, ChannelControl::addFadePoint,
ChannelControl::removeFadePoints, ChannelControl::getFadePoints.
Features:
Fixes:
Notes:
LowLevel API - Turned off optimization for user created DSP effects that do
not call the read callback if no sound is coming in. read callbacks will now
always fire regardless. 'shouldiprocess' callback can be defined to optimize
out no input.
12/11/13 1.02.07 - Studio API patch release
Fixes:
LowLevel API - iOS - Added support for ARM64 devices and x86_64
simulator.
Fixes:
Studio API - Fix playback issues after running for more than 12 hours
LowLevel API - Fixed net streaming truncating or repeatings parts of the
end of a netstream.
LowLevel API - Fix crash due to missing functions in kernel32.dll on
Windows XP.
29/10/13 1.02.05 - Studio API patch release
Features:
Fixes:
Studio API - Fixed pan jittering on events that move with the listener
22/10/13 1.02.04 - Studio API patch release
Features:
Studio API - Added ability to continue loading banks when missing plugins.
Studio API - Added FMOD_STUDIO_PARAMETER_TYPE enum to
describe the type of a parameter to
FMOD_STUDIO_PARAMETER_DESCRIPTION.
LowLevel API - Added function to get parent sound from a subsound.
LowLevel API - Android - Added support for dynamic plugins.
Fixes:
LowLevel API - iOS - Fixed potential crash when stopping virtual channels.
Studio API - Fixed click with cross-fade for nested events
Studio API - Mac - Fixed link issues from certain API functions.
Notes:
Notes:
Fixes:
Notes:
Features:
Fixes:
Notes:
Fixes:
Notes:
Fixes:
Notes:
Added FMOD SoundBank Generator tool for creating .fsb files. Both a
GUI version (fsbank.exe) and a command line version (fsbankcl.exe) are
provided.
Fixes:
LowLevel API - Fix FSB Vorbis seek table containing an invalid entry at the
end.
LowLevel API - Fix cpu stall when using System::playDSP. Also if using
oscillator in studio.
LowLevel API - Xbox One - Fixed rare crash on System::init when using
WASAPI.
05/08/13 1.01.11 - Studio API patch release
Fixes:
Studio API - Changed .bank file format - API is backward compatible but
must be upgraded for compatibility with Studio tool 1.01.10 or newer.
Fixes:
Notes:
Features:
Fixes:
Notes:
Fixes:
LowLevel API - Fix "Sample Rate Change" tag from passing through 0 rate
when EOF was hit on certain MP3 files.
LowLevel API - Fix crash when using
FMOD_CREATECOMPRESSEDSAMPLE introduced in 1.01.06
LowLevel API - iOS - Fixed crash when using DSP Echo.
LowLevel API - iOS - Fixed crash in mixer due to misaligned buffers.
08/07/13 1.01.06 - Studio API patch release
Features:
XboxOne - Officially added support for XMA. Please note this requires the
July XDK to avoid a hang.
Studio API - Added Studio::ParameterInstance::getDescription
Studio API - Added EventDescription getParameter, getParameterCount and
getParameterByIndex functions
Fixes:
Notes:
Features:
Fixes:
Notes:
Studio API - Effect data parameter buffers are now 16-byte aligned (128-
byte aligned on PS3)
Studio API - Added automatic header version verification to
Studio::System::create
19/06/13 1.01.04 - Studio API patch release
Fixes:
Low Level API - Fix rare crash with Fader DSP unit.
Studio API - Fixed some effects causing events to not stop correctly
Studio API - Fixed multiple concurrent playbacks of one event sometimes
failing with FMOD_ERR_SUBSOUNDS returned from
Studio::System::update
Notes:
Fixes:
Notes:
Notes:
Features:
Fixes:
LowLevel API - Fixed FSB Vorbis not working with encryption key
enabled.
LowLevel API - Fixed virtual voices not respecting
ChannelControl::setDelay
LowLevel API - Fixed parameter index validation when getting/setting DSP
parameters.
LowLevel API - Fixed reverb not always idling when it should.
LowLevel API - Fixed bug with loop count being incorrectly set to infinite
LowLevel API - Optimised Echo DSP effect on x86/x64 architectures
LowLevel API - Fixed ChannelControl::set3DLevel,
ChannelControl::set3DSpeakerSpread and stereo 3d sounds not working
LowLevel API - Fixed flange effect not updating 'rate' parameter if the rate
was set before adding it to a channel or channelgroup or system object.
LowLevel API - PS4 - Added support for music, voice, personal device and
pad speaker routing. See System::AttachChannelGroupToPort and
fmodorbis.h
LowLevel API - PS4 - Added dynamic linking option.
Studio API - Fixed stop/release behaviour of event instances containing
logic markers.
Studio API - Fixed memory corruption in Studio::System::release
Studio API - Fixed FMOD_STUDIO_STOP_ALLOWFADEOUT cutting
off delay and reverb
PS4 - Fixed closing the FMOD::System causing platform wide networking
to be shutdown even if the system did not initialize it.
Notes:
Fixes:
Features:
PS4 & XboxOne - Reduced CPU usage with optimized SSE and AVX
functions.
Fixes:
LowLevel API - Fix potential crash when stopping and starting sounds
quickly and a leak for FMOD_CREATECOMPRESSED codecs which
made all sounds go virtual.
Studio API - Fixed a crash when connecting to the game via Live Update
Studio API - Fixed serialization of snapshots with automation
Notes:
Features:
Mac - Reduced CPU usage with optimized SSE and AVX functions.
XboxOne - Added ability to set affinity via
FMOD_Durango_SetThreadAffinity.
PS4 - Added ability to set affinity via FMOD_Orbis_SetThreadAffinity.
Fixes:
Notes:
Fixes:
Notes:
Features:
Fixes:
Studio API - Fixed an internal error on instantiating a VCA when not all of
the mixer strips it controls are loaded
Notes:
Studio API - Fixed Distance and Angle parameters not being created
properly by live update
Fixed reverb effect generating denorm floats after silence
20/12/12 0.02.00 - Studio API minor release
Features:
Fixed distortion when the distance between 3D sound and the listener is
greater than the maximum attenuation distance.
Fixed memory leaks when playing a persistent event and triggering sounds
via parameter changes.
16/10/12 0.01.00 - Minor release
Features:
Fixes:
Notes:
Features:
Fixes:
Features:
Fixes:
Normally you will just need one copy of the UE4 integration. If you develop for
multiple platforms at once, you can copy multiple integrations over the top of
each other.
Installing the integration
The first step is to install the FMOD Studio UE4 integration. The integration
consists of a single FMODStudio folder which can be placed in either the
Engine/Plugins directory or your UE4 game's Plugin directory. The next steps
show how to install it into your Engine directory, so it will be available for all
projects using UE4.
For Windows: Browse to your UE4 Engine folder and unzip FMODStudio into
the plugins directory.
Note: If you see the FMOD Help in the manual, then the plugin installed
correctly. If you don't see FMOD help, it isn't installed.
Setting up your project
To begin adding sounds to your UE4 project, you'll first want to create a project
within FMOD Studio. For the purposes of this tutorial, we are going to create a
copy of the Examples project that ships with Studio.
To do this, open FMOD Studio, select File > Open..., select the Examples.fspro
file in the file browser dialog, then select File > Save As.... From here, select a
destination to save the file to. Studio will create a new folder containing all of
the project files necessary. The directory can be under your UE4 game's
directory, or it could be anywhere on disk.
Now that you have a project to work with, we can set up to export bank files into
your game's content directory. To do this, select Edit > Preferences... (FMOD
Studio > Preferences... on Mac) and select the Build tab. Set your Built banks
output directory to a directory called FMOD under your game's Content path.
Now select File > Build. This will build bank files for events that have been
assigned to banks. You should do this whenever project data has been modified.
Now, open UE4 and look at the content browser. The plug-in defaults to looking
in Content/FMOD directory for banks, so if you have exported banks there,
assets should appear in the content window automatically. These represent items
in your Studio project which update automatically when banks are built.
For more information about banks, see the Banks page.
You can run the "FMOD Validate" option in the UE4 Help menu. It finds and
fixes common issues, and can automatically set up your FMOD Studio project
for you!
If you have any trouble setting up your project, just run this!
Making sounds
The FMOD Studio UE4 integration provides multiple ways in which Studio
events can be played.
Ambient Sounds
The simplest way to play a looping ambience, is to drag and drop an event from
the Content Browser into a scene Viewport.
Note: Make sure you drag an event into the main viewport. Dragging a bank into
main viewport won't do anything.
Another easy way to trigger a sound is via Blueprint. You can use the Play Event
at Location function to quickly trigger any given event.
Other avenues
Keep in mind that more advanced control is also available from Blueprints.
There are graph functions for playing and stopping events, setting parameters,
and loading or unloading banks. You can also add FMODAudio components to
Blueprints, allowing you attach audio directly to an object.
Compiling the plugin (Optional)
If you want to recompile the plugin, you can drop the plugin into a code project
under your game's Plugins/FMODStudio directory, then re-generate the project.
This might be useful if you want to use the plugin with a different version of the
engine, such as a new pre-release of UE4. You can also do this if you want to get
the plugin from github.
To compile the plugin after downloading the source from github, do the
following
Note: When rebuilding the plugin inside a code project, make sure you haven't
also left it in the engine directory as well!
Deployment
For information about preparing your game for deployment, see the Deployment
page.
Firelight Technologies FMOD Studio API
Listener
FMOD can support up to 8 listeners in game (v1.06.00 and after). The FMOD
listeners will follow the UE4 listeners which by default is attached to the camera,
but this means we can move them by moving the UE4 listeners.
Loading a bank will load all metadata, which contains information about all the
events, parameters, and other data needed for all events assigned to that bank.
Studio Bank Output Directory
It is highly recommended that banks are exported to the Content directory of
your project (see the Deployment page for more information). This can set via
the Built banks output directory setting in the FMOD Studio, which can be found
in Edit > Preferences... on Windows (or FMOD Studio > Preferences... on Mac),
under the Build tab.
When using the UE4 editor, as long as you match the FMOD Studio Built banks
output directory to the Bank Output Directory specified in the Unreal project
settings (Edit > Project Settings > FMOD Studio), the integration will find and
load all bank content automatically.
Assigning Events to Banks
Before a new FMOD Studio event can be used in Unreal, it must first be
assigned and built to a bank which can be loaded by Unreal. This can be done
within FMOD Studio via the context menu of an event, or by dragging and
dropping an event onto a bank.
Events are typically assigned to the same bank when they should be loaded and
unloaded at the same time. For example, you might put all the events for the
Goblin enemy within the Goblin bank.
Once you have assigned your events to a bank, you should rebuild your banks.
This is done via the File > Build... menu item.
Loading Banks within Unreal
In Editor
Within the Unreal editor, banks are loaded automatically as soon they are built.
When correctly configured, any data within banks (e.g. events, mixer strips)
should appear within the Content Browser under Game/FMOD by default.
In Game
The FMOD Studio integration will load all banks by default. If you would like to
manually control bank loading, this behavior can be disabled via the Load All
Banks checkbox withing the FMOD Studio settings dialog (Edit > Project
Settings > FMOD Studio).
Banks can then manually be loaded and unloaded using the Load Bank and
Unload Bank Blueprint functions.
Note: The Master Bank does not need to be loaded manually. It is automatically
loaded at startup.
Firelight Technologies FMOD Studio API
Using Plugins
FMOD Studio projects can be set up to use third party plugins. These can
include custom DSP effects that are created in-house or commercial products
that can be used with FMOD Studio. The plugins must be loaded at runtime so
that they are there when loading the banks that need them. Plugins are set up in
the project settings "Advanced" section.
Each entry should be the filename of the plugin, without any extension. The
plugin files should be located in the FMODStudio/Binaries/Platform/ directory.
For example, to use fmod_gain.dll on Win64 builds, you should have the file
here:
FMODStudio/Binaries/Win64/fmod_gain.dll
Deploying FMOD plugins
You will need to make sure the plugins are deployed as well. Unreal deployment
doesn't access to the settings information so you will need to create an extra file
that lists the plugins you want to deploy.
These reverb effects can be dragged into audio volume Reverb Settings panel to
be triggered when the audio listener enters the audio zone. It uses the same logic
as the inbuilt UE4 audio system to determine which audio volume should be
enabled, based on the priority of the volume.
By default, snapshots apply instantly. To have a snapshot fade in, one of two
things can be done. The first is by adding a AHDSR modulation to the intensity
dial. The second way is to expose the intensity as a parameter, which allows it to
be driven from the UE4 integration.
If the snapshot has its intensity exposed as a parameter, then the UE4 integration
will ramp in the intensity over time based on the audio volume's Volume and
Fade Time settings. If the snapshot does not expose its intensity as a parameter,
then these values will not do anything.
Another feature of the UE4 audio system is the ability to have an ambient effect
applied to selected instances, based on both the listener position and the emitter
position. Unlike the global reverb effects, this is something which is applied per
instance.
Only some sounds should be affected by the ambient settings. To set up sounds
to be affected, two things have to be done in Studio. To enable the ambient
effect, add set the user property Ambient=1 on the event in Studio. The wrapper
will look for that property when deciding whether to apply the effect.
The second thing is to add a low-pass effect onto the event's master track. It can
be a "Lowpass" or "Lowpass Simple" effect. The "Lowpass" effect is a more
advanced algorithmn, whereas "Lowpass Simple" uses slightly less CPU. If the
event doesn't have either effect on its master track, then no lowpass effect will be
applied to the instance.
Only FMOD audio components are affected by ambient zones. The simpler
"PlayEventAtLocation" blueprint function to spawn one-shots does not apply
ambient effects.
Firelight Technologies FMOD Studio API
Occlusion
The FMOD integration supports the use of the ray casts for per instance
occlusion of sounds.
Occlusion Settings
Note that only the occlusion settings are used, the other properties currently have
no effect on the event.
The way occlusion works depends on how the event is set up in FMOD Studio.
The standard UE4 audio supports a simple low-pass and gain setting specified in
the attenuation settings. If you want this type of behaviour, you can add a user
property called "Occlusion":"1" to the user property section of the event.
Once occlusion is enabled in the UE4 properties, any event with the "Occlusion"
user property will have its volume and low pass set from the values in the
attenuation settings. Note for a low-pass to be applied, you have to add either a
low-pass, Three EQ or Multiband EQ DSP to the master track of the event. For
Multiband EQ, band A needs to be set to either LP 12dB/24dB/48dB to be used
in UE4, the integration won't touch any others.
The UE4 integration will find it and then drive the frequency automatically.
The attenuation settings has other fields which the UE4 integration does not use.
Instead of the "Attenuate with LPF" setting, you can add an automatic Distance
parameter and automate low-pass frequency based on that parameter.
Instead of the "Listener Focus" setting, you can add an automatic Direction
parameter and automate volume based on that parameter.
Firelight Technologies FMOD Studio API
Callbacks
You can hook up event callbacks using blueprints. FMOD Audio component
callbacks are only triggered if the "Enable callback" option is ticked. This is
because each component that triggers callbacks can incur a small CPU overhead,
so it has to be turned on explicitly for the components you want to use.
Once enabled, then tempo beat callbacks and timeline callbacks can be added in
blueprints. One way is via the "Assign On Timeline Beat" and "Assign On
Timeline Marker" blueprint actions. For FMOD audio components used in
blueprint actors, you can add events from the details window instead.
You can trigger various actions to occur on the beat or when a timeline hits a
named marker. The event contains the same fields as
FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES and
FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES.
Firelight Technologies FMOD Studio API
Programming Support
Programming with the FMOD Studio plugin
Programmers can interface with FMOD Studio directly. To reference FMOD
Studio, the programmer will need to add the following to their .Build.cs file:
You can use a mixture of FMOD Studio wrapper and FMOD Studio API
functions. For example:
// Call wrapper helper function to create and start an event instance
FFMODEventInstance InstanceWrapper = UFMODBlueprintStatics::PlayEventAtLocation
FMOD::Studio::EventInstance* Instance = InstanceWrapper.Instance;
// Call into FMOD API directly
Instance->setVolume(0.5f);
// The instance handle will be cleaned up automatically when the sound finishes
Further Programming Documentation
For further documentation, see the Programmer Topics section or the API
Reference.
Firelight Technologies FMOD Studio API
Programmer Sounds
FMOD Studio events can include programmer sound modules that are controlled
at runtime. There are a few different ways of hooking them up.
Programmer Sounds via Audio Tables
Note: With this approach, you don't need to do any programming at all!
Audio tables are directories of sounds that are loaded up into a bank file. You
can use audio tables to control localized sounds. To create an audio table, create
a new bank, assign an audio table to it, and then select the directory which will
contain all the sounds you want in the bank.
The "key" for each entry it just the file name without any extension. You can
create multiple banks each pointing to a different directory for each localized
audio you need.
By default, the UE4 integration loads all banks at startup. To avoid that, you can
use the advanced setting "Skip Bank Load Name" and provide a prefix, such as
"Lang_". In the above project, it means the normal banks will be loaded at
startup, but Lang_EN.bank and Lang_JP.bank will be skipped.
Then you can load up one of those banks using blueprint function "Load Bank".
Choosing the audio entry to play
Create an event with a programmer sound module on it. If the module has a
name, then if nothing else is assigned then that sound will be used. For example,
if the sound designer sets the module name as "Welcome", then the audio table
entry "Welcome" will be used by default.
To select at runtime what audio entry to use, set the "Programmer Sound Name"
field in the FMOD audio component.
Be careful to set the name before you play the audio component. If the name is
assigned after the event has started, it may not play the right sound.
Programmer Sounds by Path
Note: With this approach, you can easily play any media file for your event.
You can set up a programmer sound to point directly to a file. To do this, set the
FMOD audio component's "Programmer Sound Name" to the path to the .wav or
.ogg file that you want to load. If this path is relative, it will be looked up
relative to the content directory.
If you do this, you'll need to make sure that directory with the media files is
added to "Directories to Package" in the packaging settings, otherwise it will
work in the editor, but not when packaged into the final game.
Programmer Sounds via API
Note: With this approach, you have the most flexibility for programmers.
If you are writing code, you can programmatically set the FMOD Sound to use
by calling the FMOD audio component function SetProgrammerSound. Here is
an example of setting the sound from code:
void AExampleGameMode::InitAudio(UFMODAudioComponent* AudioComponent)
{
if (AudioComponent)
{
FMOD::Studio::System* System = IFMODStudioModule::Get().GetStudioSystem
FMOD::System* LowLevelSystem = nullptr;
System->getLowLevelSystem(&LowLevelSystem);
Also, when setting the name to an audio table entry, you will need to make sure
the audio table bank is already loaded before the event starts.
The FMOD audio component only supports a single programmer sound per
event. If you want to have an event that has multiple programmer sounds, each
one playing a different sound, then you'll need to create the event directly via the
FMOD API and provide your own callback. You can look at how the FMOD
audio component programmer sound callback works and use that as a base for
your own class.
Firelight Technologies FMOD Studio API
Sequencer Integration
FMOD is integrated into Unreal Engine 4's Sequencer.
1. Ambient sounds already placed in the level may be possessed by the level
sequence. Add ambient sound actors to the sequence by clicking the
button in the Sequencer editor and choosing the ambient sound actor to add.
Alternatively the actor can be dragged from the World Outliner into the
Sequencer editor.
Note: that possessed events will retain any state set by the level sequence
when playack is complete. The level sequence's Restore State setting can be
enabled to restore the state of possessed events (and any other actors
possessed by the level sequence).
2. New events may be spawned from Sequencer. Sequencer can spawn FMOD
events during playback. To create a spawned event drag an FMOD event
from the Content Browser into the Sequencer editor.
Note: that spawned events will not automatically play when spawned.
Keyframes on the event control sub-track can be used to Play or Stop the event.
Parameter Track
Keyframes may be added to the parameter sub-tracks to control the value of the
event parameter during playback of the level sequence. The Unreal Engine 4
curve editor may be used to create rich curves for FMOD event parameters.
Note: that the FMOD UE4 integration is unable to validate the range of
parameter values set by Sequencer. The FMOD studio runtime will clamp any
parameter value outside the range specified in FMOD Studio.
Firelight Technologies FMOD Studio API
Deployment
Package settings
This page describes steps required to prepare your project for deployment. This
is relevant to both the Launch option as well as the File > Package Project menu
item.
Packaging banks
Banks need to be packaged and included in the game data. This can be done by
selecting the Edit > Project Settings... menu item. Navigating to the Packaging
section from the left hand pane, under the Game heading, presents you with
options for specifying directories that include extra assets. There are two ways of
doing this:
We recommend using Directories to Package so that bank files are bundled into
the package file automatically.
Note: that each platform will look for its own type of banks in its own directory.
Make sure you have added the platform to FMOD Studio project. The platforms
are:
If you only have the Desktop banks and want to run on another platform, you
can set "Force Platform Name" to Desktop in the FMOD advanced settings.
Bank Files Inside Content Directory
The above directory name is relative to your Content directory. It is highly
recommended that banks be placed within the Content directory, as paths
outside the Content directory will not deploy correctly to all platforms. For
example:
Mac doesn't allow support directories outside the Content directory at all.
Windows and Android have issues looking up directories outside the
Content directory when used with packages.
This doesn't mean you need to put your whole Studio project inside the Content
directory. You can customize Studio by editing the Preferences and choosing a
directory to export banks to, as described in the Working with Banks page.
Note: The integration will load the platform bank files automatically. On PC it
will load from FMOD/Desktop but on Android and IOS it will look for banks
under FMOD/Mobile.
Note: If you use "FMOD" as the directory to deploy and have multiple platform
banks exported, then they will all be packaged up. To slim down your final
package size, you may need to tweak the Additional Directories setting on a per
platform basis. That way you only package FMOD/Mobile for Android,
FMOD/Desktop for PC, FMOD/PS4 for PS4, etc.
Deploying FMOD audio plugins
If you are using FMOD audio plugins, you will need to make sure they are
deployed as well. See the Using Plugins page for information.
Linking the Integration
For most platforms, the integration should be linked and deployed properly
regardless of whether you have a blueprint or code project. It should just work!
The last thing you will need to do is to get the FMOD .so libraries into a
directory that the executable can read them. The easiest way is to copy them
from
<DeployedDir>\Engine\Plugins\FMODStudio\Binaries\Linux\x86_64
to
<DeployedDir>\<GameName>\Binaries\Linux
To see what directories the .so files can be located, look at LinuxToolChain.cs.
Currently there are only a set of hard coded directories that are supported.
Deployment on Android
To deploy on Android, make sure FMODStudio is in your game's directory, not
in the Engine plugins directory. When FMODStudio is in your game's plugin
directory, the engine will rebuild the plugin for Android and deploy all the files
properly.
FMOD supports DSP plugins, which will be stand-alone .so files that will need
to be packaged into the build. Add the .so file into the
FMODStudio/Binaries/Android/armeabi-v7a directory. Unreal will also need an
APL file so it knows to package the .so file. To do this, you will need to write an
APL file and drop it into the FMODStudio/Binaries/Android directory. The
FMODStudio.build.cs file looks for any file ending with "_APL.xml" and will
pass that along to the unreal build tool for packaging.
The APL is a custom xml file format which is documented in the engine file
"AndroidPluginLanguage.cs". Here is a sample APL file for libovrfmod.so:
<?xml version="1.0" encoding="utf-8"?>
<!--Plugin additions-->
<root xmlns:android="http://schemas.android.com/apk/res/android">
<!-- init section is always evaluated once per architecture -->
<init>
<log text="ovrfmod APL init"/>
</init>
UE4 supports armeabi-v7a, but doesn't support building for other architectures
unless rebuilding the engine from github. Because of this, we only ship that
architecture by default. To get the .so files for other architectures, download the
"Programmers API for Android" package from FMOD, and copy them into the
FMODStudio/Binaries/Android/* directories. FMODStudio has compiled
libraries for armeabi-v7a, arm64-v8a, and x86.
Loading blueprints before plugin load
One issue to be aware of is where blueprints are serialized from disk too early,
before any plugins are loaded. This can occur from the following code, which is
included by default in example C++ projects constructor:
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnClassFinder(TEXT("/Gam
The finder will serialize the first person character blueprint, but any FMOD
references will fail to load since the FMOD plugin has not been created yet. To
make sure that the FMOD plugin is loaded first, add the line of code above the
class finder.
IFMODStudioModule::Get();
Disabling Unreal Audio Device
By default FMOD Studio works side-by-side with the inbuilt Unreal audio
device. To disable the Unreal audio while leaving the FMOD Studio audio, the
standard Unreal ini file setting can be used.
The audio device can be disabled for every platform that you want to ship with.
Enabling Live Update
Note: The default permissions won't allow FMOD to set up a socket properly for
live update. Uncheck the "Enable Live Update" option in FMOD settings to
avoid errors.
Note: If you Launch your game and there is no sound playing or there is error
loading the FMODStudio module, it an issue with Deployment.
Live Update
If Live Update is enabled and the FMOD Studio will error when it fails to open
the required network port. If this is a problem, then Live Update can be disabled
in the Project Settings window.
Additional Logging
To help track down problems, verbose logging can be turned on for the FMOD
integration. Add the following command line to the UE4 editor:
-LogCmds="LogFMOD verbose"
Firelight Technologies FMOD Studio API
Terminology / Basic Concepts
Introduction
Throughout FMOD documentation certain terms and concepts will be used. This
section will explain some of these to alleviate confusion.
It is recommended when you see an API function highlighted as a link, that you
check the API reference for more detail.
Samples vs bytes vs milliseconds
Within FMOD functions you will see references to PCM samples, bytes and
milliseconds.
To understand what the difference is a diagram has been provided to show how
raw PCM sample data is stored in FMOD buffers.
In this diagram you will see that a stereo sound has its left/right data interleaved
one after the other.
"Samples" are good for small sounds that need to be played more than once
at a time, for example sound effects. These generally use little or no CPU to
play back and can be hardware accelerated. See
FMOD_CREATESAMPLE.
"Streams" are good for large sounds that are too large to fit into memory
and need to be streamed from disk into a small ringbuffer that FMOD
manages. These take a small amount of CPU and disk bandwidth based on
the file format. For example MP3 takes more cpu power to decode in real-
time than a PCM decompressed wav file does. A streaming sound can only
be played once at a time, they cannot be spawned multiple times at once
like a sample, due to it only having 1 file handle per stream and 1 ringbuffer
to decode into. See FMOD_CREATESTREAM.
"Compressed samples" are an option that allows the user to load a certain
compressed file format (such as IMA ADPCM, FADPCM, Vorbis, MP2,
MP3, AT9 and XMA formats currently). FADPCM/Vorbis/AT9 are only
supported through the .FSB container format), and leave them compressed
in memory without decompressing them. They are software mixed on the
CPU and don't have the 'once only' limitation of streams. They take more
cpu than a standard PCM sample, but actually less than a stream due to not
doing any disk access and much smaller memory buffers. See
FMOD_CREATECOMPRESSEDSAMPLE.
FMOD will automatically select a channel for the sound to play on, you do not
have to manage your own channels.
Sub-mixing and ChannelGroups
Instead of processing or controlling channels individually, channels can be
grouped into a 'ChannelGroup'. ChannelGroups allow you to operate on a group
of channels at a time, and control the mix graph of the audio.
A ChannelGroup can also be thought of as a 'sub mix', as in the signal chain, this
would be the point that the channel signals mix into a single buffer. This buffer
can then be processed with a DSP effect (see below) once, rather than once for
each channel, saving a lot of CPU time.
2D vs 3D
A 3D sound source is a channel that has a position and a velocity in space. When
a 3D channel is playing, its volume, speaker placement and pitch will be affected
automatically based on the relation to the listener.
A listener is the player, or the game camera. It has a position and velocity like a
sound source, but it also has an orientation.
The listener and the source distance from each other determine the volume.
The listener and the source relative velocity determines the pitch (doppler
effect).
The orientation of the listener to the source determines the pan or speaker
placement.
As the 3D reverb uses the position of the listener in its weighting calculation, we
also need to ensure that the location of the listener is set using
System::set3dListenerAtrributes.
FMOD_VECTOR listenerpos = { 0.0f, 0.0f, -1.0f };
system->set3DListenerAttributes(0, &listenerpos, 0, 0, 0);
All done!
This is all that is needed to get virtual 3d reverb zones to work. From this point
onwards, based on the listener position, reverb presets should morph into each
other if they overlap, and attenuate based on the listener's distance from the 3D
reverb sphere's center.
.
Firelight Technologies FMOD Studio API
3D SOUND
Introduction
This section will introduce you to using 3D sound with FMOD Studio. With it
you can easily implement interactive 3D audio and have access to features such
as 5.1 or 7.1 speaker output, and automatic attenuation, doppler and more
advanced psychoacoustic 3D audio techniques.
For information specific to FMOD Studio Events, see the Studio 3D Events
page.
Loading sounds as '3D'
When loading a sound or sound bank, the sound must be created with
System::createSound or System::createStream using the FMOD_3D flag. ie.
result = system->createSound("../media/drumloop.wav", FMOD_3D, 0, &sound);
if (result != FMOD_OK)
{
HandleError(result);
}
It is generally best not to try and switch between 3D and 2D at all, if you want
though, you can change the sound or channel's mode to
FMOD_3D_HEADRELATIVE at runtime which places the sound always
relative to the listener, effectively sounding 2D as it will always follow the
listener as the listener moves around.
Distance models and linear rolloff vs inverse
Inverse
This is the default FMOD 3D distance model. All sounds naturally attenuate
(fade out) in the real world using a inverse distance attenuation. The flag to set to
this mode is FMOD_3D_INVERSEROLLOFF but if you're loading a sound you
don't need to set this because it is the default. It is more for the purpose or
resetting the mode back to the original if you set it to
FMOD_3D_LINEARROLLOFF at some later stage.
As an example of relative sound sizes, we can compare a bee and a jumbo jet. At
only a meter or 2 away from a bee we will probably not hear it any more. In
contrast, a jet will be heard from hundreds of meters away. In this case we might
set the bee's mindistance to 0.1 meters. After a few meters it should fall silent.
The jumbo jet's mindistance could be set to 50 meters. This could take many
hundreds of meters of distance between listener and sound before it falls silent.
In this case we now have a more realistic representation of the loudness of the
sound, even though each wave file has a fully normalized 16bit waveform
within. (ie if you played them in 2D they would both be the same volume).
The 'maxdistance' does not affect the rate of rolloff, it simply means the
distance where the sound stops attenuating. Don't set the maxdistance to a low
number unless you want it to artificially stop attenuating. This is usually not
wanted. Leave it at its default of 10000.0.
All 3 settings can be set with System::set3DSettings. Generally the user will not
want to set these.
Velocity and keeping it frame rate independent
Velocity is only required if you want doppler effects. Otherwise you can pass 0
or NULL to both System::set3DListenerAttributes and Channel::set3DAttributes
for the velocity parameter, and no doppler effect will be heard.
This must be stressed again. It is important that the velocity passed to FMOD
Studio is meters per second and not meters per frame. Notice the difference. To
get the correct velocity vector, use vectors from physics code etc, and don't just
subtract last frames position from the current position. This is affected by
framerate. The higher the framerate the smaller the position deltas, and therefore
smaller doppler effects, which is incorrect.
If the only way you can get the velocity is to subtract this and last frame's
position vectors, then remember to time adjust them from meters per frame back
up to meters per second. This is done simply by scaling the difference vector
obtained by subtracting the 2 position vectors, by one over the frame time delta.
Here is an example.
velx = (posx-lastposx) * 1000 / timedelta;
velz = (posy-lastposy) * 1000 / timedelta;
velz = (posz-lastposz) * 1000 / timedelta;
timedelta is the time since the last frame in milliseconds. This can be obtained
with functions such as timeGetTime(). So at 60fps, the timedelta would be
16.67ms. if the source moved 0.1 meters in this time, the actual velocity in
meters per second would be:
vel = 0.1 * 1000 / 16.67 = 6 meters per second.
Similarly, if we only have half the framerate of 30fps, then subtracting position
deltas will gives us twice the distance that it would at 60fps (so it would have
moved 0.2 meters this time).
vel = 0.2 * 1000 / 33.33 = 6 meters per second.
Orientation and left-handed vs right-handed
coordinate systems
Getting the correct orientation set up is essential if you want the source to move
around you in 3D space.
By default FMOD uses a left-handed coordinate system. If you are using a right-
handed coordinate system then FMOD must be initialized by passing
FMOD_INIT_3D_RIGHTHANDED to System::init. In either case FMOD
requires that the positive Y axis is up and the positive X axis is right, if your
coordinate system uses a different convention then you must rotate your vectors
into FMOD's space before passing them to FMOD.
Note for plugin writers: FMOD always uses a left-handed coordinate system
when passing 3D data to plugins. This coordinate system is fixed to use +X =
right, +Y = up, +Z = forward. When the system is initialised to use right-handed
coordinates FMOD will flip the Z component of vectors before passing them to
plugins.
A typical game loop
3D sound and the FMOD channel management system need to be updated once
per frame. To do this use System::update.
} while (gamerunning);
Most games usually take the position,velocity and orientation from the camera's
vectors and matrix.
Stereo and multichannel sounds can be 3D!
A stereo sound when played as 3d, will be split into 2 mono voices internally
which are separately 3d positionable. Multi-channel sounds are also supported,
so an 8 channel sound for example will allocate 8 mono voices internally in
FMOD. To rotate the left and right part of the stereo 3d sound in 3D space, use
the Channel::set3DSpread function. By default the subchannels position
themselves in the same place, therefore sounding 'mono'.
Split screen / multiple listeners
In some games, there may be a split screen mode. When it comes to audio, this
means that FMOD Studio has to know about having more than 1 listener on the
screen at once. This is easily handled via System::set3DNumListeners and
System::set3DListenerAttributes.
If you have 2 player split screen, then for each 'camera' or 'listener' simply call
System::set3DListenerAttributes with 0 as the listener number of the first
camera, and 1 for the listener number of the second camera.
System::set3DNumListeners would be set to 2.
It turns off all doppler. This is because one listener might be going towards
the sound, and another listener might be going away from the sound. To
avoid confusion, the doppler is simply turned off.
All audio is mono. If to one listener the sound should be coming out of the
left speaker, and to another listener it should be coming out of the right
speaker, there will be a conflict, and more confusion, so all sounds are
simply panned to the middle. This removes confusion.
Each sound is played only once as it would with a single player game,
saving voice and cpu resources. This means the sound's effective audibility
is determined by the closest listener to the sound. This makes sense as the
sound should be the loudest to the nearest listener. Any listeners that are
further away wouldn't have any impact on the volume at this point.
Speaker modes / output
To get 5.1 sound is easy. If the sound card supports it, then any sound using
FMOD_3D will automatically position itself in a surround speaker system, and
only the user has to be sure that the speaker settings in the operating system are
correct so that the sound device can output the audio in 5.1 or 7.1. You do not
need to set the speaker mode for FMOD.
.
Firelight Technologies FMOD Studio API
Asynchronous I/O and deferred file
reading
Introduction
This tutorial will describe how to defer file reading in FMOD so that you don't
have to immediately satisfy FMOD's requests for data.
This sort of behavior is highly desirable in game streaming engines that do not
have access to the data yet, or for when accessing data out of order or in a non
sequential fashion would greatly degrade performance.
FMOD's asynchronous I/O callbacks will allow you to receive an FMOD read
request and defer it to a later time when the game is ready. FMOD will use
priorities to notify the game engine how urgent the read request is, as sometimes
deferring a music stream read for example could result in stuttering audio.
Setup : Override FMOD's file system with callbacks
The idea is that you are wanting to override the file I/O that FMOD normally
performs internally. You may have done this before with the
System::setFileSystem by overriding the following callbacks:
FMOD_FILE_OPENCALLBACK useropen
FMOD_FILE_CLOSECALLBACK userclose
FMOD_FILE_READCALLBACK userread
FMOD_FILE_SEEKCALLBACK userseek
The normal behavior here is that you would need to satisfy FMOD's read and
seek requests immediately in a blocking fashion.
In the open callback, you open your internal file handle and return it to FMOD,
along with the file size.
You would have to set all callbacks or file system override would not work. Any
callback that is null in the above callback list will cause FMOD to use the
default internal system and ignore your callbacks. All callbacks must be set.
With async I/O, there are 2 new callbacks which you can use to replace the
'userread' and 'userseek' callbacks:
FMOD_FILE_ASYNCREADCALLBACK userasyncread
FMOD_FILE_ASYNCCANCELCALLBACK userasynccancel
If these callbacks are set, the 'userread' and 'userseek' callbacks are made
redundant. You can of course keep 'userread' and 'userseek' defined if you want
to switch between the 2 systems for some reason, but when 'userasyncread' is
defined, the normal read/seek callbacks will never be called.
Defining the basics - opening and closing the file
handle.
Before we start, we'll just define the open and close callback. A very simple
implementation using stdio is provided below:
FMOD_RESULT F_CALLBACK myopen(const char *name, unsigned int *filesize, void **
{
if (name)
{
FILE *fp;
fp = fopen(name, "rb");
if (!fp)
{
return FMOD_ERR_FILE_NOTFOUND;
}
fseek(fp, 0, SEEK_END);
*filesize = ftell(fp);
fseek(fp, 0, SEEK_SET);
return FMOD_OK;
}
fclose((FILE *)handle);
return FMOD_OK;
}
Defining 'userasyncread'
The idea for asynchronous reading, is that FMOD will request data (note,
possibly from any thread - so be wary of thread safety in your code!), but you
don't have to give the data to FMOD immediately. You can return from the
callback without giving FMOD any data. This is deferred I/O.
Note that we didnt actually do any read here. You can return immediately and
FMOD will internally wait until the read request is satisfied. Note that if FMOD
decides to wait from the main thread (which it will do often), then you cannot
satisfy the queue from the main thread, you will get a deadlock. Just put the
request onto a queue. We'll discuss how to let FMOD know that the data is ready
in the next section.
Note that the above callback implementation will search through our internal
linked list (in a thread safe fashion), removing any requests from the queue so
that they don't get processed after the Sound is released. If it is in the middle of
reading, then the callback will wait until the read is finished and then return.
Do not return while a read is happening, or before a read happens, as the
memory for the read destination will be freed and the deferred read will read into
an invalid pointer.
Filling out the FMOD_ASYNCREADINFO
structure when performing a deferred read
The FMOD_ASYNCREADINFO is the structure you will pass to your deferred
I/O system, and will be the structure that you read and fill out when fulfilling the
requests.
The structure exposes the features of the async read system. These are:
Priority is supported. FMOD will let the user know if the read is not important,
mildly important, or extremely important. This will allow the user to reshuffle
the queue to make important reads happen before non important reads.
Read completion is signalled by simply setting the 'result' code of
FMOD_ASYNCREADINFO.
Memory does not need to be copied anywhere, you can read directly into
FMOD's pointers which point directly to the internal file buffers.
You do not have to give FMOD all of the data, you can give a partial read
result to the callback and FMOD will most likely just issue another read request
later with a smaller byte value.
typedef struct {
void * handle;
unsigned int offset;
unsigned int sizebytes;
int priority;
void * buffer;
unsigned int bytesread;
FMOD_RESULT result;
void * userdata;
} FMOD_ASYNCREADINFO;
The first 4 members (handle, offset, sizebytes, priority) are read only values,
which tell you about the file handle in question, where in the file it wants to read
from (so no seek callbacks required!) and how many bytes it wants. The priority
value tells you how important the read is as discussed previously.
The next 3 members (buffer, bytesread and result) are values you will fill in,
and to let FMOD know that you have read the data.
Read your file data into buffer. sizebytes is how much you should be reading.
bytesread is how much you actually read (this could be less than sizebytes).
If you hit the 'end of file' condition and need to return less bytes than were
requested - set bytesread to less than sizebytes, and then set the result to
FMOD_ERR_FILE_EOF.
Note! Do not set the result before setting the bytesread value and reading the
data into buffer.
The initial value for result, is going to be FMOD_ERR_NOTREADY. When
you set the value to FMOD_OK (or appropriate error code) then internally
FMOD will immediately see this as an indication to continue, so if the bytesread
or buffer contents are not ready, you will get corruption, errors or unexpected
behaviour.
So to summarize, the last thing you will do before finishing your queue process
is to set result. You will not set it before setting bytesread or filling in buffer.
Threading issues & read priorities
As mentioned earlier in this tutorial, FMOD can call the read callback from
various different threads, so it is common sense to protect your I/O system from
operations happening simultaneously from different threads.
A system that would use FMOD's async I/O feature would most likely be
running in its own thread. This is so the blocking wait loops in FMOD's loading
calls are not forever waiting for data because the user can't provide it to FMOD.
If the system runs in another thread, it can detect the queue insert, and process
the data while FMOD is waiting.
Before we jump into the details lets first consider how performance is measured
in FMOD. The primary metric we use when discussing how expensive
something is, is CPU percentage. We can calculate this by measuring the time
spent performing an action and comparing it against a known time window, the
most common example of this is DSP or mixer performance.
What is the mixer and how is it measured? When we talk about mixer
performance we are actually talking about the production of audio samples being
sent to the output (usually your speakers). At regular intervals our mixer will
produce a buffer of samples which represents a fixed amount of time for
playback. We call this the DSP block size and it often defaults to 512 samples,
when played back at 48KHz it represents ~10ms of audio.
With a fixed amount of samples being produced regularly, we can now measure
how long it takes to produce those samples and receive a percentage. For
example, if it took us 5ms of CPU time to produce 10ms of audio, our mixer
performance would be 50%. As the CPU time approaches 10ms we risk not
delivering the audio in time which results in a audio discontinuity known as
stuttering.
Choosing the correct compression format for the kind of audio you want to play
and the platform you want to play it on is a big part of controlling the CPU cost.
For recommendations on format choice please consult the performance reference
for this platform.
Voice Limiting
Once you've settled on a compression format you need to decide how many
sounds of that format you want to be audible at the same time. There are three
ways you can use to control the number of sounds playable:
For a deep dive into how the virtual voice system works and ways to further
control voice count please consult the virtual voices tutorial.
It's often hard to gauge what are good values to use for the above three settings.
In rough terms maxChannels should be high enough that you don't hit the cap
under normal circumstances, so 256, 512 or even 1024 are reasonable choices.
Selecting the values for numSoftwareChannels and maxCodecs will depend on
the platform and format used. To help choose these values we have provided
some recommendations and benchmarks in the performance reference document
for this platform.
Tips and Tricks
With a correctly configured compression format and appropriate voice count you
are well on your way to an efficiently configured set up. Next up is a series of
tips to consider for your project, not all will be applicable but they should be
considered to get the best performance from FMOD.
Sample Rate
There are two sample rates you need to think about when optimizing, the System
rate and the source audio rate.
To control the source audio rate you can resample using your favorite audio
editor or use the sample rate settings when compressing using the FSBank tool
or the FSBankLib API. All audio will be sent to a resampler when it is played at
runtime, if the source sample rate and the System rate match then the resampler
can be essentially skipped saving CPU time. Be aware that this will only happen
if there are no pitch / frequency settings applied to the Channel, so this trick is
often good for music.
As mentioned earlier this represents a fixed amount of samples that are produced
regularly to be sent to the speakers. When producing each block of samples there
is a fixed amount of overhead, so making the block size larger reduces the
overall CPU cost. You can control this setting with
System::setDSPBufferSize(blockLength, ...), which often defaults to 512 or 1024
samples depending on the platform.
The trade off with this setting is CPU against mixer granularity, for more
information about the implications of changing this setting please consult the
API reference for that function.
Channel Count
Controlling how many channels of audio are being played can have a big impact
on performance, consider the simple math that 7.1 surround has four times as
much data to process compared with stereo. There are a few different places
where channel count can be controlled to improve performance.
The source sound channel count should be carefully chosen, often mono sources
are best, especially for sound that will be positioned in 3D. Reducing the channel
count at the source is an easy win and will also decrease the decoding time for
that sound.
Setting the System channel count will control how 3D sounds are panned when
they are given a position in the world. You set this channel count by specifying a
speaker mode that represents a well known speaker configuration such as 7.1
surround or stereo. To do this use System::setSoftwareFormat(..., speakerMode,
...), the default will match your output device settings.
As a more advanced setting you can limit the number of channels produced by a
sub-mix or the number of channels entering a particular DSP effect. This can be
especially useful for limiting the channels into an expensive DSP effect. The API
to control this is DSP::setChannelFormat(..., speakerMode), by default this will
be the output of the previous DSP unit.
DSP Choice
Not all DSPs are created equal, some are computationally simple and use very
little CPU, others can be quite expensive. When deciding to use a particular
effect it is important to profile on the target hardware to fully understand the
CPU implications.
Positioning of the DSP can make a big difference, placing the effect on every
voice could cost a lot of CPU time. There are no strict rules for where each effect
should be positioned but to give an example, often low and high pass DSP
effects can be used per voice efficiently, but reverb will often only have one
instance with all voices sending to a sub-mix.
Wrapping Up
Hopefully now you have a good understanding of the options available for
optimizing your usage of FMOD. If in doubt about your particular set up, please
contact [email protected], we are more than happy to discuss your specific
requirements.
Firelight Technologies FMOD Studio API
FMOD Studio DSP Network
Introduction
This section will introduce you to the FMOD Studio advanced DSP system. With
this system you can implement custom filters or create complicated signal chains
to create high quality and dynamic sounding audio. The FMOD Studio DSP
system is an incredibly flexible mixing engine that has an emphasis on quality,
flexibility and efficiency, and makes it an extremely powerful system when used
to its full potential.
The figure below shows a representation of what a very basic FMOD DSP
network looks like.
Audio data flows from the right to the left, until it finally arrives at the
soundcard, fully mixed and processed.
The above image was taken using the FMOD Profiler tool. You can profile your
own DSP network as long as you specify FMOD_INIT_PROFILE_ENABLE
when initializing the low level engine. The tool is located in the /bin directory of
the SDK.
This section will describe the units in more detail, from the origin of the data
through to the soundcard, from right to left. The following list describes some of
the typical DSP units you will see in a graph.
Wavetable Unit This unit reads raw PCM data from the sound buffer and
resamples it to the same rate as the soundcard. A Wavetable Unit is only
connected when the user calls System::playSound. Once resampled, the
audio data is then processed (or flows) at the rate of the soundcard. This is
usually 48khz by default. (22khz on iOS)
DSPCodec Unit This unit reads decodes compressed data from an FMOD
Codec, and passes it to a built in resampler, and then passes the
decompressed result to the output.
Channel Fader This unit provides a top level unit for a Channel to hold
onto, and is a place to insert effects for a Channel. A Channel Fader also
controls the volume level of a Channel, for example if the user calls
Channel::setVolume
ChannelGroup Fader This unit provides a top level unit for a
ChannelGroup to hold onto, and is a place to insert effects for a
ChannelGroup. A ChannelGroup Fader also controls the volume level of a
Channel, for example if the user calls Channel::setVolume
In this section we will look at some basic techniques that can be used to
manipulate DSP network. We shall start with the most basic signal chain (as
shown in the image below) and identify the changes that occur to the DSP
network with the provided code.
Note that the network only exists of 1 unit. The Master ChannelGroup's DSP
Fader Unit (FMOD_DSP_TYPE_FADER). This unit can be used to control the
mix output of the entire mix if desired.
Note now that the new Channel targets the same Master ChannelGroup DSP
Fader unit, and when 2 lines merge into 1 unit, a 'mix' happens. This is just a
summing of the 2 signals together.
In this example we shall add an effect to a sound by connecting a DSP effect unit
to the Channel. The code below starts by playing a sound, then creates a DSP
unit with System::createDSPByType and adds it to the DSP network using
Channel::addDSP.
FMOD::Channel *channel;
FMOD::DSP *dsp_echo;
result = system->playSound(sound, 0, false, &channel);
result = system->createDSPByType(FMOD_DSP_TYPE_ECHO, &dsp_echo);
result = channel->addDSP(0, dsp_echo);
The figure below shows the FMOD Echo effect inserted at the 'Channel head' or
position 0, as specified with the Channel::addDSP command (position = 0). The
Channel Fader which used to be the head unit, is now shuffled down to position
1.
If we call Channel::setDSPIndex
result = channel->setDSPIndex(dsp_echo, 1);
We can see below, that the echo has now moved down one, and Channel Fader is
back at position 0.
Important note! Please don't use this example as a standard way to set up
reverb. Simply call System::setReverbProperties instead and all connection logic
is handled automatically. Note the following logic does not handle what happens
when a voice goes virtual and is removed from the graph, only to return later.
You would only normally use this logic if you wanted to control the 'wet' mix
levels indivudually for an effect, per channel. Otherwise a simple
ChannelGroup::addDSP would suffice.
Note that the ChannelGroup from before is still there. This is what the Channels
will be playing on. The reason we have a ChannelGroup here for this example is
to keep the Channels executing first in the graph, then the reverb second. This
raises a topic called 'order of execution' which you can find more information
about below and way it may or may not be important to you.
Also note that the reverb is black. This means it is inactive / disabled. All units
are inactive by default, so we have to activate them. You can do this with
DSP::setActive
result = dsp_reverb->setActive(true);
Now you can see that the reverb has gone from black/inactive to active.
Now we will play a sound on multiple channels with the following code. The
code plays the sound paused, gets its Channel DSP head unit, adds the Channel
DSP head unit to the reverb, then unpauses the sound.
FMOD::DSP *channel_dsp_head;
result = system->playSound(sound, channelgroup, true, &gChannel[0]);
result = channel->getDSP(FMOD_CHANNELCONTROL_DSP_HEAD, &channel_dsp_head);
result = dsp_reverb->addInput(channel_dsp_head);
result = channel->setPaused(false);
The interesting parts here are that the Channel DSP head units now have 2
outputs per channel, and each set of outputs mix to the user created
ChannelGroup first, before being passed as the 'dry' signal to the output. The
second set of outputs can be considered the 'wet' path and similarly mix to the
reverb unit, before being processed by the reverb processor.
Controlling mix level and pan matrices for DSPConnections
The primary purpose of this object type is to allow the user to control the volume
/ mix level between 2 processing units, and also to control the speaker / channel
mapping between 2 units, so that a signal can be panned, and input signals
mapped to any output signal, in any way that is needed.
Lets go back to the example above, but with 1 voice, and change its wet mix
from the Channel to the reverb from 1.0 (0db) to 0.0 (-80db)
The code around the playsound would have one difference, and that is that
addInput will also take a pointer to the resulting FMOD::DSPConnection object.
FMOD::DSP *channel_dsp_head;
FMOD::DSPConnection *dsp_connection;
result = system->playSound(sound, channelgroup, true, &gChannel[0]);
result = channel->getDSP(FMOD_CHANNELCONTROL_DSP_HEAD, &channel_dsp_head);
result = dsp_reverb->addInput(channel_dsp_head, &dsp_connection);
result = channel->setPaused(false);
You can see there is no signal level in the meter for the reverb, because the only
input to it is silent.
Set the output format of a DSP unit, and control the pan matrix for its
output signal
In this section we will grab the first output from the channel_dsp_head and apply
a pan matrix to it, to allow mapping of input signal to any output speaker within
the mix.
The first thing to note, is that the Channel Fader outputs mono to the
ChannelGroup Fader. This means there's not much to map from and too here.
Any matrix representing this signal will be 1 in and 1 out.
To make it more interesting, we can change the output format of a DSP Unit with
DSP::setChannelFormat.
result = channel_dsp_head->setChannelFormat(0, 0, FMOD_SPEAKER_QUAD);
You will notice that the ChannelFader now outputs 4 channels, and this gets
propagated through the network. A Quad to 5.1 pan has a different default upmix
than mono to 5.1, so you will see that the fronts are now slightly lower on the
final ChannelGroup Fader unit, and there is some signal now introduced into the
Surround Left and Surround Right speakers. Now we will use some code to do
something interesting, we will put the newly quad ChannelFader signal's front 2
channels into the rear 2 speakers of the quad output.
FMOD::DSPConnection *channel_dsp_head_output_connection;
float matrix[4][4] =
{ /* FL FR SL SR <- Input signal (columns)
/* row 0 = front left out <- */ { 0, 0, 0, 0 },
/* row 1 = front right out <- */ { 0, 0, 0, 0 },
/* row 2 = surround left out <- */ { 1, 0, 0, 0 },
/* row 3 = surround right out <- */ { 0, 1, 0, 0 }
};
result = channel_dsp_head->getOutput(0, 0, &channel_dsp_head_output_connection)
result = channel_dsp_head_output_connection->setMixMatrix(&matrix[0][0], 4, 4);
We can now see that the first 2 channels are now silent on the output because
they have 0s in the matrix where the first 2 input columns map to the first 2
output columns.
Instead the first 2 input columns have 1s where the rows map to the surround left
and surround right output speakers.
This has the benefit of not disabling all input units like DSP::setActive with false
as the parameter would, and allows the signal to pass through the reverb unit
untouched (The reverb process function is not called, saving CPU).
Note that many FMOD effects automatically bypass themselves, saving CPU,
after no signal, or silence is detected and the effective 'tail' of the effect has
played out.
The order of execution for a DSP graph is from right to left, but also top to
bottom. Units at the top will get executed before units at the bottom.
Sometimes it is undesirable to have a user created effect execute the DSP units
for the channel, rather than the ChannelGroup it belongs to. This typically
doesn't matter, but one case where it would matter is if the user called
Channel::setDelay on the channel or ChannelGroup::setDelay on a parent
ChannelGroup, to make the sound delay before starting.
The reverb unit has no concept of the delay because the clock it is delaying
against is stored in the ChannelGroup it belongs to.
The result is that the reverb will pull the signal and be audible through the reverb
processor, and the dry path will still be silent because it is in a delay state.
The workaround in the above reverb example, is to attach the reverb to the
master ChannelGroup after the ChannelGroup the Channels will play on is
created, so that the ChannelGroup executes first, and the reverb second.
A second workaround is to stop the reverb pulling data from its inputs. This can
be done by using the FMOD_DSPCONNECTION_TYPE 'type' parameter for
DSP::addInput. If FMOD_DSP_CONNECTION_TYPE_SEND is used instead
of FMOD_DSP_CONNECTION_TYPE_STANDARD, the inputs are not
executed, and all the reverb would do is process whatever is mixed to it from a
previous traversal to the inputs.
The delay will then work, but the downside to this method is that if the reverb is
first, the signal from the channels will be sent after the reverb has processed.
This means it will have to wait until the next mix before it can process that data,
therefore 1 mix block of latency is introduced to the reverb.
Firelight Technologies FMOD Studio API
FMOD Studio Plug-in SDK
Introduction
Game studios and third-party developers can augment FMOD Studio's built-in
suite of effect and sound modules by creating their own plug-ins. By placing
plug-ins in FMOD Studio's plug-ins folder, these can be added to tracks or buses,
modulated and automated by game parameters just like built-in effect and sound
modules.
This document describes how to create plug-ins and make them available to
FMOD Studio and the game. It is recommended you follow along with our
examples found in api/lowlevel/examples/plugins as they are fully implemented
working effects you can use or base your code on.
Accessing Plug-ins in FMOD Studio
A plug-in must be built as a 32-bit dynamic linked library and placed in the plug-
ins folder specified in FMOD Studio's Preferences dialog under the Plug-ins tab.
FMOD Studio scans the folder and all sub-folders both on start-up and when the
folder is changed by the user. Studio tries to load any libraries it finds (*.dll on
Windows or *.dylib on Mac) and ignores libraries which don't support the API.
Detected plug-in sounds will be available via the track context menu in the
Event Editor, whereas detected plug-in effects will show up in the effect deck's
Add Effect and Insert Effect context menus. When a plug-in module is added to
a track or bus, its panel will be displayed in the effect deck. The panel will be
automatically populated with dials, buttons and data drop-zones for each
parameter.
Basics
Two versions of the plug-in will usually be required - one for FMOD Studio and
one for the game.
Studio will require a 32-bit dll or dylib file if running in Windows or Mac
respectively. These will be loaded dynamically in Studio as described in the
previous section.
Another version of the plug-in must be compiled for the game's target platform.
This may also be a dynamic library but, in most cases, can (or must) be a static
library or simply compiled along with the game code. In each case, game code is
required to load the plug-in prior to loading the project or object referencing the
plug-in.
Building a Plug-in
The fmod_dsp.h header file includes all the necessary type definitions and
constants for creating plug-ins including the struct FMOD_DSP_DESCRIPTION
which defines the plug-in's capabilities and callbacks.
Dynamic libraries must be compiled for the same architecture as the host
(whether FMOD Studio or the game), so if the game is 64-bit, the game version
of the plug-in must be 64-bit otherwise the plug-in should be 32-bit.
A free tool such as Dependency Walker can be used to verify that the library is
able to be loaded and the proper symbol is exported. In Windows, the symbol
will look like _FMODGetDSPDescription@0.
In these functions, name refers to the name of the plug-in defined in the plug-ins
descriptor and handle refers to handle returned by
FMOD::System::loadPlugin().
Plug-in Types
Effect Modules
Sound Modules
Both module types are created in the same way - the difference lies in whether
the plug-in processes an audio input.
Effect Modules apply effects to an audio signal, they have an input and an
output. Effect Modules can be inserted anywhere in FMOD Studio's signal
routing, whether it be on an Event's track or a mixer bus. Examples of different
types of plug-in effects include:
Effects which have the same input and output channel counts such as EQ,
compression, distortion etc...
Effects which perform up- or down-mixing as part of the processing
algorithm such as panning or reverb
Spatialization and any distance/direction effects which respond to a sound's
3D location in the game such as 3D panning, distance filtering, early
reflections or binaural audio
Side-chaining effects such as compression or audio modulation (e.g. ring
modulators)
Sound Modules produce their own sound - they do not have an audio input.
Sound modules can be placed on tracks inside Events and can be made to trigger
from the timeline, game parameter or within another sound module.
The Plug-in Descriptor
The plug-in descriptor is a struct, FMOD_DSP_DESCRIPTION defined in
fmod_dsp.h, which describes the capabilities of the plug-in and contains
function pointers for all callbacks needed to communicate with FMOD. Data in
the descriptor cannot change once the plug-in is loaded. The original struct and
its data must stay around until the plug-in is unloaded as data inside this struct is
referenced directly within FMOD throughout the lifetime of the plug-in.
The first member, pluginsdkversion, must always hold the version number of
the plug-in SDK it was complied with. This version is defined as
FMOD_PLUGIN_SDK_VERSION. The SDK version is incremented whenever changes
to the API occur.
The following two members, name and version, identify the plug-in. Each plug-
in must have a unique name, usually the company name followed by the product
name. Version numbers should not be included in the name in order to allow for
future migration of saved data across different versions. Names should not
change across versions for the same reason. The version number should be
incremented whenever any changes to the plug-in have been made.
Here is a code snippet from the FMOD Gain example which shows how to
initialize the first five members of FMOD_DSP_DESCRIPTION:
FMOD_DSP_DESCRIPTION FMOD_Gain_Desc =
{
FMOD_PLUGIN_SDK_VERSION,
"FMOD Gain", // name
0x00010000, // plug-in version
1, // number of input buffers to process
1, // number of output buffers to process
...
};
In the FMOD Gain example, two gains are stored: target gain and current gain.
target gain stores the parameter value which is set and queried from the host
thread. This value is then assigned to current gain at the start of the audio
processing callback and it is current gain that is then applied to the signal.
FMOD Gain shows how this method can be used to perform parameter ramping
by not directly assigning current gain but interpolating between current gain and
target gain over a fixed number of samples so as to minimize audio artefacts
during parameter changes.
Plug-in Parameters
Plug-in effect and sound modules can have any number of parameters. Once
defined, the number of parameters and each of their properties cannot change.
Parameters can be one of four types:
floating-point
integer
boolean (two-state)
data
Common to each parameter type are the members name and units, as well as
description which should describe the parameter in a sentence or two. The
type member will need to be set to one of the four types and either of the
floatdesc, intdesc, booldesc or datadesc members will need to specified. The
different parameter types and their properties are described in more detail the
sections below.
Floating-point Parameters
These are preferred over other denominations (such as kHz for cut-off) as they
are recognised by Studio therefore allowing values to be displayed in a more
readable and consistent manner. Unitless 0-to-1 parameters should be avoided in
favour of dB if the parameter describes a gain, % if it describes a multiplier, or a
unitless 0-to-10 range is preferred if describing a generic amount.
Integer Parameters
Boolean Parameters
Data Parameters
extern "C"
{
The above code also works for plugins with a single definition. In that case, the
count is always 1 and System::getNestedPlugin returns the same handle as
passed in.
Firelight Technologies FMOD Studio API
Handle System
Introduction
The FMOD Studio and Low Level API returns pointers to types. Some of these
types are actually implemented as an underlying handle with the handle data
represented to the user as a pointer type. This section explains the underlying
representation and lifetime of these objects.
General Information
All FMOD types, whether they are represented internally via pointer or handle,
look like a pointer type. No matter the type, a null pointer will never be returned
as a valid result, but it is not safe to assume anything else about the pointer
value. The user should not assume that the pointer value falls in any particular
address range, or that it has any zero bits in the bottom of the pointer value
address.
All FMOD types are equivalent for both the C and C++ API. It is possible to cast
between the appropriate types by re-interpreting the pointer type directly.
Low Level Channels
FMOD Channels are returned to the user as a pointer but actually consist of
packed handle data. This allows channels to be re-used safely. When channels
are stolen and re-used, then the API will return
FMOD_ERR_INVALID_HANDLE. Internally FMOD can detect the difference
between channels and channel groups because the bit pattern of channels always
has 1 in the lowest significant bit, whereas channel groups have 0 in the lowest
bit.
Low Level Channel Groups
FMOD Channel Groups are returned to the user directly as a pointer. Once the
user destroys a channel group, it is not safe to call FMOD functions with that
pointer.
Low Level System
FMOD system object is returned to the user directly as a pointer. Once the user
destroys the low level system, is is not safe to call FMOD functions with that
pointer.
Studio Types
FMOD Studio types are returned to the user as a pointer but actually consist of
packed handle data. If the underlying type has been destroyed then the API will
return FMOD_ERR_INVALID_HANDLE. An example of this would be
unloading a Studio::Bank and then referencing a Studio::EventDescription
belonging to that bank.
Firelight Technologies FMOD Studio API
Lossy audio formats: quality,
multichannel and looping
Quality and bit rate
What is the relationship between bit rate and the 'compression quality' property?
Within FMOD Designer, the compression quality property is found in the wave
bank property panel. In FSBankEx the quality property is in the format options.
The relationship between bit rate and the compression quality property (when
dealing with constant bit rate compression), is appropriately:
This is the case for MP2/MP3 but may differ for XMA and other bitrate based
formats.
Bit rates and sample rates for MPEG data
The following table shows the available bit rates and sample rates available for
MPEG data within FMOD:
Note! This is the MPEG version, not the 'layer' version. Layer 2 and 3 are
commonly known as MP2/MP3. MP3 for example could be MPEG 1 or 2, but is
still 'layer 3'
Both MP2 support and MP3 support share the same MPEG versions and
bitrate/samplerate capabilities.
MPEG MPEG
MPEG MPEG
1 2
1 2
Sample Sample
Bitrates Bitrates
rates rates
(kbps) (kbps)
(kHz) (kHz)
32 32 8* 8*
48 44.1 16 11.025*
56 48 24 12*
64 32 16
80 40 22.05
96 48 24
112 56
128 64
160 80
192 96
224 112
256 128
320 144
384 160
* Note that the crossed out values are not supported by FSBankEx even though
they are specified as part of the MPEG format specification.
Should the user attempt to use a sample rate not listed, FMOD will automatically
resample the file (upwards) to the next valid sample rate. For example, a file
with a sample rate of 15kHz will be resampled to 16hHz.
Multi-channel MPEG Encoding
FMOD is able to create MPEG files with up to 16 channels (eight stereo pairs).
To do this, the build process:
Encodes each stereo pair into fixed sized MPEG frames. The size of the
frames is determined by the bit rate. The size of the frame must be a multiple of
16 bytes. To insure this, a pad of 0 to 15 bytes is placed at the end of each frame.
Interleaves a frame from each stereo pair into a multi-channel frame.
For example, let's consider a six-channel MPEG file using a constant bit rate of
128 kbps. The six channels are encoded into three stereo pairs. Each frame of
stereo MPEG data is 432 bytes (including a 14 byte buffer). FMOD interleaves
the stereo frames every 432 bytes into a multi-channel MPEG frame. The size of
the multi-channel MPEG frame can be calculated as frame size * Number of
stereo pairs. In this example, the multi-channel MPEG frame is 432 * 3, giving
864 bytes.
Encoding mp3 files for seamless looping
Typically when an mp3 file is looped, an audible gap can be heard when
playback loops back to the start. This gap is obvious when the loop requires a
sample accurate stitching from the last sample to the first. This occurs for a
number of reasons, the two major factors being:
MPEG 1 layer 3 encodes the audio data into frames of 1152 samples. If the
audio data doesn't fill a frame (most importantly the last frame), the encoder will
pad the frame with silent samples (some encoder will add an entire silent frame!)
The decoding of an mp3 frame is dependent on the previous frame. When a
loop occurs, the decoder will require data from the last frame to smoothly loop
back to the first frame.
Without special encoding, it is not possible for mp3 data to loop seamlessly -
fortunately FMOD does provide a method to do just that! The FMOD mp3
encoder can be accessed via FMOD Designer or FSBankEx. For Designer users,
the special encoder is automatically used if the sound definition instance is set to
loop and the wave bank compression property to 'MP3'. Note: if the sound
definition instance is set to 'one-shot' the standard mp3 encoding is used. Users
of the lower level API can specify the FSBankEx to encode mp3 data for
seamless looping.
Firstly, FMOD's encoder will resample and stretch the last frame to ensure that
all 1152 samples of the frame are used. This will ensure the frame is not padded
with silent samples.
When used on some sources, this process may cause a slightly audible pitch
change artifact. If this is the case, user are encouraged to repeat the audio within
the file to increase the file size, so the time stretch distance becomes less
significant. Users may also resize the length of their audio to a multiple of the
frame size. The table below lists the frame size for various formats.
Frame size
Format
(samples)
MPEG 1 1152
MPEG 2 (2.5) 576
XMA 2048
VAG 28
GCADPCM 36
With the removal of any padding within the last frame, FMOD's encoder must
then prime the first frame with data from the last frame. The last frame is then
removed. This allows FMOD's decoder to avoid issues of frame dependency
between the first and last frame and provide a seamless loop.
In most situations FMOD's encoder and decoder will perform perfect looping of
mp3 content. However some audible artifacts can be introduced, this is
illustrated below.
Figure
2: Encoding MPEG frames for seamless looping
When the first frame contains silence and the last frame contains an audible
signal, the interpolation used in priming the first frame will result in an audible
'pop'. Should users require silence in the first frame of their loop, they should:
The XMA encoder allows the Sound Designer to specify a quality setting
between 1 and 100, where:
1 provides the highest compression level and the lowest quality, and
100 provides the lowest compression level and the highest quality.
Note that this uses malloc. On Xbox 360 and Xbox you must use a different
operating system alloc such as XPhysicalAlloc otherwise FMOD may not
behave correctly. See "Platform specific issues" tutorials for more information
on this.
Note that this function allows you to specify your own callbacks for alloc and
free. In this case the memory pool pointer and length must be NULL. The 2
features are mutually exclusive.
Lowering sound instance overhead.
The FMOD_LOWMEM flag is used for users wanting to shave some memory
usage off of the sound class.
This flag removes memory allocation for certain features like the 'name' field
which isn't used often in games. When this happens, Sound::getName will return
"(null)".
More memory will be stripped from the sound class in future versions of FMOD
Studio when this flag is used. Currently the 'name' field is the biggest user of
memory in the sound class so this has been removed first.
Using compressed samples.
To trade CPU usage vs Memory, FMOD Studio has a feature to play ADPCM,
XMA and MP2/MP3 data compressed, without needing to decompress it to PCM
first. This can save a large amount of memory.
On XBox 360, using this for XMA files incurs next to no extra CPU usage, as
the Xbox 360 XMA hardware decoder does the data decompression in realtime.
To enable this use the FMOD_CREATECOMPRESSEDSAMPLE flag. If this
flag is used for formats other than the ones specified above, it will be ignored.
Now the sound will open in the background, and you will get a handle to the
sound immediately. You cannot do anything with this sound handle except call
Sound::getOpenState. Any other attempts to use this sound handle will result in
the function returning FMOD_ERR_NOTREADY.
Getting a callback when the sound loads.
When the sound loads or the stream opens, you can specify a callback using the
nonblockcallback member of the FMOD_CREATESOUNDEXINFO structure
that is called when the operation is completed.
Firstly the callback definition.
FMOD_RESULT F_CALLBACK nonblockcallback(FMOD_SOUND *sound, FMOD_RESULT result)
{
FMOD::Sound *snd = (FMOD::Sound *)sound;
return FMOD_OK;
}
memset(&exinfo;, 0, sizeof(FMOD_CREATESOUNDEXINFO));
exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.nonblockcallback = nonblockcallback;
do
{
FMOD_OPENSTATE state;
GameCode();
} while (1)
or
do
{
if (!channel)
{
result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &ch
if (result != FMOD_ERR_NOTREADY)
{
ERRCHECK(result);
}
}
GameCode();
} while (1)
memset(&exinfo;, 0, sizeof(FMOD_CREATESOUNDEXINFO));
exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.initialsubsound = 1;
If the parent sound was opened using FMOD_NONBLOCKING, then it will set
the subsound to be FMOD_OPENSTATE_SEEKING and it will become not
ready again until the seek and stream buffer flush has completed.
When the stream is ready and System::playSound is called, then the playsound
will not stall and will execute immediately because the stream has been flushed.
Firelight Technologies FMOD Studio API
REVERB NOTES
Introduction
This section will discuss FMOD's reverb parameters focusing on the software
(SFX) implementation.
As with most reverberation models, the response is split into sections. This
implementation has early reflections and late reverberation, each of which are
composed of sets of delay lines having different delay and decay characteristics.
Note: Should you want to model multiple reverbs types within an environment
without the extra resource expense of multiple physical reverbs, see the 3D
reverb tutorial, which covers automated 3D reverb zones using single reverb
instance.
In the FMOD Studio UI you would typically allow the sound designer to set up
their own reverbs on group buses, and use sends and mixer snapshots to allow
the sound designer to control the reverb mix for events.
Setting up the reverbs
Below is an example of setting up four reverb instances. You do not need to
explicitly create the extra reverb instance DSP objects - the FMOD Studio
engine creates them and connects them to the DSP Network when you reference
them.
We then supply the 'instance' parameter to set which reverb DSP unit will be
used for each preset, whilst calling the System::setReverbProperties function.
result = system->setReverbProperties(0, &prop1);
result = system->setReverbProperties(1, &prop2);
result = system->setReverbProperties(2, &prop3);
result = system->setReverbProperties(3, &prop4);
Getting the REVERB properties
Should you wish to get the current System reverb properties, you must specify
the instance number in the 'instance' parameter when calling
System::getReverbProperties. In this example we will get the properties for
Instance 3.
FMOD_REVERB_PROPERTIES prop = { 0 };
result = system->getReverbProperties(3, &prop);
Setting the wet/dry mix per Channel
Each channel of the FMOD Studio mixer can set their wet/dry mix for each
reverb with Channel::setReverbProperties.
By default a channel will send to all instances. This example sets the instance 1
send value to linear 0.0 (-80 db) (off).
result = channel->setReverbProperties(1, 0.0f);
To get the reverb mix level to be full volume again, simply set it to 1 (0db)
result = channel->setReverbProperties(1, 1.0f);
Audibility Calculation
The virtual voice system automatically takes into account the following when
calculating audibility:
The priority of the channel. See the "Peak Volume" section for more
information.
The underlying sound peak volume if available. See the "Sound Priority"
section for more information.
The volume of the channel and any parent channel group, set via
ChannelControl::setVolume.
The volume of any applied fade points, set via
ChannelControl::addFadePoint.
Whether the channel is paused or muted.
The effect of any DSP sends and returns, including the send volume.
The distance effect for DSP panners.
Any DSP that exposes
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN will
contribute to audibility.
Peak Volume
Peak volume is available for sounds that are exported via FSBank as long as the
"Write peak volume" option is enabled. FMOD Studio tool always enables this
flag when exporting banks, so FMOD Studio sounds will always have a peak
volume. If the peak volume is not present (such as a loose wav file), then the
sound will treated as if it had full volume.
Sound Priority
Important sounds should have higher priority and it is up to the user to decide if
some sounds should be more important than others. An example of an important
sound might be a 2D menu or GUI sound or beep that needs to be heard above
all other sounds. Avoid using too many priority levels in a fine-grained way. If a
sound has a higher priority it will never be stolen, even if it is very quiet
compared to a lower priority sound.
VOL0 Virtual
To set the number of virtual voices FMOD will use, call System::init with the
number of virtual voices specified in the maxchannels parameter. To set the
number of software mixed channels available, use System::setSoftwareChannels.
A further limit is available per codec by using FMOD_ADVANCEDSETTINGS.
If the virtual voice limit is hit then Channels will be stolen and start returning
FMOD_ERR_INVALID_HANDLE. Channels which have had their handle
stolen in this way are permanently stopped and will never return.
Assuming the number of playing Channels is below the maximum virtual voice
limit, then the channel handle will remain valid, but the Channel may be virtual
or real depending on audibility. The maximum number of real playing channels
will be the limit set by setSoftwareChannels, or the limits of the codecs set with
FMOD_ADVANCEDSETTINGS.
The way the virtual voice system works is that when sounds become real they
resume from their proper place, halfway through the sound. To change this
behaviour, you can either use Sound or Channel priorities to stop it going virtual
in the first place, or you have the option to have a voice start a from the
beginning instead of half way through, by using the
FMOD_VIRTUAL_PLAYFROMSTART flag with System::createSound,
System::createStream, Sound::setMode or Channel::setMode.
Another option is to simply call Channel::isVirtual and stop the sound, but don't
do this until after a System::update! After System::playSound, the virtual voice
sorting needs to be done in System::update to process what is really virtual and
what isn't.
FMOD Studio API Voice Control
FMOD Studio API provides further ways of limiting playing voices on top of the
system provided by the Low Level, by using event polyphony. The sound
designer can specify a limit to the number of simultaneously playing instances of
an event at once. There are currently two modes for event polyphony - voice
stealing on or off.
In this mode, once more instances are playing than the limit, then some will
become virtual. Whether an event has become virtual can be queried with
Studio::EventInstance::isVirtual. A virtual event will mute its master channel
group, which will cause any playing Channels to go virtual if
FMOD_INIT_VOL0_BECOMES_VIRTUAL has been specified. Event
virtualization is determined by the following factors:
An event which is virtual may become real at a later time if the audibility
increases compared to the other playing instances.
In this mode, once the instance limit has been met, further instances will not
play. Instances can still be created, and Studio::EventInstance::start can be
called, but they will not actually play. Querying
Studio::EventInstance::getPlaybackState will show that the extra instances are
not in the playing state. Once instances fail to play then they will not start at a
later time, regardless of what happens to the other instances. In this mode, event
audibility has no affect on which instances play, it is simply based on which had
Studio::EventInstance::start called first.
Studio Events can affect the Low Level Virtual Voice selection system with the
priority value controlled per-event in the FMOD Studio tool. Any Channels
created by an Event will have the priority value exported from the FMOD Studio
Tool. Unlike the Low Level API, the Studio tool only exposes 5 different values.
This is done deliberately, since priority should not be used in a fine-grained way.
Keep in mind that a higher priority voice will never be stolen by a lower priority
voice, even if it is very quiet.
Another factor to keep in mind is that Event Priority is not inherited for nested
events. It is possible to have a very high priority event that has a bunch of low
priority nested events. In that case, the sounds may not play even though
ultimately the parent event is set to a high priority.
Low Level Profiler
The FMOD Low Level profiler tool displays the DSP graph, and can be used to
quickly see which channels have gone virtual. Consider the Channel Groups
Example. If we add FMOD_INIT_PROFILE_ENABLE and add a call to
System::setSoftwareChannels with 5, then we see one of the 6 channels has gone
virtual:
Firelight Technologies FMOD Studio API
SRS Surround sound
How to enable SRS 5.1 Surround Sound encoding in
FMOD
FMOD Studio uses SRS downmixing automatically, if the software mixer is 5.1
(FMOD_SPEAKERMODE_5POINT1), and the user's output speaker mode is
stereo.
If the speaker mode is not 5.1 in the mixer, the mixer will match its speaker
mode to that of the output, so SRS downmixing will never be used. In this case,
for 3d sound (Vector based amplitude panning) VBAP will be used between 2
speakers only, and no rear speaker support will be activated from a Prologic/SRS
decoder.
License for SRS 5.1 Surround Sound Encoder to
Customers
The SRS 5.1 Surround Sound Encoder for FMOD features SRS’ advanced
matrix surround sound processing engine. The SRS surround engine is a highly
versatile multichannel audio encode system capable of supporting a wide range
of surround sound creation and playback applications. With SRS 5.1 Surround
Sound, surround sound is made available without sacrificing the 2-channel reach
and experience.
SRS 5.1 Surround Sound Encoder provides the capability to encode up to 6.1
channels of audio for transmission or storage over two output channels or
standard two-channel carriers. SRS 5.1 Surround Sound Encoder can be listened
to in stereo or decoded TVs, PCs, receivers, mobile phones and other CE devices
with SRS technologies. SRS 5.1 Surround Sound is also backward compatible
with all matrix decoders, such as Dolby Pro Logic® and Dolby Pro Logic Il®,
with playback performance subject to the limitations of the specific decoder.
For more information on producing content in SRS 5.1 Surround Sound, please
visit the SRS website at:
http://surround.srslabs.com/
For technical questions on producing content in SRS 5.1 Surround Sound, please
e-mail to SRS at [email protected]
3. Rights to Use of the SRS 5.1 Surround Sound Encoder and Logo
Please note that, to use the SRS 5.1 Surround Sound Encoder included by
FMOD, you are required to register with SRS at http://surround.srslabs.com/. To
register with SRS, you will be required to provide your company name, contact
information and title(s) of games developed using the SRS 5.1 Surround Sound
Encoder if available. Your information will enable SRS to better support your
technical requirements as needed and if applicable, refer to your game title(s) in
SRS’ marketing materials.
In the same registration web page, you will find a trademark license agreement
for your right to use the SRS 5.1 Surround Sound Logo. You must accept the
trademark license agreement prior to using the SRS 5.1 Surround Sound Logo
Firelight Technologies FMOD Studio API
Threads and Thread Safety
Introduction
This section will describe the threads FMOD uses, and the thread safety offered
by both the Studio API and the Low Level API.
FMOD Thread Types
Studio Thread
This thread processes all Studio API commands and updates Studio events. It is
created during Studio::System::initialize by default, unless
FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE is specified as a init flag.
Mixer Thread
This thread is the software mixing thread. This is the thread that does the real
work of mixing the DSP graph. It is created at System::init.
Stream Thread
This thread is used for decoding streams. It is created the first time a sound is
loaded as a stream in System::createSound with FMOD_CREATESTREAM, or
System::createStream.
This thread is created the first time a sound is loaded with the
FMOD_NONBLOCKING flag in System::createSound.
This thread is used for reading from disk for streams, to then be decoded
(decompressed) by the Stream thread. It is created the first time a sound is
loaded as a stream in System::createSound with FMOD_CREATESTREAM, or
System::createStream.
Thread Affinity
On some platforms, FMOD thread affinity can be customised. See the platform
specific Basic Information page for more information.
FMOD Callback Types
FMOD File and memory callbacks can possibly be called from an FMOD
thread. Remember that if you specify file or memory callbacks with FMOD, to
make sure that they are thread safe. FMOD may call these callbacks from other
threads.
FMOD Thread Safety
FMOD Studio API Thread Safety
By default FMOD Studio API is completely thread safe and all commands will
execute on the Studio thread. In the case of functions that return handles to the
user, the handle will be valid as soon as the function returns it, and all functions
using that handle will be available. Therefore, the fact that the commands have
been delayed should be completely transparent to the user.
By default FMOD Low Level API is initialized to be thread safe, which means
the API can be called from any game thread at any time. Low Level thread
safety can be disabled with the FMOD_INIT_THREAD_UNSAFE flag in
System::init or Studio::System::initialize. The overhead of thread safety is that
there is a mutex lock around the public API functions and (where possible) some
commands are enqueued to be executed the next system update. The cases where
it is safe to disable thread safety are:
The game is using FMOD Studio API exclusively, and never issues Low
Level calls itself.
The game is using FMOD Low Level exclusively, and always from a single
thread at once.
The game is using FMOD Studio API and Low Level at the same time, but
FMOD Studio is created with
FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE and the Low Level
calls are done in the same thread as the FMOD Studio calls.
Firelight Technologies FMOD Studio API
Spatial Audio
Introduction
Historically audio spatialization (the process of taking an audio file and making
it sound "in the world") has been all about positioning sound in speakers
arranged on a horizontal plane. This arrangement is often seen in the form of 5.1
or 7.1 surround. With the advancement of VR technology more emphasis has
been put on making sound as immersive as the visuals. This is achieved by more
advanced processing of the audio signals for the traditional horizontal plane as
well as the introduction of height spatialization. This has given the rise of the
term "spatial audio" which focuses on this more realistic approach to
spatialization.
Within FMOD there are several ways you can achieve a more immersive
spatialization experience, depending on your target platform some may or may
not apply. The following sections outline a few general approaches with specific
implementation details contained within.
Channel based approach
The most traditional way to approach spatialization is by panning signal into
virtual speakers, so with the introduction of 7.1.4 (7 horizontal plane speakers, 1
sub-woofer, 4 roof speakers) you can do just this.
To take an existing horizontal plane signal and push it into the ceiling plane you
can create an FMOD spatializer and adjust the height controls.
Not only will this let you blend to the 0.0.4 ceiling speakers by setting the value
between 0.0 and 1.0, it will also let you blend from the 0.0.4 ceiling speakers to
the ground plane 7.1.0 by setting the value between 0.0 and -1.0.
Object based approach
To get more discrete spatialization of an audio signal you can use the FMOD
object spatializer, so named because the audio signal is packaged with the
spatialization information (position, orientation, etc) and sent to an object mixer.
Often used to highlight important sounds with strong localization to add interest
to a scene, usually used in-conjunction with the channel based approach, be that
7.1.4 or even simply 5.1 / 7.1.
Once such third party is the Resonance Audio cross-platform suite of plugins
that comes bundled with FMOD. Resonance Audio offers a "Source" plugin
which behaves much like the FMOD object spatializer in that audio is sent out to
an object mixer, however the final signal returns as binaural output at the
"Listener" plugin. Resonance Audio also offers a "Soundfield" plugin for
playing back first order Ambisonic sound fields. For more details about the
usage of Resonance Audio please check out the user guide.
Oculus Spatializer
Coming Soon
dearVR
Steam Audio
G'Audio Craft
OSSIC
RealSpace3D
Usage in FMOD Studio
All of the functionality above has been presented in the context of the lowlevel
FMOD API, however it is also all available (including the plugins) within
FMOD Studio. For more details about the individual components and their
visual representations please read the FMOD Studio manual, for a quick
reference of where each feature applies see below.
Output mode selection: Edit -> Preferences -> Output Device, set Windows
Sonic.
7.1.4 output: Window -> Mixer, select "Master Bus", right click "out" on
the deck, set Surround 7.1.4.
Height control: Use the "height" slider that is part of the deck panner on any
bus configured as 7.1.4.
Object spatialization: Right click the deck for any event, Add effect ->
FMOD Object Spatializer.
Resonance Audio spatialization: Right click the deck for any event, Add
effect -> Plug-in effects -> Google -> Resonance Audio Source.
Note: When using Windows Sonic output you must first be running Windows 10
Creators Update. You must also configure it for your audio device. Right click
the speaker icon in the system tray -> Playback devices -> Right click your
default device -> Properties -> Spatial sound -> Spatial sound format, now
choose your desired spatial technology. FMOD will use your default output
device with the technology you select here.
Firelight Technologies FMOD Studio API
Studio 3D Events
Introduction
This section will introduce you to using 3D sound with FMOD Studio events.
Coordinate systems and handedness
FMOD Studio shares the same coordinate system as the lowlevel API. See 3D
Sound for details.
Updating orientations
The programmer needs to call Studio::System::setListenerAttributes once per
frame for the listener, and to update 3D events with
Studio::EventInstance::set3DAttributes. It is important to update all orientations
before calling Studio::System::update. If some orientations are set before
Studio::System::update and some are set afterwards, then some frames may end
up having old positions relative to others. This is particularly important when
both the listener and the events are moving fast and together - if there a frame
where the listener moves but the event does not it becomes very noticeable.
FMOD Studio 3D Panner
FMOD Studio supports panning events with the FMOD Studio panner on the
master track. If there is no panner, the event is considered 2D and the orientation
has no effect on the event. It is possible to use other sorts of panners by replacing
the FMOD Studio panner with a different type, for example a third party panner.
FMOD Object Panner
The Object panner is a special type of panner that interfaces with Object based
output modes such as Dolby Atmos. These output modes accept mono signals
with a 3D position and do their own panning and mixing to the final speaker
configuration. To use Object panners, the programmer has to specify an output
mode that supports Object based panning otherwise the signal will be mixed
down at the final stage by FMOD.
The benefit of the Object panner is that it allows the sound designer to leverage
Object based technologies. However it does come at a cost, since the signal
leaves the mix at the Object panner and does NOT receive DSP effects on the
parent buses like normal panners do. The Object panner automatically bases its
volume on the combined volumes of parant buses for basic mixing, but no
complex effects can be used. For this reason the mix has to be set up very
carefully with knowledge of the limitations of the Object panning.
It is possible for the sound designer to use a mixture of normal 3D panned events
and Object panned 3D events. Normal events will have signal going through the
mixer hierarchy, and Object based events will have signal that leaves the mix at
the master track. As far as the programming API goes, both sorts of events are
treated exactly the same.
Automatic Parameters
FMOD Studio supports setting automations based on parameters that
automatically update based on position. For example, the sound designer could
add a volume automation based on Distance, with a 2D panning that is
automated on the Direction parameter. The event is still considered 3D in that
case, even if it has no panner on the master track.
Consider the case of an event with three nearby listeners. In this case, listener A
is slightly closer to the event than B, and C is the furthest away, outside the max
distance of the event.
The Studio 3D panner will take listener A and B into account. The gain will be
based off the closest listener distance (in this case, the distance to listener A).
Listener B will have an effect on the panning. However, both A and B agree that
the event is to the front, so the final pan matrix will be towards the front
speakers. Listener C has no effect on the calculation since it is out of range.
Consider this case where listener A and B have moved and now the event is to
the right of A and to the left of B. In this case, the gain will be based of the
closest listener distance (which is B), but the pan matrix will have signal out of
both the left and the right since both listeners have an effect on the mix. If A
moved further away then the contribution of A would diminish and to the signal
would start to come more out of the left speakers. If A moved further enough
away, the signal would smoothly interpolate to just B having an influence on the
panning.
Studio panning for listener weights
For the case of multiple listeners, the doppler is based on the closest listener. If
listener has a weight then it is a combination of the closest listeners up to 100%.
For example if there were three listeners at increasing distance with weight of
60%, 60% and 60%, then the doppler would be calculated from 60% of the first
listener, 40% of the second, and 0% of the third.
Automatic Parameters and multiple listeners
For the case of multiple listeners, the FMOD Studio automatic parameters are
based on the closest listener. If listener has a weight then it is a combination of
the closest listeners up to 100%. For example if there were three listeners at
increasing distance with weight of 60%, 60% and 60%, then the automatic
parameters would be calculated from 60% of the first listener, 40% of the
second, and 0% of the third.
Interface with Low Level API
When calling Studio::System::setNumListeners and
Studio::System::setListenerAttributes, there is no need to call the equivalent
low-level functions System::set3DNumListeners and
System::set3DListenerAttributes. FMOD Studio will pass the information into
the low-level API automatically. That means it is possible to have a mixture of
FMOD Studio 3D Events and low-level 3D Channels playing at the same time.
Firelight Technologies FMOD Studio API
Studio Banks
Introduction
This section explains the concepts of Studio Banks and how loading works.
Bank Layout
The FMOD Studio Bank file contains event metadata and sound data in the one
file.
Loading a bank will load all metadata, which contains information about all the
events, parameters, and other data needed for all events associated with that
bank.
The sound sample data has two different types, normal sample data, and
streaming sound data. Normal sample data can be loaded per event type.
Streaming data is streamed in on demand as events are played, and is never fully
loaded ahead of time. Streaming data is good for music, voice over, and other
sounds which are of a long duration. Whether sound data is streamed or not is set
up by the designer in FMOD Studio and cannot be changed at runtime.
Bank Loading
Banks are loaded by calling Studio::System::loadBankFile. They are unloaded
by Studio::Bank::unload.
As soon as a bank has completed loaded, all the metadata in it can be accessed.
This means that event descriptions can be found with Studio::System::getEvent,
and instances created from those descriptions. The bank loading state can be
queried with Studio::Bank::getLoadingState.
Sample Data
Sample data is loaded from one of the three actions:
Studio::Bank::loadSampleData
Studio::EventDescription::loadSampleData
Studio::EventDescription::createInstance
For cases where most or all of the events may play at any time, then loading
calling Studio::Bank::loadSampleData to load all data up front may be the best
approach. Once the bank sample data has loaded, then all event instances can be
created or destroyed and use that existing data immediately. However, it does
have the highest memory overhead. Repeated calls to
Studio::Bank::loadSampleData are reference counted, and the bank's sample data
is only unloaded when Studio::Bank::unloadSampleData has been called an
equal number of times.
If neither of these API calls have been made, then sample data will be loaded if
instances exist for that event. The sample loading state can be queried with
Studio::EventDescription::getSampleLoadingState. If the event's sample data has
not yet finished, the event can still be started with Studio::EventInstance::start.
However, some sounds play slightly later than usual because the sound data may
not have completed.
The automatic loading of sample data is the simplest approach and uses the least
amount of memory. However it has the following disadvantages:
Sample data will only start loading when the instance is created, which may
be just before Studio::EventInstance::start is called.
Sample data will only stay loaded for as long as at least one instance exists.
For the case of one-shots, this may mean that the sample data is constantly
loaded and unloaded whenever a one-shot plays, which is not a good approach.
For these sort of common sounds, it is better to call
Studio::EventDescription::loadSampleData so the sample data stays in memory
rather than constantly unloading then reloading it.
The three approaches to bank loading can be combined. The sample data will
stay loaded for as long as at least of the three conditions are met.
Idle Pool
For users who don't explicitly load sample data, sounds will be loaded and
unloaded on demand. To help avoid unnecessary file access, there is an idle pool
for recently used sounds. When a sound is no longer needed (e.g due to an event
instance finishing), its sample data will be placed into the idle pool to be reused
later if needed.
By default, the idle pool is set to 256kB in size. This can be customized via the
FMOD_STUDIO_ADVANCEDSETTINGS.idleSampleDataPoolSize field.
Streaming Data
Streaming data is automatically loaded on demand when needed. There is no
API for it since it cannot be preloaded or unloaded.
Strings Bank
The Strings bank is a special bank which contains the string lookup of event path
to GUID. The strings bank functions identically to a normal bank except that it
never contains sample or streaming sound data.
Bank Unload
Banks can be unloaded by calling Studio::Bank::unload. Unloading a bank will
free all sample data, invalidate the events descriptions belonging to that bank,
and destroy associated instances.
Firelight Technologies FMOD Studio API
Studio Thread Overview
Introduction
This section will describe how Studio execution works in regards to threads.
Studio Synchronous Mode
If Studio::System::initialize is called with
FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE, then Studio will be
created in synchronous mode. In this mode, all Studio API commands are
executed during Studio::System::update.
As part of that Studio update, it will automatically call the low level
System::update to ensure that the low level system is updated properly.
The above diagram shows Studio commands being called from the game thread
in Studio. It also shows the low level mixer thread, which is triggered based on
the hardware output device. The low level mixer thread normally has a period of
5ms, 10ms, or 20ms, depending on the platform. It can also be customised with
System::setDSPBufferSize and System::setSoftwareFormat.
When running in this mode, Studio must deal with the fact that the low level mix
can execute at any time. For instance, an event may have two timelocked
instruments that should start at the same time. Studio schedules sounds a mix
block later so that even if the mix jumps in, all scheduled events will occur in the
same mix block.
Studio Asynchronous Mode
The default operation is for Studio to create its own asynchronous thread for
execution. In this mode, Studio API commands are enqueued and executed in the
Studio asynchronous thread. The commands are batched up so that they are only
sent to the asynchronous thread at the end of the next Studio::System::update.
This prevents some Studio commands from executing earlier than others, which
could cause glitches. For instance, if an event position is updated, and the
listener position is updated, those two commands will always be executed
together.
In asynchronous mode, the Studio processing occurs every 20ms and is triggered
off the low level mixer. The low level mix is split into parts, premix, midmix and
postmix. It is the low level premix that executes any enqueued low level
commands and updates DSP clocks. By triggering the asynchronous Studio
processing at the end of the premix, Studio can assume that the mix isn't going to
jump in as the asynchronous update is executing. Unlike the first case, Studio
can also assume that the update will be called in a timely manner, even if the
game's main thread has a framerate spike.
In this mode, it is up to the developer to ensure that commands are not split
across system updates. For example, consider the case where the game thread
issues commands for the worker thread, and the worker thread wakes up
periodically to execute those commands. In that case, the worker thread may
wake up and execute some commands but not others, causing subtle issues with
the sound playback. Instead, the commands to the worker thread should be
batched up to avoid slicing commands. Or even better, just use the inbuilt
asynchronous mode to do the command batching instead.
Firelight Technologies FMOD Studio API
Reference
The following pages contain the complete reference API documentation.
Firelight Technologies FMOD Studio API
Low Level API
Classes Functions
Callbacks
Structures
Defines
Enumerations
Firelight Technologies FMOD Studio API
Classes
System Sound
ChannelControl
Channel
ChannelGroup
SoundGroup
DSP
DSPConnection
Geometry
Reverb3D
Firelight Technologies FMOD Studio API
System
The main object for the FMOD Low Level System.
Functions
System::attachChannelGroupToPort System::attachFileSystem
System::close
System::createChannelGroup
System::createDSP
System::createDSPByPlugin
System::createDSPByType
System::createGeometry
System::createReverb3D
System::createSound
System::createSoundGroup
System::createStream
System::detachChannelGroupFromPort
System::get3DListenerAttributes
System::get3DNumListeners
System::get3DSettings
System::getAdvancedSettings
System::getCPUUsage
System::getChannel
System::getChannelsPlaying
System::getDSPBufferSize
System::getDSPInfoByPlugin
System::getDefaultMixMatrix
System::getDriver
System::getDriverInfo
System::getFileUsage
System::getGeometryOcclusion
System::getGeometrySettings
System::getMasterChannelGroup
System::getMasterSoundGroup
System::getNestedPlugin
System::getNetworkProxy
System::getNetworkTimeout
System::getNumDrivers
System::getNumNestedPlugins
System::getNumPlugins
System::getOutput
System::getOutputByPlugin
System::getOutputHandle
System::getPluginHandle
System::getPluginInfo
System::getRecordDriverInfo
System::getRecordNumDrivers
System::getRecordPosition
System::getReverbProperties
System::getSoftwareChannels
System::getSoftwareFormat
System::getSoundRAM
System::getSpeakerModeChannels
System::getSpeakerPosition
System::getStreamBufferSize
System::getUserData
System::getVersion
System::init
System::isRecording
System::loadGeometry
System::loadPlugin
System::lockDSP
System::mixerResume
System::mixerSuspend
System::playDSP
System::playSound
System::recordStart
System::recordStop
System::registerCodec
System::registerDSP
System::registerOutput
System::release
System::set3DListenerAttributes
System::set3DNumListeners
System::set3DRolloffCallback
System::set3DSettings
System::setAdvancedSettings
System::setCallback
System::setDSPBufferSize
System::setDriver
System::setFileSystem
System::setGeometrySettings
System::setNetworkProxy
System::setNetworkTimeout
System::setOutput
System::setOutputByPlugin
System::setPluginPath
System::setReverbProperties
System::setSoftwareChannels
System::setSoftwareFormat
System::setSpeakerPosition
System::setStreamBufferSize
System::setUserData
System::unloadPlugin
System::unlockDSP
System::update
Remarks
When using FMOD Studio, this system object will be automatically instantiated
as part of Studio::System::initialize.
See Also
Studio::System::getLowLevelSystem
Firelight Technologies FMOD Studio API
System::attachChannelGroupToPort
Route the signal from a channel group into a seperate audio port on the output
driver.
C++ Syntax
FMOD_RESULT System::attachChannelGroupToPort(
FMOD_PORT_TYPE portType,
FMOD_PORT_INDEX portIndex,
FMOD::ChannelGroup *channelgroup,
bool passThru
);
C Syntax
FMOD_RESULT FMOD_System_AttachChannelGroupToPort(
FMOD_SYSTEM *system,
FMOD_PORT_TYPE portType,
FMOD_PORT_INDEX portIndex,
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL passThru
);
C# Syntax
RESULT System.attachChannelGroupToPort(
uint portType,
ulong portIndex,
ChannelGroup channelgroup,
bool passThru = false
);
JavaScript Syntax
System.attachChannelGroupToPort(
portType,
portIndex,
channelgroup,
passThru
);
Parameters
portType
Output driver specific audio port type. See extra platform specific header (if
it exists) for port numbers, i.e. fmod_psvita.h, fmod_wiiu.h, fmodorbis.h
portIndex
Output driver specific index of the audio port
channelgroup
Channel group to route away to the new port
passThru
If true the signal will continue to be passed through to the main mix, if false
the signal will be entirely to the designated port.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note that an FMOD port is a hardware specific reference, to hardware devices
that exist on only certain platforms (like a console headset, or dedicated
hardware music channel for example). It is not supported on all platforms.
See Also
System::detachChannelGroupFromPort
C++ Syntax
FMOD_RESULT System::attachFileSystem(
FMOD_FILE_OPEN_CALLBACK useropen,
FMOD_FILE_CLOSE_CALLBACK userclose,
FMOD_FILE_READ_CALLBACK userread,
FMOD_FILE_SEEK_CALLBACK userseek
);
C Syntax
FMOD_RESULT FMOD_System_AttachFileSystem(
FMOD_SYSTEM *system,
FMOD_FILE_OPEN_CALLBACK useropen,
FMOD_FILE_CLOSE_CALLBACK userclose,
FMOD_FILE_READ_CALLBACK userread,
FMOD_FILE_SEEK_CALLBACK userseek
);
C# Syntax
RESULT System.attachFileSystem(
FILE_OPENCALLBACK useropen,
FILE_CLOSECALLBACK userclose,
FILE_READCALLBACK userread,
FILE_SEEKCALLBACK userseek
);
JavaScript Syntax
System.attachFileSystem(
useropen,
userclose,
userread,
userseek
);
Parameters
useropen
Pointer to an open callback which is called after a file is opened by FMOD.
userclose
Pointer to a close callback which is called after a file is closed by FMOD.
userread
Pointer to a read callback which is called after a file is read by FMOD.
userseek
Pointer to a seek callback which is called after a file is seeked into by
FMOD.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE! Do not use this to 'override' FMOD's file system! That is what
setFileSystem is for. This function is purely for 'snooping' and letting FMOD do
its own file access, but if you want to capture what FMOD is reading you can do
it with this function.
See Also
System::setFileSystem
FMOD_FILE_OPEN_CALLBACK
FMOD_FILE_CLOSE_CALLBACK
FMOD_FILE_READ_CALLBACK
FMOD_FILE_SEEK_CALLBACK
C++ Syntax
FMOD_RESULT System::close();
C Syntax
FMOD_RESULT FMOD_System_Close(FMOD_SYSTEM *system);
C# Syntax
RESULT System.close();
JavaScript Syntax
System.close();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::init
System::release
C++ Syntax
FMOD_RESULT System::createChannelGroup(
const char *name,
FMOD::ChannelGroup **channelgroup
);
C Syntax
FMOD_RESULT FMOD_System_CreateChannelGroup(
FMOD_SYSTEM *system,
const char *name,
FMOD_CHANNELGROUP **channelgroup
);
C# Syntax
RESULT System.createChannelGroup(
string name,
out ChannelGroup channelgroup
);
JavaScript Syntax
System.createChannelGroup(
name,
channelgroup // writes value to channelgroup.val
);
Parameters
name
Label to give to the channel group for identification purposes. Optional (can
be null).
channelgroup
Address of a variable to receive a newly created FMOD::ChannelGroup
object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
See the channel group class definition for the types of operations that can be
performed on 'groups' of channels.
The channel group can for example be used to have 2 seperate groups of master
volume, instead of one global master volume.
A channel group can be used for sub-mixing, ie so that a set of channels can be
mixed into a channel group, then can have effects applied to it without affecting
other channels. By default newly created channel groups are parented to the
system master channel group. Channel groups can be re-parented using
ChannelGroup::addGroup to create a hierarchical mixing layout.
See Also
System::getMasterChannelGroup
Channel::setChannelGroup
ChannelGroup::release
ChannelGroup::addGroup
C++ Syntax
FMOD_RESULT System::createDSP(
const FMOD_DSP_DESCRIPTION *description,
FMOD::DSP **dsp
);
C Syntax
FMOD_RESULT FMOD_System_CreateDSP(
FMOD_SYSTEM *system,
const FMOD_DSP_DESCRIPTION *description,
FMOD_DSP **dsp
);
C# Syntax
RESULT System.createDSP(
ref DSP_DESCRIPTION description,
out DSP dsp
);
JavaScript Syntax
System.createDSP(
description,
dsp // writes value to dsp.val
);
Parameters
description
Address of an FMOD_DSP_DESCRIPTION structure containing
information about the unit to be created. Some members of
FMOD_DSP_DESCRIPTION are referenced directly inside FMOD so the
structure should be allocated statically or at least remain in memory for the
lifetime of the system.
dsp
Address of a variable to receive a newly created FMOD::DSP object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A DSP unit can generate or filter incoming data.
The data is created or filtered through use of the read callback that is defined by
the user.
See the definition for the FMOD_DSP_DESCRIPTION structure to find out
what each member means.
To be active, a unit must be inserted into the FMOD DSP network to be heard.
Use functions such as ChannelGroup::addDSP, Channel::addDSP or
DSP::addInput to do this.
For more information and a detailed description (with diagrams) see the tutorial
on the DSP system in the documentation.
See Also
FMOD_DSP_DESCRIPTION
System::createDSPByType
System::createDSPByPlugin
ChannelGroup::addDSP
Channel::addDSP
DSP::addInput
DSP::setActive
C++ Syntax
FMOD_RESULT System::createDSPByPlugin(
unsigned int handle,
FMOD::DSP **dsp
);
C Syntax
FMOD_RESULT FMOD_System_CreateDSPByPlugin(
FMOD_SYSTEM *system,
unsigned int handle,
FMOD_DSP **dsp
);
C# Syntax
RESULT System.createDSPByPlugin(
uint handle,
out DSP dsp
);
JavaScript Syntax
System.createDSPByPlugin(
handle,
dsp // writes value to dsp.val
);
Parameters
handle
Handle to a pre-existing DSP plugin, loaded by System::loadPlugin.
dsp
Address of a variable to receive a newly created FMOD::DSP object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A DSP unit can generate or filter incoming data.
To be active, a unit must be inserted into the FMOD DSP network to be heard.
Use functions such as ChannelGroup::addDSP, Channel::addDSP or
DSP::addInput to do this.
For more information and a detailed description (with diagrams) see the tutorial
on the DSP system in the documentation.
See Also
System::getNumPlugins
System::getPluginInfo
System::createDSPByType
System::createDSP
ChannelGroup::addDSP
Channel::addDSP
DSP::addInput
DSP::setActive
C++ Syntax
FMOD_RESULT System::createDSPByType(
FMOD_DSP_TYPE type,
FMOD::DSP **dsp
);
C Syntax
FMOD_RESULT FMOD_System_CreateDSPByType(
FMOD_SYSTEM *system,
FMOD_DSP_TYPE type,
FMOD_DSP **dsp
);
C# Syntax
RESULT System.createDSPByType(
DSP_TYPE type,
out DSP dsp
);
JavaScript Syntax
System.createDSPByType(
type,
dsp // writes value to dsp.val
);
Parameters
type
A pre-defined DSP effect or sound generator described by a
FMOD_DSP_TYPE.
dsp
Address of a variable to receive a newly created FMOD::DSP object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A DSP unit can generate or filter incoming data.
To be active, a unit must be inserted into the FMOD DSP network to be heard.
Use functions such as Channel::addDSP, ChannelGroup::addDSP or
DSP::addInput to do this.
For more information and a detailed description (with diagrams) see the tutorial
on the DSP system in the documentation.
Note! Winamp DSP and VST plugins will only return the first plugin of this type
that was loaded!
To access all VST or Winamp DSP plugins the System::createDSPByPlugin
function! Use the index returned by System::loadPlugin if you don't want to
enumerate them all.
See Also
FMOD_DSP_TYPE
System::createDSP
System::createDSPByPlugin
System::loadPlugin
Channel::addDSP
ChannelGroup::addDSP
DSP::addInput
DSP::setActive
C++ Syntax
FMOD_RESULT System::createGeometry(
int maxpolygons,
int maxvertices,
FMOD::Geometry **geometry
);
C Syntax
FMOD_RESULT FMOD_System_CreateGeometry(
FMOD_SYSTEM *system,
int maxpolygons,
int maxvertices,
FMOD_GEOMETRY **geometry
);
C# Syntax
RESULT System.createGeometry(
int maxpolygons,
int maxvertices,
out Geometry geometry
);
JavaScript Syntax
System.createGeometry(
maxpolygons,
maxvertices,
geometry // writes value to geometry.val
);
Parameters
maxpolygons
Maximum number of polygons within this object.
maxvertices
Maximum number of vertices within this object.
geometry
Address of a variable to receive a newly created FMOD::Geometry object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Polygons can be added to a geometry object using Geometry::addPolygon.
A geometry object stores its list of polygons in a structure optimized for quick
line intersection testing and efficient insertion and updating.
The structure works best with regularly shaped polygons with minimal overlap.
Many overlapping polygons, or clusters of long thin polygons may not be
handled efficiently.
Axis aligned polygons are handled most efficiently.
The same type of structure is used to optimize line intersection testing with
multiple geometry objects.
C++ Syntax
FMOD_RESULT System::createReverb3D(
FMOD::Reverb3D **reverb
);
C Syntax
FMOD_RESULT FMOD_System_CreateReverb3D(
FMOD_SYSTEM *system,
FMOD_REVERB3D **reverb
);
C# Syntax
RESULT System.createReverb3D(
out Reverb3D reverb
);
JavaScript Syntax
System.createReverb3D(
reverb // writes value to reverb.val
);
Parameters
reverb
Address of a pointer to a Reverb object to receive the newly created virtual
reverb object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The 3D reverb object is a sphere having 3D attributes (position, minimum
distance, maximum distance) and reverb properties.
The properties and 3D attributes of all reverb objects collectively determine,
along with the listener's position, the settings of and input gains into a single 3D
reverb DSP.
When the listener is within the sphere of effect of one or more 3D reverbs, the
listener's 3D reverb properties are a weighted combination of such 3D reverbs.
When the listener is outside all of the reverbs, no reverb is applied.
In FMOD Ex a special 'ambient' reverb setting was used when outside the
influence of all reverb spheres. This function no longer exists.
In FMOD Studio System::setReverbProperties can be used to create an
alternative reverb that can be used for 2D and background global reverb.
To avoid this reverb intefering with the reverb slot used by the 3D reverb, 2D
reverb should use a different slot id with System::setReverbProperties, otherwise
FMOD_ADVANCEDSETTINGS::reverb3Dinstance can also be used to place
3D reverb on a different physical reverb slot. Use Channel::setReverbProperties
or ChannelGroup::setReverbProperties to turn off reverb for 2D sounds (ie set
wet = 0).
Creating multiple reverb objects does not impact performance. These are 'virtual
reverbs'. There will still be only 1 physical reverb DSP running that just morphs
between the different virtual reverbs.
Note about physical reverb DSP unit allocation. To remove the DSP unit and the
associated CPU cost, first make sure all 3D reverb objects are released. Then call
System::setReverbProperties with the 3D reverb's slot ID (default is 0) with a
property point of 0 or NULL, to signal that the physical reverb instance should
be deleted.
If a 3D reverb is still present, and System::setReverbProperties function is called
to free the physical reverb, the 3D reverb system will immediately recreate it
upon the next System::update call.
Note that the 3D reverb system will not affect Studio events unless it is explicitly
enabled by calling Studio::EventInstance::setReverbLevel on each event
instance.
See Also
Reverb3D::release
System::setReverbProperties
System::getReverbProperties
FMOD_ADVANCEDSETTINGS
System::update
C++ Syntax
FMOD_RESULT System::createSound(
const char *name_or_data,
FMOD_MODE mode,
FMOD_CREATESOUNDEXINFO *exinfo,
FMOD::Sound **sound
);
C Syntax
FMOD_RESULT FMOD_System_CreateSound(
FMOD_SYSTEM *system,
const char *name_or_data,
FMOD_MODE mode,
FMOD_CREATESOUNDEXINFO *exinfo,
FMOD_SOUND **sound
);
C# Syntax
RESULT System.createSound(
string name,
MODE mode,
out Sound sound
);
JavaScript Syntax
System.createSound(
name_or_data,
mode,
exinfo,
sound // writes value to sound.val
);
Parameters
name_or_data
Name of the file or URL to open encoded in a UTF-8 string, or a pointer to
a preloaded sound memory block if
FMOD_OPENMEMORY/FMOD_OPENMEMORY_POINT is used. For
CD playback the name should be a drive letter with a colon, example "D:"
(windows only).
mode
Behaviour modifier for opening the sound. See FMOD_MODE. Also see
remarks for more.
exinfo
Pointer to a FMOD_CREATESOUNDEXINFO which lets the user provide
extended information while playing the sound. Optional. Specify 0 or
NULL to ignore.
sound
Address of a variable to receive a newly created FMOD::Sound object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Important! By default (FMOD_CREATESAMPLE) FMOD will try to load and
decompress the whole sound into memory! Use FMOD_CREATESTREAM to
open it as a stream and have it play back in realtime!
FMOD_CREATECOMPRESSEDSAMPLE can also be used for certain formats.
To account for slow devices or computers that might cause buffer underrun
(skipping/stuttering/repeating blocks of audio), use
System::setStreamBufferSize.
To play WMA files on Windows, the user must have the latest Windows media
player codecs installed (Windows Media Player 9). The user can download this
as an installer (wmfdist.exe) from www.fmod.org download page if they desire
or you may wish to redistribute it with your application (this is allowed). This
installer does NOT install windows media player, just the necessary WMA
codecs needed.
JavaScript only :
C++ Syntax
FMOD_RESULT System::createSoundGroup(
const char *name,
FMOD::SoundGroup **soundgroup
);
C Syntax
FMOD_RESULT FMOD_System_CreateSoundGroup(
FMOD_SYSTEM *system,
const char *name,
FMOD_SOUNDGROUP **soundgroup
);
C# Syntax
RESULT System.createSoundGroup(
string name,
out SoundGroup soundgroup
);
JavaScript Syntax
System.createSoundGroup(
name,
soundgroup // writes value to soundgroup.val
);
Parameters
name
Name of sound group.
soundgroup
Address of a variable to receive a pointer to a sound group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Once a SoundGroup is created, Sound::setSoundGroup is used to put a sound in
a SoundGroup.
See Also
SoundGroup::release
Sound::setSoundGroup
C++ Syntax
FMOD_RESULT System::createStream(
const char *name_or_data,
FMOD_MODE mode,
FMOD_CREATESOUNDEXINFO *exinfo,
FMOD::Sound **sound
);
C Syntax
FMOD_RESULT FMOD_System_CreateStream(
FMOD_SYSTEM *system,
const char *name_or_data,
FMOD_MODE mode,
FMOD_CREATESOUNDEXINFO *exinfo,
FMOD_SOUND **sound
);
C# Syntax
RESULT System.createStream(
string name,
MODE mode,
out Sound sound
);
JavaScript Syntax
System.createStream(
name_or_data,
mode,
exinfo,
sound // writes value to sound.val
);
Parameters
name_or_data
Name of the file or URL to open encoded in a UTF-8 string.
mode
Behaviour modifier for opening the sound. See FMOD_MODE. Also see
remarks for more.
exinfo
Pointer to a FMOD_CREATESOUNDEXINFO which lets the user provide
extended information while playing the sound. Optional. Specify 0 or
NULL to ignore.
sound
Address of a variable to receive a newly created FMOD::Sound object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note that a stream only has 1 decode buffer and file handle, and therefore can
only be played once. It cannot play multiple times at once because it cannot
share a stream buffer if the stream is playing at different positions.
Open multiple streams to have them play concurrently.
To account for slow devices or computers that might cause buffer underrun
(skipping/stuttering/repeating blocks of audio), use
System::setStreamBufferSize.
C++ Syntax
FMOD_RESULT System::detachChannelGroupFromPort(
FMOD::ChannelGroup *channelgroup
);
C Syntax
FMOD_RESULT FMOD_System_DetachChannelGroupFromPort(
FMOD_SYSTEM *system,
FMOD_CHANNELGROUP *channelgroup
);
C# Syntax
RESULT System.detachChannelGroupFromPort(
ChannelGroup channelgroup
);
JavaScript Syntax
System.detachChannelGroupFromPort(
channelgroup
);
Parameters
channelgroup
Channel group to route away back to the default audio port
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::attachChannelGroupToPort
C++ Syntax
FMOD_RESULT System::get3DListenerAttributes(
int listener,
FMOD_VECTOR *pos,
FMOD_VECTOR *vel,
FMOD_VECTOR *forward,
FMOD_VECTOR *up
);
C Syntax
FMOD_RESULT FMOD_System_Get3DListenerAttributes(
FMOD_SYSTEM *system,
int listener,
FMOD_VECTOR *pos,
FMOD_VECTOR *vel,
FMOD_VECTOR *forward,
FMOD_VECTOR *up
);
C# Syntax
RESULT System.get3DListenerAttributes(
int listener,
out VECTOR pos,
out VECTOR vel,
out VECTOR forward,
out VECTOR up
);
JavaScript Syntax
System.get3DListenerAttributes(
listener,
pos, // writes value to pos.val
vel, // writes value to vel.val
forward, // writes value to forward.val
up // writes value to up.val
);
Parameters
listener
Listener ID in a multi-listener environment. Specify 0 if there is only 1
listener.
pos
Address of a variable that receives the position of the listener in world
space, measured in distance units. Optional. Specify 0 or NULL to ignore.
vel
Address of a variable that receives the velocity of the listener measured in
distance units per second. Optional. Specify 0 or NULL to ignore.
forward
Address of a variable that receives the forwards orientation of the listener.
Optional. Specify 0 or NULL to ignore.
up
Address of a variable that receives the upwards orientation of the listener.
Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE! Users of the Studio API should call
Studio::System::getListenerAttributes instead of this function.
See Also
System::set3DListenerAttributes
FMOD_VECTOR
C++ Syntax
FMOD_RESULT System::get3DNumListeners(
int *numlisteners
);
C Syntax
FMOD_RESULT FMOD_System_Get3DNumListeners(
FMOD_SYSTEM *system,
int *numlisteners
);
C# Syntax
RESULT System.get3DNumListeners(
out int numlisteners
);
JavaScript Syntax
System.get3DNumListeners(
numlisteners // writes value to numlisteners.val
);
Parameters
numlisteners
Address of a variable that receives the current number of 3D listeners in the
3D scene.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE! Users of the Studio API should call Studio::System::getNumListeners
instead of this function.
See Also
System::set3DNumListeners
C++ Syntax
FMOD_RESULT System::get3DSettings(
float *dopplerscale,
float *distancefactor,
float *rolloffscale
);
C Syntax
FMOD_RESULT FMOD_System_Get3DSettings(
FMOD_SYSTEM *system,
float *dopplerscale,
float *distancefactor,
float *rolloffscale
);
C# Syntax
RESULT System.get3DSettings(
out float dopplerscale,
out float distancefactor,
out float rolloffscale
);
JavaScript Syntax
System.get3DSettings(
dopplerscale, // writes value to dopplerscale.val
distancefactor, // writes value to distancefactor.val
rolloffscale // writes value to rolloffscale.val
);
Parameters
dopplerscale
Address of a variable that receives the scaling factor for doppler shift.
Optional. Specify 0 or NULL to ignore.
distancefactor
Address of a variable that receives the relative distance factor to FMOD's
units. Optional. Specify 0 or NULL to ignore.
rolloffscale
Address of a variable that receives the scaling factor for 3D sound rolloff or
attenuation. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::set3DSettings
C++ Syntax
FMOD_RESULT System::getAdvancedSettings(
FMOD_ADVANCEDSETTINGS *settings
);
C Syntax
FMOD_RESULT FMOD_System_GetAdvancedSettings(
FMOD_SYSTEM *system,
FMOD_ADVANCEDSETTINGS *settings
);
C# Syntax
RESULT System.getAdvancedSettings(
ref ADVANCEDSETTINGS settings
);
JavaScript Syntax
System.getAdvancedSettings(
settings // writes value to settings.val
);
Parameters
settings
Address of a variable to receive the contents of the
FMOD_ADVANCEDSETTINGS structure specified by the user.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_ADVANCEDSETTINGS
System::setAdvancedSettings
C++ Syntax
FMOD_RESULT System::getCPUUsage(
float *dsp,
float *stream,
float *geometry,
float *update,
float *total
);
C Syntax
FMOD_RESULT FMOD_System_GetCPUUsage(
FMOD_SYSTEM *system,
float *dsp,
float *stream,
float *geometry,
float *update,
float *total
);
C# Syntax
RESULT System.getCPUUsage(
out float dsp,
out float stream,
out float geometry,
out float update,
out float total
);
JavaScript Syntax
System.getCPUUsage(
usage // writes value to usage.val
);
Parameters
dsp
Address of a variable that receives the current dsp mixing engine cpu usage.
Result will be from 0 to 100.0f. Optional. Specify 0 or NULL to ignore.
stream
Address of a variable that receives the current streaming engine cpu usage.
Result will be from 0 to 100.0f. Optional. Specify 0 or NULL to ignore.
geometry
Address of a variable that receives the current geometry engine cpu usage.
Result will be from 0 to 100.0f. Optional. Specify 0 or NULL to ignore.
update
Address of a variable that receives the current System::update cpu usage.
Result will be from 0 to 100.0f. Optional. Specify 0 or NULL to ignore.
total
Address of a variable that receives the current total cpu usage. Result will
be from 0 to 100.0f. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This value is slightly smoothed to provide more stable readout (and to round off
spikes that occur due to multitasking/operating system issues).
NOTE! On ps3 and xbox360, the dsp and stream figures are NOT main
cpu/main thread usage. On PS3 this is the percentage of SPU being used. On
Xbox 360 it is the percentage of a hardware thread being used which is on a
totally different CPU than the main one.
Do not be alarmed if the usage for these platforms reaches over 50%, this is
normal and should be ignored if you are playing a lot of compressed sounds and
are using effects. The only value on the main cpu / main thread to take note of
here that will impact your framerate is the update value, and this is typically very
low (ie less than 1%).
See Also
System::update
C++ Syntax
FMOD_RESULT System::getChannel(
int channelid,
FMOD::Channel **channel
);
C Syntax
FMOD_RESULT FMOD_System_GetChannel(
FMOD_SYSTEM *system,
int channelid,
FMOD_CHANNEL **channel
);
C# Syntax
RESULT System.getChannel(
int channelid,
out Channel channel
);
JavaScript Syntax
System.getChannel(
channelid,
channel // writes value to channel.val
);
Parameters
channelid
Index in the FMOD channel pool. Specify a channel number from 0 to the
'maxchannels' value specified in System::init minus 1.
channel
Address of a variable that receives a pointer to the requested channel.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is mainly for getting handles to existing (playing) channels and
setting their attributes.
See Also
System::playSound
System::init
C++ Syntax
FMOD_RESULT System::getChannelsPlaying(
int *channels,
int *realchannels
);
C Syntax
FMOD_RESULT FMOD_System_GetChannelsPlaying(
FMOD_SYSTEM *system,
int *channels,
int *realchannels
);
C# Syntax
RESULT System.getChannelsPlaying(
out int channels,
out int realchannels
);
JavaScript Syntax
System.getChannelsPlaying(
channels, // writes value to channels.val
realchannels // writes value to realchannels.val
);
Parameters
channels
Address of a variable that receives the number of playing channels (both
real and virtual). Specify 0 or NULL to ignore.
realchannels
Address of a variable that receives the number of playing non-virtual
channels. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Channel::isPlaying
Channel::isVirtual
C++ Syntax
FMOD_RESULT System::getDSPBufferSize(
unsigned int *bufferlength,
int *numbuffers
);
C Syntax
FMOD_RESULT FMOD_System_GetDSPBufferSize(
FMOD_SYSTEM *system,
unsigned int *bufferlength,
int *numbuffers
);
C# Syntax
RESULT System.getDSPBufferSize(
out uint bufferlength,
out int numbuffers
);
JavaScript Syntax
System.getDSPBufferSize(
bufferlength, // writes value to bufferlength.val
numbuffers // writes value to numbuffers.val
);
Parameters
bufferlength
Address of a variable that receives the mixer engine block size in samples.
Default = 1024. (milliseconds = 1024 at 48khz = 1024 / 48000 * 1000 =
10.66ms). This means the mixer updates every 21.3ms. Optional. Specify 0
or NULL to ignore.
numbuffers
Address of a variable that receives the mixer engine number of buffers
used. Default = 4. To get the total buffersize multiply the bufferlength by
the numbuffers value. By default this would be 4*1024. Optional. Specify 0
or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
See documentation on System::setDSPBufferSize for more information about
these values.
See Also
System::setDSPBufferSize
C++ Syntax
FMOD_RESULT System::getDSPInfoByPlugin(
unsigned int handle,
const FMOD_DSP_DESCRIPTION **description
);
C Syntax
FMOD_RESULT FMOD_System_GetDSPInfoByPlugin(
FMOD_SYSTEM *system,
unsigned int handle,
const FMOD_DSP_DESCRIPTION **description
);
C# Syntax
RESULT System.getDSPInfoByPlugin(
uint handle,
out IntPtr description
);
JavaScript Syntax
System.getDSPInfoByPlugin(
handle,
description // writes value to description.val
);
Parameters
handle
Handle to a pre-existing DSP plugin, loaded by System::loadPlugin.
description
Address of a variable to receive the description structure for the DSP.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::loadPlugin
C++ Syntax
FMOD_RESULT System::getDefaultMixMatrix(
FMOD_SPEAKERMODE sourcespeakermode,
FMOD_SPEAKERMODE targetspeakermode,
float *matrix,
int matrixhop
);
C Syntax
FMOD_RESULT FMOD_System_GetDefaultMixMatrix(
FMOD_SYSTEM *system,
FMOD_SPEAKERMODE sourcespeakermode,
FMOD_SPEAKERMODE targetspeakermode,
float *matrix,
int matrixhop
);
C# Syntax
RESULT System.getDefaultMixMatrix(
SPEAKERMODE sourcespeakermode,
SPEAKERMODE targetspeakermode,
float[] matrix,
int matrixhop
);
JavaScript Syntax
System.getDefaultMixMatrix(
sourcespeakermode,
targetspeakermode,
matrix, // writes value to matrix.val
matrixhop
);
Parameters
sourcespeakermode
The speaker mode being converted from.
targetspeakermode
The speaker mode being converted to.
matrix
The output matrix. Its minumum size in floats must be the number of source
channels multiplied by the number of target channels. Source and target
channels cannot exceed FMOD_MAX_CHANNEL_WIDTH.
matrixhop
The number of source channels in the matrix. Optional. If this is 0, the
number of source channels will be derived from 'sourcespeakermode'.
Maximum of FMOD_MAX_CHANNEL_WIDTH.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The gain for source channel 's' to target channel 't' is matrix[t * matrixhop + s].
If 'sourcespeakermode' or 'targetspeakermode' is
FMOD_SPEAKERMODE_RAW, this function will return
FMOD_ERR_INVALID_PARAM.
See Also
System::getSpeakerModeChannels
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT System::getDriver(
int *driver
);
C Syntax
FMOD_RESULT FMOD_System_GetDriver(
FMOD_SYSTEM *system,
int *driver
);
C# Syntax
RESULT System.getDriver(
out int driver
);
JavaScript Syntax
System.getDriver(
driver // writes value to driver.val
);
Parameters
driver
Address of a variable that receives the currently selected driver ID. 0 =
primary or main sound device as selected by the operating system settings.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::setDriver
System::getNumDrivers
System::getDriverInfo
C++ Syntax
FMOD_RESULT System::getDriverInfo(
int id,
char *name,
int namelen,
FMOD_GUID *guid,
int *systemrate,
FMOD_SPEAKERMODE *speakermode,
int *speakermodechannels
);
C Syntax
FMOD_RESULT FMOD_System_GetDriverInfo(
FMOD_SYSTEM *system,
int id,
char *name,
int namelen,
FMOD_GUID *guid,
int *systemrate,
FMOD_SPEAKERMODE *speakermode,
int *speakermodechannels
);
C# Syntax
RESULT System.getDriverInfo(
int id,
StringBuilder name,
int namelen,
out Guid guid,
out int systemrate,
out SPEAKERMODE speakermode,
out int speakermodechannels
);
JavaScript Syntax
System.getDriverInfo(
id,
name, // writes value to name.val
guid, // writes value to guid.val
systemrate, // writes value to systemrate.val
speakermode, // writes value to speakermode.val
speakermodechannels // writes value to speakermodechannels.val
);
Parameters
id
Index of the sound driver device. The total number of devices can be found
with System::getNumDrivers.
name
Address of a variable that receives the name of the device encoded in a
UTF-8 string. Optional. Specify 0 or NULL to ignore.
namelen
Length in bytes of the target buffer to receive the string. Required if name
parameter is not NULL.
guid
Address of a variable that receives the GUID that uniquely identifies the
device. Optional. Specify 0 or NULL to ignore.
systemrate
Address of a variable that receives the sample rate this device operates at.
Optional. Specify 0 or NULL to ignore.
speakermode
Address of a variable that receives the speaker setup this device is currently
using. Optional. Specify 0 or NULL to ignore.
speakermodechannels
Address of a variable that receives the number of channels in the current
speaker setup. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
JavaScript only :
Note: For the "name" parameter, the maximum string length is 512.
See Also
System::getNumDrivers
System::setOutput
C++ Syntax
FMOD_RESULT System::getFileUsage(
long long *sampleBytesRead,
long long *streamBytesRead,
long long *otherBytesRead
);
C Syntax
FMOD_RESULT FMOD_System_GetFileUsage(
FMOD_SYSTEM *system,
long long *sampleBytesRead,
long long *streamBytesRead,
long long *otherBytesRead
);
C# Syntax
RESULT System.getFileUsage(
out Int64 sampleBytesRead,
out Int64 streamBytesRead,
out Int64 otherBytesRead
);
JavaScript Syntax
System.getFileUsage(
sampleBytesRead, // writes value to sampleBytesRead.val
streamBytesRead, // writes value to streamBytesRead.val
otherBytesRead // writes value to otherBytesRead.val
);
Parameters
sampleBytesRead
Address of a variable that receives the total bytes read from file for loading
sample data. Optional. Specify 0 or NULL to ignore.
streamBytesRead
Address of a variable that receives the total bytes read from file for
streaming sounds. Optional. Specify 0 or NULL to ignore.
otherBytesRead
Address of a variable that receives the total bytes read for non-audio data
such as FMOD Studio banks. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The values returned are running totals that never reset.
C++ Syntax
FMOD_RESULT System::getGeometryOcclusion(
const FMOD_VECTOR *listener,
const FMOD_VECTOR *source,
float *direct,
float *reverb
);
C Syntax
FMOD_RESULT FMOD_System_GetGeometryOcclusion(
FMOD_SYSTEM *system,
const FMOD_VECTOR *listener,
const FMOD_VECTOR *source,
float *direct,
float *reverb
);
C# Syntax
RESULT System.getGeometryOcclusion(
ref VECTOR listener,
ref VECTOR source,
out float direct,
out float reverb
);
JavaScript Syntax
System.getGeometryOcclusion(
listener, // writes value to listener.val
source, // writes value to source.val
direct, // writes value to direct.val
reverb // writes value to reverb.val
);
Parameters
listener
The listener position.
source
The source position.
direct
Optional. Specify 0 to ignore. Address of a variable to receive the direct
occlusion value.
reverb
Optional. Specify 0 to ignore. Address of a variable to receive the reverb
occlusion value.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If single sided polygons have been created, it is important to get the source and
listener positions round the right way, as the occlusion from point A to point B
may not be the same as the occlusion from point B to point A.
See Also
System::createGeometry
C++ Syntax
FMOD_RESULT System::getGeometrySettings(
float *maxworldsize
);
C Syntax
FMOD_RESULT FMOD_System_GetGeometrySettings(
FMOD_SYSTEM *system,
float *maxworldsize
);
C# Syntax
RESULT System.getGeometrySettings(
out float maxworldsize
);
JavaScript Syntax
System.getGeometrySettings(
maxworldsize // writes value to maxworldsize.val
);
Parameters
maxworldsize
Pointer to a float to receieve the maximum world size.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::setGeometrySettings
C++ Syntax
FMOD_RESULT System::getMasterChannelGroup(
FMOD::ChannelGroup **channelgroup
);
C Syntax
FMOD_RESULT FMOD_System_GetMasterChannelGroup(
FMOD_SYSTEM *system,
FMOD_CHANNELGROUP **channelgroup
);
C# Syntax
RESULT System.getMasterChannelGroup(
out ChannelGroup channelgroup
);
JavaScript Syntax
System.getMasterChannelGroup(
channelgroup // writes value to channelgroup.val
);
Parameters
channelgroup
Address of a variable that receives a pointer to the master System object
channel group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createChannelGroup
ChannelGroup::setVolume
ChannelGroup::getVolume
C++ Syntax
FMOD_RESULT System::getMasterSoundGroup(
FMOD::SoundGroup **soundgroup
);
C Syntax
FMOD_RESULT FMOD_System_GetMasterSoundGroup(
FMOD_SYSTEM *system,
FMOD_SOUNDGROUP **soundgroup
);
C# Syntax
RESULT System.getMasterSoundGroup(
out SoundGroup soundgroup
);
JavaScript Syntax
System.getMasterSoundGroup(
soundgroup // writes value to soundgroup.val
);
Parameters
soundgroup
Address of a pointer to a SoundGroup object to receive the master sound
group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a user based soundgroup is deleted/released, the sounds will be put back into
this sound group.
See Also
SoundGroup::release
SoundGroup::getSystemObject
SoundGroup::setMaxAudible
SoundGroup::getMaxAudible
SoundGroup::getName
SoundGroup::getNumSounds
SoundGroup::getSound
SoundGroup::getNumPlaying
SoundGroup::setUserData
SoundGroup::getUserData
C++ Syntax
FMOD_RESULT System::getNestedPlugin(
unsigned int handle,
int index,
unsigned int *nestedhandle
);
C Syntax
FMOD_RESULT FMOD_System_GetNestedPlugin(
FMOD_SYSTEM *system,
unsigned int handle,
int index,
unsigned int *nestedhandle
);
C# Syntax
RESULT System.getNestedPlugin(
uint handle,
int index,
out uint nestedhandle
);
JavaScript Syntax
System.getNestedPlugin(
handle,
index,
nestedhandle // writes value to nestedhandle.val
);
Parameters
handle
Handle obtained from System::loadPlugin.
index
Index into the list of plugin definitions.
nestedhandle
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is used to iterate handles for plugins that have a list of definitions.
For plugins consisting of a single definition, only index 0 is valid and the
returned handle is the same as the handle passed in.
See the DSP Plugin API Programmer Topic for more information.
See Also
System::loadPlugin
System::getNumNestedPlugins
FMOD_PLUGINLIST
C++ Syntax
FMOD_RESULT System::getNetworkProxy(
char *proxy,
int proxylen
);
C Syntax
FMOD_RESULT FMOD_System_GetNetworkProxy(
FMOD_SYSTEM *system,
char *proxy,
int proxylen
);
C# Syntax
RESULT System.getNetworkProxy(
StringBuilder proxy,
int proxylen
);
JavaScript Syntax
System.getNetworkProxy(
proxy // writes value to proxy.val
);
Parameters
proxy
Address of a variable that receives the proxy server URL encoded in a
UTF-8 string.
proxylen
Size of the buffer in bytes to receive the string.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
JavaScript only :
Note: For the "proxy" parameter, the maximum string length is 512.
See Also
System::setNetworkProxy
C++ Syntax
FMOD_RESULT System::getNetworkTimeout(
int *timeout
);
C Syntax
FMOD_RESULT FMOD_System_GetNetworkTimeout(
FMOD_SYSTEM *system,
int *timeout
);
C# Syntax
RESULT System.getNetworkTimeout(
out int timeout
);
JavaScript Syntax
System.getNetworkTimeout(
timeout // writes value to timeout.val
);
Parameters
timeout
The timeout value in ms.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT System::getNumDrivers(
int *numdrivers
);
C Syntax
FMOD_RESULT FMOD_System_GetNumDrivers(
FMOD_SYSTEM *system,
int *numdrivers
);
C# Syntax
RESULT System.getNumDrivers(
out int numdrivers
);
JavaScript Syntax
System.getNumDrivers(
numdrivers // writes value to numdrivers.val
);
Parameters
numdrivers
Address of a variable that receives the number of output drivers.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If System::setOutput is not called it will return the number of drivers available
for the default output type. Use this for enumerating sound devices. Use
System::getDriverInfo to get the device's name.
See Also
System::getDriver
System::getDriverInfo
System::setOutput
System::getOutput
C++ Syntax
FMOD_RESULT System::getNumNestedPlugins(
unsigned int handle,
int *count
);
C Syntax
FMOD_RESULT FMOD_System_GetNumNestedPlugins(
FMOD_SYSTEM *system,
unsigned int handle,
int *count
);
C# Syntax
RESULT System.getNumNestedPlugins(
uint handle,
out int count
);
JavaScript Syntax
System.getNumNestedPlugins(
handle,
count // writes value to count.val
);
Parameters
handle
Handle obtained from System::loadPlugin.
count
Returned number of plugins.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Plugins normally have a single definition in them, in which case the count is
always 1.
For plugins that have a list of definitions, this function returns the number of
plugins that have been defined. System::getNestedPlugin can be used to find
each handle.
See the DSP Plugin API Programmer Topic for more information.
See Also
System::loadPlugin
System::getNestedPlugin
FMOD_PLUGINLIST
C++ Syntax
FMOD_RESULT System::getNumPlugins(
FMOD_PLUGINTYPE plugintype,
int *numplugins
);
C Syntax
FMOD_RESULT FMOD_System_GetNumPlugins(
FMOD_SYSTEM *system,
FMOD_PLUGINTYPE plugintype,
int *numplugins
);
C# Syntax
RESULT System.getNumPlugins(
PLUGINTYPE plugintype,
out int numplugins
);
JavaScript Syntax
System.getNumPlugins(
plugintype,
numplugins // writes value to numplugins.val
);
Parameters
plugintype
Plugin type such as FMOD_PLUGINTYPE_OUTPUT,
FMOD_PLUGINTYPE_CODEC or FMOD_PLUGINTYPE_DSP.
numplugins
Address of a variable that receives the number of available plugins for the
selected type.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_PLUGINTYPE
System::getPluginHandle
C++ Syntax
FMOD_RESULT System::getOutput(
FMOD_OUTPUTTYPE *output
);
C Syntax
FMOD_RESULT FMOD_System_GetOutput(
FMOD_SYSTEM *system,
FMOD_OUTPUTTYPE *output
);
C# Syntax
RESULT System.getOutput(
out OUTPUTTYPE output
);
JavaScript Syntax
System.getOutput(
output // writes value to output.val
);
Parameters
output
Address of a variable that receives the current output type.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::setOutput
FMOD_OUTPUTTYPE
C++ Syntax
FMOD_RESULT System::getOutputByPlugin(
unsigned int *handle
);
C Syntax
FMOD_RESULT FMOD_System_GetOutputByPlugin(
FMOD_SYSTEM *system,
unsigned int *handle
);
C# Syntax
RESULT System.getOutputByPlugin(
out uint handle
);
JavaScript Syntax
System.getOutputByPlugin(
handle // writes value to handle.val
);
Parameters
handle
Handle to a pre-existing output plugin.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::getNumPlugins
System::setOutputByPlugin
System::setOutput
C++ Syntax
FMOD_RESULT System::getOutputHandle(
void **handle
);
C Syntax
FMOD_RESULT FMOD_System_GetOutputHandle(
FMOD_SYSTEM *system,
void **handle
);
C# Syntax
RESULT System.getOutputHandle(
out IntPtr handle
);
JavaScript Syntax
System.getOutputHandle(
handle
);
Parameters
handle
Address of a variable that receives the handle to the output mode's native
hardware API object (see remarks for supported outputs).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Must be called after System::init.
Cast the resulting pointer depending on what output system pointer you are after.
FMOD_OUTPUTTYPE_WAVWRITER Pointer to stdio FILE is returned
FMOD_OUTPUTTYPE_WAVWRITER_NRT Pointer to stdio FILE is returned
C++ Syntax
FMOD_RESULT System::getPluginHandle(
FMOD_PLUGINTYPE plugintype,
int index,
unsigned int *handle
);
C Syntax
FMOD_RESULT FMOD_System_GetPluginHandle(
FMOD_SYSTEM *system,
FMOD_PLUGINTYPE plugintype,
int index,
unsigned int *handle
);
C# Syntax
RESULT System.getPluginHandle(
PLUGINTYPE plugintype,
int index,
out uint handle
);
JavaScript Syntax
System.getPluginHandle(
plugintype,
index,
handle // writes value to handle.val
);
Parameters
plugintype
The type of plugin type such as FMOD_PLUGINTYPE_OUTPUT,
FMOD_PLUGINTYPE_CODEC or FMOD_PLUGINTYPE_DSP.
index
The relative index for the type of plugin.
handle
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_PLUGINTYPE
System::getNumPlugins
C++ Syntax
FMOD_RESULT System::getPluginInfo(
unsigned int handle,
FMOD_PLUGINTYPE *plugintype,
char *name,
int namelen,
unsigned int *version
);
C Syntax
FMOD_RESULT FMOD_System_GetPluginInfo(
FMOD_SYSTEM *system,
unsigned int handle,
FMOD_PLUGINTYPE *plugintype,
char *name,
int namelen,
unsigned int *version
);
C# Syntax
RESULT System.getPluginInfo(
uint handle,
out PLUGINTYPE plugintype,
StringBuilder name,
int namelen,
out uint version
);
JavaScript Syntax
System.getPluginInfo(
handle,
plugintype, // writes value to plugintype.val
name, // writes value to name.val
version // writes value to version.val
);
Parameters
handle
Handle to a pre-existing plugin.
plugintype
Address of a variable that receives the type of the plugin,
FMOD_PLUGINTYPE_OUTPUT, FMOD_PLUGINTYPE_CODEC or
FMOD_PLUGINTYPE_DSP.
name
Address of a variable that receives the name of the plugin.
namelen
Length in bytes of the target buffer to receieve the string.
version
Address of a variable that receives the version number set by the plugin.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
JavaScript only :
Note: For the "name" parameter, the maximum string length is 512.
See Also
FMOD_PLUGINTYPE
System::getNumPlugins
C++ Syntax
FMOD_RESULT System::getRecordDriverInfo(
int id,
char *name,
int namelen,
FMOD_GUID *guid,
int *systemrate,
FMOD_SPEAKERMODE *speakermode,
int *speakermodechannels,
FMOD_DRIVER_STATE *state
);
C Syntax
FMOD_RESULT FMOD_System_GetRecordDriverInfo(
FMOD_SYSTEM *system,
int id,
char *name,
int namelen,
FMOD_GUID *guid,
int *systemrate,
FMOD_SPEAKERMODE *speakermode,
int *speakermodechannels,
FMOD_DRIVER_STATE *state
);
C# Syntax
RESULT System.getRecordDriverInfo(
int id,
StringBuilder name,
int namelen,
out Guid guid,
out int systemrate,
out SPEAKERMODE speakermode,
out int speakermodechannels,
out DRIVER_STATE state
);
JavaScript Syntax
System.getRecordDriverInfo(
id,
name, // writes value to name.val
guid, // writes value to guid.val
systemrate, // writes value to systemrate.val
speakermode, // writes value to speakermode.val
speakermodechannels, // writes value to speakermodechannels.val
state // writes value to state.val
);
Parameters
id
Index of the sound driver device. The total number of devices can be found
with System::getRecordNumDrivers.
name
Address of a variable that receives the name of the device encoded in a
UTF-8 string. Optional. Specify 0 or NULL to ignore.
namelen
Length in bytes of the target buffer to receive the string. Required if name
parameter is not NULL.
guid
Address of a variable that receives the GUID that uniquely identifies the
device. Optional. Specify 0 or NULL to ignore.
systemrate
Address of a variable that receives the sample rate this device operates at.
Optional. Specify 0 or NULL to ignore.
speakermode
Address of a variable that receives the speaker setup this device is currently
using. Optional. Specify 0 or NULL to ignore.
speakermodechannels
Address of a variable that receives the number of channels in the current
speaker setup. Optional. Specify 0 or NULL to ignore.
state
Address of a variable that receives flags that provide additional information
about the driver. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
JavaScript only :
Note: For the "name" parameter, the maximum string length is 512.
See Also
System::setOutput
System::getRecordNumDrivers
C++ Syntax
FMOD_RESULT System::getRecordNumDrivers(
int *numdrivers,
int *numconnected
);
C Syntax
FMOD_RESULT FMOD_System_GetRecordNumDrivers(
FMOD_SYSTEM *system,
int *numdrivers,
int *numconnected
);
C# Syntax
RESULT System.getRecordNumDrivers(
out int numdrivers,
out int numconnected
);
JavaScript Syntax
System.getRecordNumDrivers(
numdrivers, // writes value to numdrivers.val
numconnected // writes value to numconnected.val
);
Parameters
numdrivers
Address of a variable that receives the number of recording drivers
available for this output mode. Optional. Specify 0 or NULL to ignore.
numconnected
Address of a variable that receives the number of recording driver currently
plugged in. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::getRecordDriverInfo
C++ Syntax
FMOD_RESULT System::getRecordPosition(
int id,
unsigned int *position
);
C Syntax
FMOD_RESULT FMOD_System_GetRecordPosition(
FMOD_SYSTEM *system,
int id,
unsigned int *position
);
C# Syntax
RESULT System.getRecordPosition(
int id,
out uint position
);
JavaScript Syntax
System.getRecordPosition(
id,
position // writes value to position.val
);
Parameters
id
Enumerated driver ID. This must be in a valid range delimited by
System::getRecordNumDrivers.
position
Address of a variable to receieve the current recording position in PCM
samples.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Will return FMOD_ERR_RECORD_DISCONNECTED if the driver is
unplugged.
PS4 specific note: Record devices are virtual so 'position' will continue to update
if the device is unplugged (the OS is generating silence). This function will still
report FMOD_ERR_RECORD_DISCONNECTED for your information though.
See Also
System::recordStart
System::recordStop
C++ Syntax
FMOD_RESULT System::getReverbProperties(
int instance,
FMOD_REVERB_PROPERTIES *prop
);
C Syntax
FMOD_RESULT FMOD_System_GetReverbProperties(
FMOD_SYSTEM *system,
int instance,
FMOD_REVERB_PROPERTIES *prop
);
C# Syntax
RESULT System.getReverbProperties(
int instance,
out REVERB_PROPERTIES prop
);
JavaScript Syntax
System.getReverbProperties(
instance,
prop // writes value to prop.val
);
Parameters
instance
Index of the particular reverb instance to target, from 0 to
FMOD_REVERB_MAXINSTANCES inclusive.
prop
Address of a variable that receives the current reverb environment
description.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_REVERB_PROPERTIES
System::setReverbProperties
ChannelControl::setReverbProperties
ChannelControl::getReverbProperties
C++ Syntax
FMOD_RESULT System::getSoftwareChannels(
int *numsoftwarechannels
);
C Syntax
FMOD_RESULT FMOD_System_GetSoftwareChannels(
FMOD_SYSTEM *system,
int *numsoftwarechannels
);
C# Syntax
RESULT System.getSoftwareChannels(
out int numsoftwarechannels
);
JavaScript Syntax
System.getSoftwareChannels(
numsoftwarechannels // writes value to numsoftwarechannels.val
);
Parameters
numsoftwarechannels
Address of a variable that receives the current maximum number of
software voices available.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::setSoftwareChannels
C++ Syntax
FMOD_RESULT System::getSoftwareFormat(
int *samplerate,
FMOD_SPEAKERMODE *speakermode,
int *numrawspeakers
);
C Syntax
FMOD_RESULT FMOD_System_GetSoftwareFormat(
FMOD_SYSTEM *system,
int *samplerate,
FMOD_SPEAKERMODE *speakermode,
int *numrawspeakers
);
C# Syntax
RESULT System.getSoftwareFormat(
out int samplerate,
out SPEAKERMODE speakermode,
out int numrawspeakers
);
JavaScript Syntax
System.getSoftwareFormat(
samplerate, // writes value to samplerate.val
speakermode, // writes value to speakermode.val
numrawspeakers // writes value to numrawspeakers.val
);
Parameters
samplerate
Address of a variable that receives the sample rate of the mixer. Optional.
Specify 0 or NULL to ignore.
speakermode
Address of a variable that receives the speaker setup of the mixer. Optional.
Specify 0 or NULL to ignore.
numrawspeakers
Address of a variable that receives the number of speakers for
FMOD_SPEAKERMODE_RAW mode. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note that the settings returned here may differ from the settings provided by the
user with System::setSoftwareFormat. This is because the driver may require
certain settings to initialize.
See Also
System::setSoftwareFormat
FMOD_SOUND_FORMAT
FMOD_DSP_RESAMPLER
C++ Syntax
FMOD_RESULT System::getSoundRAM(
int *currentalloced,
int *maxalloced,
int *total
);
C Syntax
FMOD_RESULT FMOD_System_GetSoundRAM(
FMOD_SYSTEM *system,
int *currentalloced,
int *maxalloced,
int *total
);
C# Syntax
RESULT System.getSoundRAM(
out int currentalloced,
out int maxalloced,
out int total
);
JavaScript Syntax
System.getSoundRAM(
currentalloced, // writes value to currentalloced.val
maxalloced, // writes value to maxalloced.val
total // writes value to total.val
);
Parameters
currentalloced
Address of a variable that receives the currently allocated sound ram
memory at time of call. Optional. Specify 0 or NULL to ignore.
maxalloced
Address of a variable that receives the maximum allocated sound ram
memory since System::init. Optional. Specify 0 or NULL to ignore.
total
Address of a variable that receives the total amount of sound ram available
on this device.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Memory_GetStats
C++ Syntax
FMOD_RESULT System::getSpeakerModeChannels(
FMOD_SPEAKERMODE mode,
int *channels
);
C Syntax
FMOD_RESULT FMOD_System_GetSpeakerModeChannels(
FMOD_SYSTEM *system,
FMOD_SPEAKERMODE mode,
int *channels
);
C# Syntax
RESULT System.getSpeakerModeChannels(
SPEAKERMODE mode,
out int channels
);
JavaScript Syntax
System.getSpeakerModeChannels(
mode,
channels // writes value to channels.val
);
Parameters
mode
channels
Address of a variable that receives the number of channels.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT System::getSpeakerPosition(
FMOD_SPEAKER speaker,
float *x,
float *y,
bool *active
);
C Syntax
FMOD_RESULT FMOD_System_GetSpeakerPosition(
FMOD_SYSTEM *system,
FMOD_SPEAKER speaker,
float *x,
float *y,
FMOD_BOOL *active
);
C# Syntax
RESULT System.getSpeakerPosition(
SPEAKER speaker,
out float x,
out float y,
out bool active
);
JavaScript Syntax
System.getSpeakerPosition(
speaker,
x, // writes value to x.val
y, // writes value to y.val
active // writes value to active.val
);
Parameters
speaker
The selected speaker of interest to return the x and y position.
x
Address of a variable that receives the 2D X position relative to the listener.
Optional. Specify 0 or NULL to ignore.
y
Address of a variable that receives the 2D Y position relative to the listener.
Optional. Specify 0 or NULL to ignore.
active
Address of a variable that receives the active state of a speaker.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
See the System::setSpeakerPosition for more information on speaker
positioning.
See Also
System::setSpeakerPosition
FMOD_SPEAKERMODE
FMOD_SPEAKER
C++ Syntax
FMOD_RESULT System::getStreamBufferSize(
unsigned int *filebuffersize,
FMOD_TIMEUNIT *filebuffersizetype
);
C Syntax
FMOD_RESULT FMOD_System_GetStreamBufferSize(
FMOD_SYSTEM *system,
unsigned int *filebuffersize,
FMOD_TIMEUNIT *filebuffersizetype
);
C# Syntax
RESULT System.getStreamBufferSize(
out uint filebuffersize,
out TIMEUNIT filebuffersizetype
);
JavaScript Syntax
System.getStreamBufferSize(
filebuffersize, // writes value to filebuffersize.val
filebuffersizetype // writes value to filebuffersizetype.val
);
Parameters
filebuffersize
Address of a variable that receives the current stream file buffer size setting.
Default is 16384 (FMOD_TIMEUNIT_RAWBYTES). Optional. Specify 0
or NULL to ignore.
filebuffersizetype
Address of a variable that receives the type of unit for the current stream
file buffer size setting. Can be FMOD_TIMEUNIT_MS,
FMOD_TIMEUNIT_PCM, FMOD_TIMEUNIT_PCMBYTES or
FMOD_TIMEUNIT_RAWBYTES. Default is
FMOD_TIMEUNIT_RAWBYTES. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_TIMEUNIT
System::setStreamBufferSize
C++ Syntax
FMOD_RESULT System::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_System_GetUserData(
FMOD_SYSTEM *system,
void **userdata
);
C# Syntax
RESULT System.getUserData(
out IntPtr userdata
);
JavaScript Syntax
System.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of a pointer that receives the data specified with the
System::setUserData function.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::setUserData
C++ Syntax
FMOD_RESULT System::getVersion(
unsigned int *version
);
C Syntax
FMOD_RESULT FMOD_System_GetVersion(
FMOD_SYSTEM *system,
unsigned int *version
);
C# Syntax
RESULT System.getVersion(
out uint version
);
JavaScript Syntax
System.getVersion(
version // writes value to version.val
);
Parameters
version
Address of a variable that receives the current FMOD Studio version.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The version is a 32bit hexadecimal value formated as 16:8:8, with the upper
16bits being the major version, the middle 8bits being the minor version and the
bottom 8bits being the development version. For example a value of 00040106h
is equal to 4.01.06.
See Also
System::init
C++ Syntax
FMOD_RESULT System::init(
int maxchannels,
FMOD_INITFLAGS flags,
void *extradriverdata
);
C Syntax
FMOD_RESULT FMOD_System_Init(
FMOD_SYSTEM *system,
int maxchannels,
FMOD_INITFLAGS flags,
void *extradriverdata
);
C# Syntax
RESULT System.init(
int maxchannels,
INITFLAGS flags,
IntPtr extradriverdata
);
JavaScript Syntax
System.init(
maxchannels,
flags,
extradriverdata
);
Parameters
maxchannels
The maximum number of channels to be used in FMOD. They are also
called 'virtual channels' as you can play as many of these as you want, even
if you only have a small number of software voices. See remarks for more.
flags
See FMOD_INITFLAGS. This can be a selection of flags bitwise OR'ed
together to change the behaviour of FMOD at initialization time.
extradriverdata
Driver specific data that can be passed to the output plugin. For example the
filename for the wav writer plugin. See FMOD_OUTPUTTYPE for what
each output mode might take here. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Virtual channels.
These types of voices are the ones you work with using the FMOD::Channel
API. The advantage of virtual channels are, unlike older versions of FMOD, you
can now play as many sounds as you like without fear of ever running out of
voices, or playsound failing. You can also avoid 'channel stealing' if you specify
enough virtual voices.
When the priority of sounds change or emulated sounds get louder than audible
ones, they will swap the actual voice resource over and play the voice from its
correct position in time as it should be heard.
What this means is you can play all 1000 sounds, if they are scattered around the
game world, and as you move around the world you will hear the closest or most
important 32, and they will automatically swap in and out as you move.
C++ Syntax
FMOD_RESULT System::isRecording(
int id,
bool *recording
);
C Syntax
FMOD_RESULT FMOD_System_IsRecording(
FMOD_SYSTEM *system,
int id,
FMOD_BOOL *recording
);
C# Syntax
RESULT System.isRecording(
int id,
out bool recording
);
JavaScript Syntax
System.isRecording(
id,
recording // writes value to recording.val
);
Parameters
id
Enumerated driver ID. This must be in a valid range delimited by
System::getRecordNumDrivers.
recording
Address of a variable to receive the current recording state. True or non
zero if the FMOD recording api is currently in the middle of recording,
false or zero if the recording api is stopped / not recording.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Recording can be started with System::recordStart.
PS4 specific note: Record devices are virtual so 'recording' will continue to
report true if the device is unplugged (the OS is generating silence). This
function will still report FMOD_ERR_RECORD_DISCONNECTED for your
information though.
See Also
System::recordStart
System::recordStop
C++ Syntax
FMOD_RESULT System::loadGeometry(
const void *data,
int datasize,
FMOD::Geometry **geometry
);
C Syntax
FMOD_RESULT FMOD_System_LoadGeometry(
FMOD_SYSTEM *system,
const void *data,
int datasize,
FMOD_GEOMETRY **geometry
);
C# Syntax
RESULT System.loadGeometry(
IntPtr data,
int datasize,
out Geometry geometry
);
JavaScript Syntax
System.loadGeometry(
data,
datasize,
geometry // writes value to geometry.val
);
Parameters
data
Address of data containing pre-saved geometry data.
datasize
Size of geometry data block in bytes.
geometry
Address of a variable to receive a newly created FMOD::Geometry object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::save
System::createGeometry
C++ Syntax
FMOD_RESULT System::loadPlugin(
const char *filename,
unsigned int *handle,
unsigned int priority
);
C Syntax
FMOD_RESULT FMOD_System_LoadPlugin(
FMOD_SYSTEM *system,
const char *filename,
unsigned int *handle,
unsigned int priority
);
C# Syntax
RESULT System.loadPlugin(
string filename,
out uint handle
);
JavaScript Syntax
System.loadPlugin(
);
Parameters
filename
Filename of the plugin to be loaded encoded in a UTF-8 string.
handle
Pointer to an unsigned int to receive the plugin handle, for later use.
priority
FMOD_PLUGINTYPE_CODEC only, priority of the codec compared to
other codecs. 0 = most important, higher numbers = less importance.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Plugins can be created for FMOD by the user, see the relevant section in the
documentation on creating plugins.
Once the plugin is loaded, it can be enumerated and used. For file format
plugins, FMOD will automatically try to use them during System::createSound.
For DSP plugins, you can enumerate them with System::getNumPlugins,
System::getPluginHandle and System::getPluginInfo.
JavaScript only :
C++ Syntax
FMOD_RESULT System::lockDSP();
C Syntax
FMOD_RESULT FMOD_System_LockDSP(FMOD_SYSTEM *system);
C# Syntax
RESULT System.lockDSP();
JavaScript Syntax
System.lockDSP();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Once the user no longer needs the DSP engine locked, it must be unlocked with
System::unlockDSP.
Note that the DSP engine should not be locked for a significant amount of time,
otherwise inconsistency in the audio output may result. (audio
skipping/stuttering).
See Also
System::unlockDSP
C++ Syntax
FMOD_RESULT System::mixerResume();
C Syntax
FMOD_RESULT FMOD_System_MixerResume(FMOD_SYSTEM *system);
C# Syntax
RESULT System.mixerResume();
JavaScript Syntax
System.mixerResume();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used on mobile platforms when entering the foreground after being suspended.
All internal state will resume, i.e. created sound and channels are still valid and
playback will continue.
C++ Syntax
FMOD_RESULT System::mixerSuspend();
C Syntax
FMOD_RESULT FMOD_System_MixerSuspend(FMOD_SYSTEM *system);
C# Syntax
RESULT System.mixerSuspend();
JavaScript Syntax
System.mixerSuspend();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used on mobile platforms when entering a backgrounded state to reduce CPU to
0%.
All internal state will be maintained, i.e. created sound and channels will stay
available in memory.
See Also
System::mixerResume
C++ Syntax
FMOD_RESULT System::playDSP(
FMOD::DSP *dsp,
FMOD::ChannelGroup *channelgroup,
bool paused,
FMOD::Channel **channel
);
C Syntax
FMOD_RESULT FMOD_System_PlayDSP(
FMOD_SYSTEM *system,
FMOD_DSP *dsp,
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL paused,
FMOD_CHANNEL **channel
);
C# Syntax
RESULT System.playDSP(
DSP dsp,
ChannelGroup channelGroup,
bool paused,
out Channel channel
);
JavaScript Syntax
System.playDSP(
dsp,
channelgroup,
paused,
channel // writes value to channel.val
);
Parameters
dsp
Pointer to the DSP unit to play. This is opened with System::createDSP,
System::createDSPByType, System::createDSPByPlugin.
channelgroup
Pointer to a channelgroup become a member of. This is more efficient than
using Channel::setChannelGroup, as it does it during the channel setup,
rather than connecting to the master channel group, then later disconnecting
and connecting to the new channelgroup when specified. Optional. Use
0/NULL to ignore (use master ChannelGroup).
paused
True or false flag to specify whether to start the channel paused or not.
Starting a channel paused allows the user to alter its attributes without it
being audible, and unpausing with Channel::setPaused actually starts the
dsp running.
channel
Address of a channel handle pointer that receives the newly playing
channel. Optional. Use 0/NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When a dsp is played, it will use the dsp's default frequency, volume, pan, levels
and priority.
A dsp defined as FMOD_3D will by default play at the position of the listener.
To change channel attributes before the dsp is audible, start the channel paused
by setting the paused flag to true, and calling the relevant channel based
functions. Following that, unpause the channel with Channel::setPaused.
C++ Syntax
FMOD_RESULT System::playSound(
FMOD::Sound *sound,
FMOD::ChannelGroup *channelgroup,
bool paused,
FMOD::Channel **channel
);
C Syntax
FMOD_RESULT FMOD_System_PlaySound(
FMOD_SYSTEM *system,
FMOD_SOUND *sound,
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL paused,
FMOD_CHANNEL **channel
);
C# Syntax
RESULT System.playSound(
Sound sound,
ChannelGroup channelGroup,
bool paused,
out Channel channel
);
JavaScript Syntax
System.playSound(
sound,
channelgroup,
paused,
channel // writes value to channel.val
);
Parameters
sound
Pointer to the sound to play. This is opened with System::createSound.
channelgroup
Pointer to a channelgroup become a member of. This is more efficient than
using Channel::setChannelGroup, as it does it during the channel setup,
rather than connecting to the master channel group, then later disconnecting
and connecting to the new channelgroup when specified. Optional. Use
0/NULL to ignore (use master ChannelGroup).
paused
True or false flag to specify whether to start the channel paused or not.
Starting a channel paused allows the user to alter its attributes without it
being audible, and unpausing with Channel::setPaused actually starts the
sound.
channel
Address of a channel handle pointer that receives the newly playing
channel. Optional. Use 0/NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When a sound is played, it will use the sound's default frequency and priority.
A sound defined as FMOD_3D will by default play at the position of the listener.
To set the 3D position of the channel before the sound is audible, start the
channel paused by setting the paused flag to true, and calling
Channel::set3DAttributes. Following that, unpause the channel with
Channel::setPaused.
C++ Syntax
FMOD_RESULT System::recordStart(
int id,
FMOD::Sound *sound,
bool loop
);
C Syntax
FMOD_RESULT FMOD_System_RecordStart(
FMOD_SYSTEM *system,
int id,
FMOD_SOUND *sound,
FMOD_BOOL loop
);
C# Syntax
RESULT System.recordStart(
int id,
Sound sound,
bool loop
);
JavaScript Syntax
System.recordStart(
id,
sound,
loop
);
Parameters
id
Enumerated driver ID. This must be in a valid range delimited by
System::getRecordNumDrivers.
sound
User created sound for the user to record to.
loop
Boolean flag to tell the recording engine whether to continue recording to
the provided sound from the start again, after it has reached the end. If this
is set to true the data will be continually be overwritten once every loop.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Will return FMOD_ERR_RECORD_DISCONNECTED if the driver is
unplugged.
Recording from the same driver a second time will stop the first recording.
For lowest latency set the FMOD::Sound sample rate to the rate returned by
System::getRecordDriverInfo, otherwise a resampler will be allocated to handle
the difference.
See Also
System::recordStop
C++ Syntax
FMOD_RESULT System::recordStop(
int id
);
C Syntax
FMOD_RESULT FMOD_System_RecordStop(
FMOD_SYSTEM *system,
int id
);
C# Syntax
RESULT System.recordStop(
int id
);
JavaScript Syntax
System.recordStop(
id
);
Parameters
id
Enumerated driver ID. This must be in a valid range delimited by
System::getRecordNumDrivers.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Returns no error if unplugged or already stopped.
See Also
System::recordStart
C++ Syntax
FMOD_RESULT System::registerCodec(
FMOD_CODEC_DESCRIPTION *description,
unsigned int *handle,
unsigned int priority
);
C Syntax
FMOD_RESULT FMOD_System_RegisterCodec(
FMOD_SYSTEM *system,
FMOD_CODEC_DESCRIPTION *description,
unsigned int *handle,
unsigned int priority
);
C# Syntax
RESULT System.registerCodec(
ref CODEC_DESCRIPTION description,
out uint handle,
uint priority
);
JavaScript Syntax
System.registerCodec(
description,
handle,
priority
);
Parameters
description
Address of a FMOD_CODEC_DESCRIPTION structure containing
information about the codec.
handle
Address of a variable to receive the plugin handle of the newly-registered
codec.
priority
Priority of the codec compared to other codecs. 0 = most important, higher
numbers = less importance.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_CODEC_DESCRIPTION
System::registerDSP
C++ Syntax
FMOD_RESULT System::registerDSP(
const FMOD_DSP_DESCRIPTION *description,
unsigned int *handle
);
C Syntax
FMOD_RESULT FMOD_System_RegisterDSP(
FMOD_SYSTEM *system,
const FMOD_DSP_DESCRIPTION *description,
unsigned int *handle
);
C# Syntax
RESULT System.registerDSP(
ref DSP_DESCRIPTION description,
out uint handle
);
JavaScript Syntax
System.registerDSP(
description,
handle
);
Parameters
description
Address of an FMOD_DSP_DESCRIPTION structure, containing
information about the DSP effect. Some members of
FMOD_DSP_DESCRIPTION are referenced directly inside FMOD so the
structure should be allocated statically or at least remain in memory for the
lifetime of the system.
handle
Address of a variable to receive the plugin handle of the newly-registered
DSP effect.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_DSP_DESCRIPTION
System::createDSPByPlugin
System::getNumPlugins
System::getPluginInfo
System::registerCodec
C++ Syntax
FMOD_RESULT System::registerOutput(
const FMOD_OUTPUT_DESCRIPTION *description,
unsigned int *handle
);
C Syntax
FMOD_RESULT FMOD_System_RegisterOutput(
FMOD_SYSTEM *system,
const FMOD_OUTPUT_DESCRIPTION *description,
unsigned int *handle
);
C# Syntax
RESULT System.registerOutput(
ref OUTPUT_DESCRIPTION description,
out uint handle
);
JavaScript Syntax
System.registerOutput(
description,
handle
);
Parameters
description
Address of an FMOD_OUTPUT_DESCRIPTION structure, containing
information about the output mode.
handle
Address of a variable to receive the plugin handle of the newly-registered
output mode.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_OUTPUT_DESCRIPTION
System::setOutputByPlugin
System::getNumPlugins
System::getPluginInfo
C++ Syntax
FMOD_RESULT System::release();
C Syntax
FMOD_RESULT FMOD_System_Release(FMOD_SYSTEM *system);
C# Syntax
RESULT System.release();
JavaScript Syntax
System.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function also calls System::close, so calling close before this function is not
necessary.
C++ Syntax
FMOD_RESULT System::set3DListenerAttributes(
int listener,
const FMOD_VECTOR *pos,
const FMOD_VECTOR *vel,
const FMOD_VECTOR *forward,
const FMOD_VECTOR *up
);
C Syntax
FMOD_RESULT FMOD_System_Set3DListenerAttributes(
FMOD_SYSTEM *system,
int listener,
const FMOD_VECTOR *pos,
const FMOD_VECTOR *vel,
const FMOD_VECTOR *forward,
const FMOD_VECTOR *up
);
C# Syntax
RESULT System.set3DListenerAttributes(
int listener,
ref VECTOR pos,
ref VECTOR vel,
ref VECTOR forward,
ref VECTOR up
);
JavaScript Syntax
System.set3DListenerAttributes(
listener,
pos,
vel,
forward,
up
);
Parameters
listener
Listener ID in a multi-listener environment. Specify 0 if there is only 1
listener.
pos
The position of the listener in world space, measured in distance units. You
can specify 0 or NULL to not update the position.
vel
The velocity of the listener measured in distance units per second. You can
specify 0 or NULL to not update the velocity of the listener.
forward
The forwards orientation of the listener. This vector must be of unit length
and perpendicular to the up vector. You can specify 0 or NULL to not
update the forwards orientation of the listener.
up
The upwards orientation of the listener. This vector must be of unit length
and perpendicular to the forwards vector. You can specify 0 or NULL to not
update the upwards orientation of the listener.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Vectors should use your chosen coordinate system, see 3D sounds for more
information.
Orientation vectors must be UNIT length. This means the magnitude of the
vector should be 1.0.
Always remember to use units per second, not units per frame as this is a
common mistake and will make the doppler effect sound wrong.
For example, Do not just use (pos - lastpos) from the last frame's data for
velocity, as this is not correct. You need to time compensate it so it is given in
units per second.
You could alter your pos - lastpos calculation to something like this.
vel = (pos-lastpos) / time_taken_since_last_frame_in_seconds.
I.e. at 60fps the formula would look like this vel = (pos-lastpos) / 0.0166667.
C++ Syntax
FMOD_RESULT System::set3DNumListeners(
int numlisteners
);
C Syntax
FMOD_RESULT FMOD_System_Set3DNumListeners(
FMOD_SYSTEM *system,
int numlisteners
);
C# Syntax
RESULT System.set3DNumListeners(
int numlisteners
);
JavaScript Syntax
System.set3DNumListeners(
numlisteners
);
Parameters
numlisteners
Number of listeners in the scene. Valid values are from 1 to
FMOD_MAX_LISTENERS inclusive. Default = 1.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If the number of listeners is set to more than 1, then panning and doppler are
turned off. All sound effects will be mono. FMOD uses a 'closest sound to the
listener' method to determine what should be heard in this case.
C++ Syntax
FMOD_RESULT System::set3DRolloffCallback(
FMOD_3D_ROLLOFF_CALLBACK callback
);
C Syntax
FMOD_RESULT FMOD_System_Set3DRolloffCallback(
FMOD_SYSTEM *system,
FMOD_3D_ROLLOFF_CALLBACK callback
);
C# Syntax
RESULT System.set3DRolloffCallback(
CB_3D_ROLLOFFCALLBACK callback
);
JavaScript Syntax
System.set3DRolloffCallback(
callback
);
Parameters
callback
Pointer to a C function of type FMOD_3D_ROLLOFF_CALLBACK, that
is used to override the FMOD volume calculation. Default is 0 or NULL.
Setting the callback to null will return 3D calculation back to FMOD.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function overrides FMOD_3D_INVERSEROLLOFF,
FMOD_3D_LINEARROLLOFF, FMOD_3D_LINEARSQUAREROLLOFF,
FMOD_3D_CUSTOMROLLOFF. To allow FMOD to calculate the 3D volume
again, use 0 or NULL as the callback.
See Also
FMOD_3D_ROLLOFF_CALLBACK
System::set3DListenerAttributes
System::get3DListenerAttributes
Channel::getUserData
C++ Syntax
FMOD_RESULT System::set3DSettings(
float dopplerscale,
float distancefactor,
float rolloffscale
);
C Syntax
FMOD_RESULT FMOD_System_Set3DSettings(
FMOD_SYSTEM *system,
float dopplerscale,
float distancefactor,
float rolloffscale
);
C# Syntax
RESULT System.set3DSettings(
float dopplerscale,
float distancefactor,
float rolloffscale
);
JavaScript Syntax
System.set3DSettings(
dopplerscale,
distancefactor,
rolloffscale
);
Parameters
dopplerscale
Scaling factor for doppler shift. Default = 1.0.
distancefactor
Relative distance factor to FMOD's units. Default = 1.0. (1.0 = 1 meter).
rolloffscale
Scaling factor for 3D sound rolloff or attenuation for
FMOD_3D_INVERSEROLLOFF based sounds only (which is the default
type). Default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The doppler scale is a general scaling factor for how much the pitch varies due
to doppler shifting in 3D sound. Doppler is the pitch bending effect when a
sound comes towards the listener or moves away from it, much like the effect
you hear when a train goes past you with its horn sounding. With "dopplerscale"
you can exaggerate or diminish the effect. FMOD's effective speed of sound at a
doppler factor of 1.0 is 340 m/s.
The distance factor is the FMOD 3D engine relative distance factor, compared
to 1.0 meters. Another way to put it is that it equates to "how many units per
meter does your engine have". For example, if you are using feet then "scale"
would equal 3.28.
Note! This only affects doppler! If you keep your min/max distance, custom
rolloff curves and positions in scale relative to each other the volume rolloff will
not change. If you set this, the mindistance of a sound will automatically set
itself to this value when it is created in case the user forgets to set the
mindistance to match the new distancefactor.
The rolloff scale sets the global attenuation rolloff factor for
FMOD_3D_INVERSEROLLOFF based sounds only (which is the default).
Volume for a sound set to FMOD_3D_INVERSEROLLOFF will scale at
mindistance / distance. This gives an inverse attenuation of volume as the source
gets further away (or closer). Setting this value makes the sound drop off faster
or slower. The higher the value, the faster volume will attenuate, and conversely
the lower the value, the slower it will attenuate. For example a rolloff factor of 1
will simulate the real world, where as a value of 2 will make sounds attenuate 2
times quicker.
C++ Syntax
FMOD_RESULT System::setAdvancedSettings(
FMOD_ADVANCEDSETTINGS *settings
);
C Syntax
FMOD_RESULT FMOD_System_SetAdvancedSettings(
FMOD_SYSTEM *system,
FMOD_ADVANCEDSETTINGS *settings
);
C# Syntax
RESULT System.setAdvancedSettings(
ref ADVANCEDSETTINGS settings
);
JavaScript Syntax
System.setAdvancedSettings(
settings
);
Parameters
settings
Pointer to FMOD_ADVANCEDSETTINGS structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_ADVANCEDSETTINGS
System::getAdvancedSettings
FMOD_MODE
C++ Syntax
FMOD_RESULT System::setCallback(
FMOD_SYSTEM_CALLBACK callback,
FMOD_SYSTEM_CALLBACK_TYPE callbackmask
);
C Syntax
FMOD_RESULT FMOD_System_SetCallback(
FMOD_SYSTEM *system,
FMOD_SYSTEM_CALLBACK callback,
FMOD_SYSTEM_CALLBACK_TYPE callbackmask
);
C# Syntax
RESULT System.setCallback(
SYSTEM_CALLBACK callback,
SYSTEM_CALLBACK_TYPE callbackmask
);
JavaScript Syntax
System.setCallback(
callback,
callbackmask
);
Parameters
callback
Pointer to a callback to receive the event callback when it happens.
callbackmask
A bitfield describing which callbacks are required to be triggered. Masking
out some callback types can help avoid a flood of irrelevant callbacks being
triggered.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
System callbacks are not asynchronous and are bound by the latency caused by
the rate the user calls the update command.
Callbacks are stdcall. Use F_CALLBACK inbetween your return type and
function name.
The 'userdata' parameter passed to the callback is the userdata assigned to the
system from System::setUserData function.
Example:
FMOD_RESULT F_CALLBACK systemcallback(FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACK
{
FMOD::System *sys = (FMOD::System *)system;
switch (type)
{
case FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED:
{
int numdrivers;
sys->getNumDrivers(&numdrivers);
return FMOD_OK;
}
See Also
System::update
FMOD_SYSTEM_CALLBACK
FMOD_SYSTEM_CALLBACK_TYPE
C++ Syntax
FMOD_RESULT System::setDSPBufferSize(
unsigned int bufferlength,
int numbuffers
);
C Syntax
FMOD_RESULT FMOD_System_SetDSPBufferSize(
FMOD_SYSTEM *system,
unsigned int bufferlength,
int numbuffers
);
C# Syntax
RESULT System.setDSPBufferSize(
uint bufferlength,
int numbuffers
);
JavaScript Syntax
System.setDSPBufferSize(
bufferlength,
numbuffers
);
Parameters
bufferlength
The mixer engine block size in samples. Use this to adjust mixer update
granularity. Default = 1024. (milliseconds = 1024 at 48khz = 1024 / 48000
* 1000 = 21.33ms). This means the mixer updates every 21.33ms.
numbuffers
The mixer engine number of buffers used. Use this to adjust mixer latency.
Default = 4. To get the total buffersize multiply the bufferlength by the
numbuffers value. By default this would be 4*1024.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The FMOD software mixer mixes to a ringbuffer. The size of this ringbuffer is
determined here. It mixes a block of sound data every 'bufferlength' number of
samples, and there are 'numbuffers' number of these blocks that make up the
entire ringbuffer. Adjusting these values can lead to extremely low latency
performance (smaller values), or greater stability in sound output (larger values).
Warning! The 'buffersize' is generally best left alone. Making the granularity
smaller will just increase CPU usage (cache misses and DSP network overhead).
Making it larger affects how often you hear commands update such as
volume/pitch/pan changes. Anything above 20ms will be noticable and sound
parameter changes will be obvious instead of smooth.
FMOD chooses the most optimal size by default for best stability, depending on
the output type, and if the drivers are emulated or not (for example DirectSound
is emulated using waveOut on NT). It is not recommended changing this value
unless you really need to. You may get worse performance than the default
settings chosen by FMOD.
The values in milliseconds and average latency expected from the settings can be
calculated using the following code.
FMOD_RESULT result;
unsigned int blocksize;
int numblocks;
float ms;
C++ Syntax
FMOD_RESULT System::setDriver(
int driver
);
C Syntax
FMOD_RESULT FMOD_System_SetDriver(
FMOD_SYSTEM *system,
int driver
);
C# Syntax
RESULT System.setDriver(
int driver
);
JavaScript Syntax
System.setDriver(
driver
);
Parameters
driver
Driver number to select. 0 = primary or main sound device as selected by
the operating system settings. Use System::getNumDrivers and
System::getDriverInfo to determine available devices.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If this function is called after FMOD is already initialized with System::init, the
current driver will be shutdown and the newly selected driver will be initialized /
started.
The driver that you wish to change to must support the current output format,
sample rate, and number of channels. If it does not,
FMOD_ERR_OUTPUT_INIT is returned and driver state is cleared. You should
now call System::setDriver with your original driver index to restore driver state
(providing that driver is still available / connected) or make another selection.
See Also
System::getDriver
System::getNumDrivers
System::getDriverInfo
System::setOutput
System::init
System::close
C++ Syntax
FMOD_RESULT System::setFileSystem(
FMOD_FILE_OPEN_CALLBACK useropen,
FMOD_FILE_CLOSE_CALLBACK userclose,
FMOD_FILE_READ_CALLBACK userread,
FMOD_FILE_SEEK_CALLBACK userseek,
FMOD_FILE_ASYNCREAD_CALLBACK userasyncread,
FMOD_FILE_ASYNCCANCEL_CALLBACK userasynccancel,
int blockalign
);
C Syntax
FMOD_RESULT FMOD_System_SetFileSystem(
FMOD_SYSTEM *system,
FMOD_FILE_OPEN_CALLBACK useropen,
FMOD_FILE_CLOSE_CALLBACK userclose,
FMOD_FILE_READ_CALLBACK userread,
FMOD_FILE_SEEK_CALLBACK userseek,
FMOD_FILE_ASYNCREAD_CALLBACK userasyncread,
FMOD_FILE_ASYNCCANCEL_CALLBACK userasynccancel,
int blockalign
);
C# Syntax
RESULT System.setFileSystem(
FILE_OPENCALLBACK useropen,
FILE_CLOSECALLBACK userclose,
FILE_READCALLBACK userread,
FILE_SEEKCALLBACK userseek,
FILE_ASYNCREADCALLBACK userasyncread,
FILE_ASYNCCANCELCALLBACK userasynccancel,
int blockalign
);
JavaScript Syntax
System.setFileSystem(
useropen,
userclose,
userread,
userseek,
userasyncread,
userasynccancel,
blockalign
);
Parameters
useropen
Callback for opening a file. Specifying 0 / null will disable file callbacks.
userclose
Callback for closing a file. Specifying 0 / null will disable file callbacks.
userread
Callback for reading from a file. Specifying 0 / null will disable file
callbacks if userasyncread is also 0 / null. User could use userasyncread
instead of userread.
userseek
Callback for seeking within a file. Specifying 0 / null will disable file
callbacks. User could use userasyncread instead of userseek.
userasyncread
OPTIONAL - Callback to replace 'userread' and 'userseek' that allows the
user to defer file access to a later time and return immediately. FMOD will
internally wait for data to appear, or in a file streaming case - stutter/starve
if data is not fed to fmod in time. Set to 0 / null to get normal file callback
operation.
userasynccancel
OPTIONAL - Callback for cancelling pending user file accesses. This will
be called if a sound is released, so the user can cancel any pending file
accesses. If the sound is released and a deferred read happens into a
released buffer, the application will crash. This callback must be used to
make sure this doesn't happen. Set to 0 / null to get normal file callback
operation.
blockalign
Internal minimum file block alignment. FMOD will read data in at least
chunks of this size if you ask it to. Specifying 0 means there is no file
buffering at all (this could adversely affect streaming). Do NOT make this a
large value, it is purely a setting for minimum sector size alignment to aid
seeking and reading on certain media. It is not for stream buffer sizes, that
is what System::setStreamBufferSize is for. It is recommened just to pass
-1. Large values just mean large memory usage with no benefit. Specify -1
to not set this value. Default = 2048.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This has no effect on sounds loaded with FMOD_OPENMEMORY or
FMOD_CREATEUSER.
This function can be used to set user file callbacks, or if required, they can be
turned off by specifying 0 for all callbacks.
This function can be used purely to set the 'buffersize' parameter, and ignore the
callback aspect of the function.
Warning : This function can cause unpredictable behaviour if not used properly.
You must return the right values, and each command must work properly, or
FMOD will not function, or it may even crash if you give it invalid data. You
must also return FMOD_ERR_FILE_EOF from a read callback if the number of
bytes read is smaller than the number of bytes requested.
FMOD's default filsystem buffers reads every 2048 bytes by default. This means
every time fmod reads one byte from the API (say if it was parsing a file
format), it simply mem copies the byte from the 2k memory buffer, and every
time it needs to, refreshes the 2k buffer resulting in a drastic reduction in file I/O.
Large reads go straight to the pointer instead of the 2k buffer if it is buffer
aligned. This value can be increased or decreased by the user. A buffer of 0
means all reads go directly to the pointer specified. 2048 bytes is the size of a
CD sector on most CD ISO formats so it is chosen as the default, for optimal
reading speed from CD media.
NOTE! Your file callbacks must be thread safe. If not unexpected behaviour
may occur. FMOD calls file functions from asynchronous threads, such as the
streaming thread, and thread related to FMOD_NONBLOCKING flag.
C++ Syntax
FMOD_RESULT System::setGeometrySettings(
float maxworldsize
);
C Syntax
FMOD_RESULT FMOD_System_SetGeometrySettings(
FMOD_SYSTEM *system,
float maxworldsize
);
C# Syntax
RESULT System.setGeometrySettings(
float maxworldsize
);
JavaScript Syntax
System.setGeometrySettings(
maxworldsize
);
Parameters
maxworldsize
Maximum size of the world from the centerpoint to the edge using the same
units used in other 3D functions.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Setting maxworldsize should be done first before creating any geometry.
It can be done any time afterwards but may be slow in this case.
C++ Syntax
FMOD_RESULT System::setNetworkProxy(
const char *proxy
);
C Syntax
FMOD_RESULT FMOD_System_SetNetworkProxy(
FMOD_SYSTEM *system,
const char *proxy
);
C# Syntax
RESULT System.setNetworkProxy(
string proxy
);
JavaScript Syntax
System.setNetworkProxy(
proxy
);
Parameters
proxy
The name of a proxy server encoded as a UTF-8 string in host:port format
e.g. www.fmod.org:8888 (defaults to port 80 if no port is specified).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Basic authentication is supported. To use it, this parameter must be in
user:password@host:port format e.g. bob:[email protected]:8888 Set
this parameter to 0 / NULL if no proxy is required.
See Also
System::getNetworkProxy
C++ Syntax
FMOD_RESULT System::setNetworkTimeout(
int timeout
);
C Syntax
FMOD_RESULT FMOD_System_SetNetworkTimeout(
FMOD_SYSTEM *system,
int timeout
);
C# Syntax
RESULT System.setNetworkTimeout(
int timeout
);
JavaScript Syntax
System.setNetworkTimeout(
timeout
);
Parameters
timeout
The timeout value in ms.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The default timeout is 5000ms.
See Also
System::getNetworkTimeout
C++ Syntax
FMOD_RESULT System::setOutput(
FMOD_OUTPUTTYPE output
);
C Syntax
FMOD_RESULT FMOD_System_SetOutput(
FMOD_SYSTEM *system,
FMOD_OUTPUTTYPE output
);
C# Syntax
RESULT System.setOutput(
OUTPUTTYPE output
);
JavaScript Syntax
System.setOutput(
output
);
Parameters
output
Output type to select. See FMOD_OUTPUTTYPE for different output
types you can select.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is only necessary if you want to specifically switch away from the
default output mode for the operating system. The most optimal mode is selected
by default for the operating system.
(Windows Only) This function can be called after FMOD is already activated,
you can use it to change the output mode at runtime. If
FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED is specified use the
setOutput call to change to FMOD_OUTPUTTYPE_NOSOUND if no more
sound card drivers exist.
NOTE! When using the Studio API, switching to an NRT output mode after
FMOD is already activated will not behave correctly unless the Studio API was
initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE.
See Also
System::init
System::close
System::getOutput
FMOD_OUTPUTTYPE
C++ Syntax
FMOD_RESULT System::setOutputByPlugin(
unsigned int handle
);
C Syntax
FMOD_RESULT FMOD_System_SetOutputByPlugin(
FMOD_SYSTEM *system,
unsigned int handle
);
C# Syntax
RESULT System.setOutputByPlugin(
uint handle
);
JavaScript Syntax
System.setOutputByPlugin(
handle
);
Parameters
handle
Handle to a pre-existing output plugin.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
(Windows Only) This function can be called after FMOD is already activated.
You can use it to change the output mode at runtime. If
FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED is specified use the
setOutput call to change to FMOD_OUTPUTTYPE_NOSOUND if no more
sound card drivers exist.
See Also
System::getNumPlugins
System::getOutputByPlugin
System::setOutput
System::init
System::close
C++ Syntax
FMOD_RESULT System::setPluginPath(
const char *path
);
C Syntax
FMOD_RESULT FMOD_System_SetPluginPath(
FMOD_SYSTEM *system,
const char *path
);
C# Syntax
RESULT System.setPluginPath(
string path
);
JavaScript Syntax
System.setPluginPath(
path
);
Parameters
path
A character string containing a correctly formatted path to load plugins
from encoded in a UTF-8 string.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::loadPlugin
System::init
To assist in defining reverb properties there are several presets available, see
FMOD_REVERB_PRESETS
C++ Syntax
FMOD_RESULT System::setReverbProperties(
int instance,
const FMOD_REVERB_PROPERTIES *prop
);
C Syntax
FMOD_RESULT FMOD_System_SetReverbProperties(
FMOD_SYSTEM *system,
int instance,
const FMOD_REVERB_PROPERTIES *prop
);
C# Syntax
RESULT System.setReverbProperties(
int instance,
ref REVERB_PROPERTIES prop
);
JavaScript Syntax
System.setReverbProperties(
instance,
prop
);
Parameters
instance
Index of the particular reverb instance to target, from 0 to
FMOD_REVERB_MAXINSTANCES inclusive.
prop
Address of an FMOD_REVERB_PROPERTIES structure which defines
the attributes for the reverb. Passing 0 or NULL to this function will delete
the physical reverb.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When using each instance for the first time, FMOD will create a physical SFX
reverb DSP unit that takes up several hundred kilobytes of memory and some
CPU.
See Also
FMOD_REVERB_PROPERTIES
FMOD_REVERB_PRESETS
System::getReverbProperties
ChannelControl::setReverbProperties
ChannelControl::getReverbProperties
C++ Syntax
FMOD_RESULT System::setSoftwareChannels(
int numsoftwarechannels
);
C Syntax
FMOD_RESULT FMOD_System_SetSoftwareChannels(
FMOD_SYSTEM *system,
int numsoftwarechannels
);
C# Syntax
RESULT System.setSoftwareChannels(
int numsoftwarechannels
);
JavaScript Syntax
System.setSoftwareChannels(
numsoftwarechannels
);
Parameters
numsoftwarechannels
The maximum number of mixable voices to be allocated by FMOD, default
= 64.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function cannot be called after FMOD is already activated, it must be called
before System::init, or after System::close.
See Also
System::getSoftwareChannels
System::init
System::close
If not loading Studio banks, do not call this unless you explicity want to change
a setting from the default. FMOD will default to the speaker mode and sample
rate that the OS / output prefers.
C++ Syntax
FMOD_RESULT System::setSoftwareFormat(
int samplerate,
FMOD_SPEAKERMODE speakermode,
int numrawspeakers
);
C Syntax
FMOD_RESULT FMOD_System_SetSoftwareFormat(
FMOD_SYSTEM *system,
int samplerate,
FMOD_SPEAKERMODE speakermode,
int numrawspeakers
);
C# Syntax
RESULT System.setSoftwareFormat(
int samplerate,
SPEAKERMODE speakermode,
int numrawspeakers
);
JavaScript Syntax
System.setSoftwareFormat(
samplerate,
speakermode,
numrawspeakers
);
Parameters
samplerate
Sample rate in Hz, that the software mixer will run at. Specify values
between 8000 and 192000.
speakermode
Speaker setup for the software mixer.
numrawspeakers
Number of output channels / speakers to initialize the sound card to in
FMOD_SPEAKERMODE_RAW mode. Optional. Specify 0 to ignore.
Maximum of FMOD_MAX_CHANNEL_WIDTH.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function cannot be called after FMOD is already activated, it must be called
before System::init, or after System::close.
See Also
System::getSoftwareFormat
FMOD_SPEAKERMODE
System::init
System::close
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT System::setSpeakerPosition(
FMOD_SPEAKER speaker,
float x,
float y,
bool active
);
C Syntax
FMOD_RESULT FMOD_System_SetSpeakerPosition(
FMOD_SYSTEM *system,
FMOD_SPEAKER speaker,
float x,
float y,
FMOD_BOOL active
);
C# Syntax
RESULT System.setSpeakerPosition(
SPEAKER speaker,
float x,
float y,
bool active
);
JavaScript Syntax
System.setSpeakerPosition(
speaker,
x,
y,
active
);
Parameters
speaker
The selected speaker of interest to position.
x
The 2D X offset in relation to the listening position. For example -1.0
would mean the speaker is on the left, and +1.0 would mean the speaker is
on the right. 0.0 is the speaker is in the middle.
y
The 2D Y offset in relation to the listening position. For example -1.0
would mean the speaker is behind the listener, and +1 would mean the
speaker is in front of the listener.
active
Enables or disables speaker from 3D consideration. Useful for disabling
center speaker for vocals for example, or the LFE. x and y can be anything
in this case.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A typical stereo setup would look like this.
system->setSpeakerPosition(FMOD_SPEAKER_FRONT_LEFT, -1.0f, 0.0f, true);
system->setSpeakerPosition(FMOD_SPEAKER_FRONT_RIGHT, 1.0f, 0.0f, true);
You could use this function to make sounds in front of your come out of
different physical speakers. If you specified for example that
FMOD_SPEAKER_BACK_RIGHT was in front of you at <0.0, 1.0> and you
organized the other speakers accordingly the 3D audio would come out of the
side right speaker when it was in front instead of the default which is only to the
side.
This function is also useful if speakers are not 'perfectly symmetrical'. For
example if the center speaker was closer to the front left than the front right, this
function could be used to position that center speaker accordingly and FMOD
would skew the panning appropriately to make it sound correct again.
The 2D coordinates used are only used to generate angle information. Size /
distance does not matter in FMOD's implementation because it is not FMOD's
job to attenuate or amplify the signal based on speaker distance. If it amplified
the signal in the digital domain the audio could clip/become distorted. It is better
to use the amplifier's analogue level capabilities to balance speaker volumes.
C++ Syntax
FMOD_RESULT System::setStreamBufferSize(
unsigned int filebuffersize,
FMOD_TIMEUNIT filebuffersizetype
);
C Syntax
FMOD_RESULT FMOD_System_SetStreamBufferSize(
FMOD_SYSTEM *system,
unsigned int filebuffersize,
FMOD_TIMEUNIT filebuffersizetype
);
C# Syntax
RESULT System.setStreamBufferSize(
uint filebuffersize,
TIMEUNIT filebuffersizetype
);
JavaScript Syntax
System.setStreamBufferSize(
filebuffersize,
filebuffersizetype
);
Parameters
filebuffersize
Size of stream file buffer. Default is 16384
(FMOD_TIMEUNIT_RAWBYTES).
filebuffersizetype
Type of unit for stream file buffer size. Must be FMOD_TIMEUNIT_MS,
FMOD_TIMEUNIT_PCM, FMOD_TIMEUNIT_PCMBYTES or
FMOD_TIMEUNIT_RAWBYTES. Default is
FMOD_TIMEUNIT_RAWBYTES.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note this function does not affect streams created with FMOD_OPENUSER, as
the buffer size is specified in System::createSound.
This function does not affect latency of playback. All streams are pre-buffered
(unless opened with FMOD_OPENONLY), so they will always start
immediately.
Seek and Play operations can sometimes cause a reflush of this buffer.
Note to determine the actual memory usage of a stream, including sound buffer
and other overhead, use Memory_GetStats before and after creating a sound.
Note that the stream may still stutter if the codec uses a large amount of cpu
time, which impacts the smaller, internal 'decode' buffer.
The decode buffer size is changeable via FMOD_CREATESOUNDEXINFO.
See Also
FMOD_TIMEUNIT
System::createSound
System::getStreamBufferSize
Sound::getOpenState
Channel::setMute
Memory_GetStats
FMOD_CREATESOUNDEXINFO
C++ Syntax
FMOD_RESULT System::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_System_SetUserData(
FMOD_SYSTEM *system,
void *userdata
);
C# Syntax
RESULT System.setUserData(
IntPtr userdata
);
JavaScript Syntax
System.setUserData(
userdata
);
Parameters
userdata
Address of user data that the user wishes stored within the System object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
It can be useful if an FMOD callback passes an object of this type as a
parameter, and the user does not know which object it is (if many of these types
of objects exist). Using System::getUserData would help in the identification of
the object.
See Also
System::getUserData
C++ Syntax
FMOD_RESULT System::unloadPlugin(
unsigned int handle
);
C Syntax
FMOD_RESULT FMOD_System_UnloadPlugin(
FMOD_SYSTEM *system,
unsigned int handle
);
C# Syntax
RESULT System.unloadPlugin(
uint handle
);
JavaScript Syntax
System.unloadPlugin(
handle
);
Parameters
handle
Handle to a pre-existing plugin.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::loadPlugin
C++ Syntax
FMOD_RESULT System::unlockDSP();
C Syntax
FMOD_RESULT FMOD_System_UnlockDSP(FMOD_SYSTEM *system);
C# Syntax
RESULT System.unlockDSP();
JavaScript Syntax
System.unlockDSP();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The DSP engine must be locked with System::lockDSP before this function is
called.
See Also
System::lockDSP
C++ Syntax
FMOD_RESULT System::update();
C Syntax
FMOD_RESULT FMOD_System_Update(FMOD_SYSTEM *system);
C# Syntax
RESULT System.update();
JavaScript Syntax
System.update();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This updates the following things.
If FMOD_OUTPUTTYPE_NOSOUND_NRT or
FMOD_OUTPUTTYPE_WAVWRITER_NRT output modes are used, this
function also drives the software / DSP engine, instead of it running
asynchronously in a thread as is the default behaviour.
This can be used for faster than realtime updates to the decoding or DSP engine
which might be useful if the output is the wav writer for example.
C++ Syntax
FMOD_RESULT Sound::addSyncPoint(
unsigned int offset,
FMOD_TIMEUNIT offsettype,
const char *name,
FMOD_SYNCPOINT **point
);
C Syntax
FMOD_RESULT FMOD_Sound_AddSyncPoint(
FMOD_SOUND *sound,
unsigned int offset,
FMOD_TIMEUNIT offsettype,
const char *name,
FMOD_SYNCPOINT **point
);
C# Syntax
RESULT Sound.addSyncPoint(
uint offset,
TIMEUNIT offsettype,
string name,
out IntPtr point
);
JavaScript Syntax
Sound.addSyncPoint(
);
Parameters
offset
offset in units specified by offsettype to add the callback syncpoint for a
sound.
offsettype
offset type to describe the offset provided. Could be PCM samples or
milliseconds for example.
name
A name character string to be stored with the sync point. This will be
provided via the sync point callback.
point
Address of a variable to store a pointer to the newly created syncpoint.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
In sound forge, a marker can be added a wave file by clicking on the timeline /
ruler, and right clicking then selecting 'Insert Marker/Region'.
Riff wrapped mp3 files are also supported.
JavaScript only :
C++ Syntax
FMOD_RESULT Sound::deleteSyncPoint(
FMOD_SYNCPOINT *point
);
C Syntax
FMOD_RESULT FMOD_Sound_DeleteSyncPoint(
FMOD_SOUND *sound,
FMOD_SYNCPOINT *point
);
C# Syntax
RESULT Sound.deleteSyncPoint(
IntPtr point
);
JavaScript Syntax
Sound.deleteSyncPoint(
);
Parameters
point
Address of an FMOD_SYNCPOINT object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
In sound forge, a marker can be added a wave file by clicking on the timeline /
ruler, and right clicking then selecting 'Insert Marker/Region'.
Riff wrapped mp3 files are also supported.
JavaScript only :
C++ Syntax
FMOD_RESULT Sound::get3DConeSettings(
float *insideconeangle,
float *outsideconeangle,
float *outsidevolume
);
C Syntax
FMOD_RESULT FMOD_Sound_Get3DConeSettings(
FMOD_SOUND *sound,
float *insideconeangle,
float *outsideconeangle,
float *outsidevolume
);
C# Syntax
RESULT Sound.get3DConeSettings(
out float insideconeangle,
out float outsideconeangle,
out float outsidevolume
);
JavaScript Syntax
Sound.get3DConeSettings(
insideconeangle, // writes value to insideconeangle.val
outsideconeangle, // writes value to outsideconeangle.val
outsidevolume // writes value to outsidevolume.val
);
Parameters
insideconeangle
Address of a variable that receives the inside angle of the sound projection
cone, in degrees. This is the angle within which the sound is at its normal
volume. Optional. Specify 0 or NULL to ignore.
outsideconeangle
Address of a variable that receives the outside angle of the sound projection
cone, in degrees. This is the angle outside of which the sound is at its
outside volume. Optional. Specify 0 or NULL to ignore.
outsidevolume
Address of a variable that receives the cone outside volume for this sound.
Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Sound::set3DConeSettings
Channel::set3DConeSettings
C++ Syntax
FMOD_RESULT Sound::get3DCustomRolloff(
FMOD_VECTOR **points,
int *numpoints
);
C Syntax
FMOD_RESULT FMOD_Sound_Get3DCustomRolloff(
FMOD_SOUND *sound,
FMOD_VECTOR **points,
int *numpoints
);
C# Syntax
RESULT Sound.get3DCustomRolloff(
out IntPtr points,
out int numpoints
);
JavaScript Syntax
Sound.get3DCustomRolloff(
points, // writes value to points.val
numpoints // writes value to numpoints.val
);
Parameters
points
Address of a variable to receive the pointer to the current custom rolloff
point list. Optional. Specify 0 or NULL to ignore.
numpoints
Address of a variable to receive the number of points int he current custom
rolloff point list. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_VECTOR
Sound::set3DCustomRolloff
Channel::set3DCustomRolloff
Channel::get3DCustomRolloff
C++ Syntax
FMOD_RESULT Sound::get3DMinMaxDistance(
float *min,
float *max
);
C Syntax
FMOD_RESULT FMOD_Sound_Get3DMinMaxDistance(
FMOD_SOUND *sound,
float *min,
float *max
);
C# Syntax
RESULT Sound.get3DMinMaxDistance(
out float min,
out float max
);
JavaScript Syntax
Sound.get3DMinMaxDistance(
min, // writes value to min.val
max // writes value to max.val
);
Parameters
min
Pointer to value to be filled with the minimum volume distance for the
sound. See remarks for more on units. Optional. Specify 0 or NULL to
ignore.
max
Pointer to value to be filled with the maximum volume distance for the
sound. See remarks for more on units. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
See System::set3DSettings for more on this.
The default units for minimum and maximum distances are 1.0 and 10,000.0f.
See Also
Sound::set3DMinMaxDistance
Channel::set3DMinMaxDistance
Channel::get3DMinMaxDistance
System::set3DSettings
C++ Syntax
FMOD_RESULT Sound::getDefaults(
float *frequency,
int *priority
);
C Syntax
FMOD_RESULT FMOD_Sound_GetDefaults(
FMOD_SOUND *sound,
float *frequency,
int *priority
);
C# Syntax
RESULT Sound.getDefaults(
out float frequency,
out int priority
);
JavaScript Syntax
Sound.getDefaults(
frequency, // writes value to frequency.val
priority // writes value to priority.val
);
Parameters
frequency
Address of a variable that receives the default frequency for the sound.
Optional. Specify 0 or NULL to ignore.
priority
Address of a variable that receives the default priority for the sound when
played on a channel. Result will be from 0 to 256. 0 = most important, 256
= least important. Default = 128. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Sound::setDefaults
System::createSound
System::playSound
C++ Syntax
FMOD_RESULT Sound::getFormat(
FMOD_SOUND_TYPE *type,
FMOD_SOUND_FORMAT *format,
int *channels,
int *bits
);
C Syntax
FMOD_RESULT FMOD_Sound_GetFormat(
FMOD_SOUND *sound,
FMOD_SOUND_TYPE *type,
FMOD_SOUND_FORMAT *format,
int *channels,
int *bits
);
C# Syntax
RESULT Sound.getFormat(
out SOUND_TYPE type,
out SOUND_FORMAT format,
out int channels,
out int bits
);
JavaScript Syntax
Sound.getFormat(
type, // writes value to type.val
format, // writes value to format.val
channels, // writes value to channels.val
bits // writes value to bits.val
);
Parameters
type
Address of a variable that receives the type of sound. Optional. Specify 0 or
NULL to ignore.
format
Address of a variable that receives the format of the sound. Optional.
Specify 0 or NULL to ignore.
channels
Address of a variable that receives the number of channels for the sound.
Optional. Specify 0 or NULL to ignore.
bits
Address of a variable that receives the number of bits per sample for the
sound. This corresponds to FMOD_SOUND_FORMAT but is provided as
an integer format for convenience. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_SOUND_TYPE
FMOD_SOUND_FORMAT
C++ Syntax
FMOD_RESULT Sound::getLength(
unsigned int *length,
FMOD_TIMEUNIT lengthtype
);
C Syntax
FMOD_RESULT FMOD_Sound_GetLength(
FMOD_SOUND *sound,
unsigned int *length,
FMOD_TIMEUNIT lengthtype
);
C# Syntax
RESULT Sound.getLength(
out uint length,
TIMEUNIT lengthtype
);
JavaScript Syntax
Sound.getLength(
length, // writes value to length.val
lengthtype
);
Parameters
length
Address of a variable that receives the length of the sound.
lengthtype
Time unit retrieve into the length parameter. See FMOD_TIMEUNIT.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Certain timeunits do not work depending on the file format. For example
FMOD_TIMEUNIT_MODORDER will not work with an mp3 file.
A length of 0xFFFFFFFF usually means it is of unlimited length, such as an
internet radio stream or MOD/S3M/XM/IT file which may loop forever.
Warning! Using a VBR source that does not have an associated length
information in milliseconds or pcm samples (such as MP3 or
MOD/S3M/XM/IT) may return inaccurate lengths specify
FMOD_TIMEUNIT_MS or FMOD_TIMEUNIT_PCM.
If you want FMOD to retrieve an accurate length it will have to pre-scan the file
first in this case. You will have to specify FMOD_ACCURATETIME when
loading or opening the sound. This means there is a slight delay as FMOD scans
the whole file when loading the sound to find the right length in millseconds or
pcm samples, and this also creates a seek table as it does this for seeking
purposes.
See Also
FMOD_TIMEUNIT
C++ Syntax
FMOD_RESULT Sound::getLoopCount(
int *loopcount
);
C Syntax
FMOD_RESULT FMOD_Sound_GetLoopCount(
FMOD_SOUND *sound,
int *loopcount
);
C# Syntax
RESULT Sound.getLoopCount(
out int loopcount
);
JavaScript Syntax
Sound.getLoopCount(
loopcount // writes value to loopcount.val
);
Parameters
loopcount
Address of a variable that receives the number of times a sound will loop by
default before stopping. 0 = oneshot. 1 = loop once then stop. -1 = loop
forever. Default = -1
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Unlike the channel loop count function, this function simply returns the value set
with Sound::setLoopCount. It does not decrement as it plays (especially seeing
as one sound can be played multiple times).
See Also
Sound::setLoopCount
C++ Syntax
FMOD_RESULT Sound::getLoopPoints(
unsigned int *loopstart,
FMOD_TIMEUNIT loopstarttype,
unsigned int *loopend,
FMOD_TIMEUNIT loopendtype
);
C Syntax
FMOD_RESULT FMOD_Sound_GetLoopPoints(
FMOD_SOUND *sound,
unsigned int *loopstart,
FMOD_TIMEUNIT loopstarttype,
unsigned int *loopend,
FMOD_TIMEUNIT loopendtype
);
C# Syntax
RESULT Sound.getLoopPoints(
out uint loopstart,
TIMEUNIT loopstarttype,
out uint loopend,
TIMEUNIT loopendtype
);
JavaScript Syntax
Sound.getLoopPoints(
loopstart, // writes value to loopstart.val
loopstarttype,
loopend, // writes value to loopend.val
loopendtype
);
Parameters
loopstart
Address of a variable to receive the loop start point. This point in time is
played, so it is inclusive. Optional. Specify 0 or NULL to ignore.
loopstarttype
The time format used for the returned loop start point. See
FMOD_TIMEUNIT.
loopend
Address of a variable to receive the loop end point. This point in time is
played, so it is inclusive. Optional. Specify 0 or NULL to ignore.
loopendtype
The time format used for the returned loop end point. See
FMOD_TIMEUNIT.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_TIMEUNIT
Sound::setLoopPoints
C++ Syntax
FMOD_RESULT Sound::getMode(
FMOD_MODE *mode
);
C Syntax
FMOD_RESULT FMOD_Sound_GetMode(
FMOD_SOUND *sound,
FMOD_MODE *mode
);
C# Syntax
RESULT Sound.getMode(
out MODE mode
);
JavaScript Syntax
Sound.getMode(
mode // writes value to mode.val
);
Parameters
mode
Address of a variable that receives the current mode for this sound.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Sound::setMode
System::createSound
Channel::setMode
Channel::getMode
C++ Syntax
FMOD_RESULT Sound::getMusicChannelVolume(
int channel,
float *volume
);
C Syntax
FMOD_RESULT FMOD_Sound_GetMusicChannelVolume(
FMOD_SOUND *sound,
int channel,
float *volume
);
C# Syntax
RESULT Sound.getMusicChannelVolume(
int channel,
out float volume
);
JavaScript Syntax
Sound.getMusicChannelVolume(
channel,
volume // writes value to volume.val
);
Parameters
channel
MOD/S3M/XM/IT/MIDI music subchannel to retrieve the volume for.
volume
Address of a variable to receive the volume of the channel from 0.0 to 1.0.
Default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use Sound::getMusicNumChannels to get the maximum number of music
channels in the song.
See Also
Sound::getMusicNumChannels
Sound::setMusicChannelVolume
C++ Syntax
FMOD_RESULT Sound::getMusicNumChannels(
int *numchannels
);
C Syntax
FMOD_RESULT FMOD_Sound_GetMusicNumChannels(
FMOD_SOUND *sound,
int *numchannels
);
C# Syntax
RESULT Sound.getMusicNumChannels(
out int numchannels
);
JavaScript Syntax
Sound.getMusicNumChannels(
numchannels // writes value to numchannels.val
);
Parameters
numchannels
Number of music channels used in the song.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Sound::setMusicChannelVolume
Sound::getMusicChannelVolume
C++ Syntax
FMOD_RESULT Sound::getMusicSpeed(
float *speed
);
C Syntax
FMOD_RESULT FMOD_Sound_GetMusicSpeed(
FMOD_SOUND *sound,
float *speed
);
C# Syntax
RESULT Sound.getMusicSpeed(
out float speed
);
JavaScript Syntax
Sound.getMusicSpeed(
speed // writes value to speed.val
);
Parameters
speed
Address of a variable to receive the relative speed of the song from 0.01 to
100.0. 0.5 = half speed, 2.0 = double speed. Default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Setting a speed outside the bounds of 0.01 to 100.0 will not return an error, it
will clamp the value.
See Also
Sound::setMusicSpeed
Sound::setMusicChannelVolume
Sound::getMusicChannelVolume
C++ Syntax
FMOD_RESULT Sound::getName(
char *name,
int namelen
);
C Syntax
FMOD_RESULT FMOD_Sound_GetName(
FMOD_SOUND *sound,
char *name,
int namelen
);
C# Syntax
RESULT Sound.getName(
StringBuilder name,
int namelen
);
JavaScript Syntax
Sound.getName(
name // writes value to name.val
);
Parameters
name
Address of a variable that receives the name of the sound encoded in a
UTF-8 string.
namelen
Length in bytes of the target buffer to receieve the string.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
if FMOD_LOWMEM has been specified in System::createSound, this function
will return "(null)".
JavaScript only :
Note: For the "name" parameter, the maximum string length is 512.
See Also
System::createSound
FMOD_MODE
C++ Syntax
FMOD_RESULT Sound::getNumSubSounds(
int *numsubsounds
);
C Syntax
FMOD_RESULT FMOD_Sound_GetNumSubSounds(
FMOD_SOUND *sound,
int *numsubsounds
);
C# Syntax
RESULT Sound.getNumSubSounds(
out int numsubsounds
);
JavaScript Syntax
Sound.getNumSubSounds(
numsubsounds // writes value to numsubsounds.val
);
Parameters
numsubsounds
Address of a variable that receives the number of subsounds stored within
this sound.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A format that has subsounds is usually a container format, such as FSB, DLS,
MOD, S3M, XM, IT.
See Also
Sound::getSubSound
C++ Syntax
FMOD_RESULT Sound::getNumSyncPoints(
int *numsyncpoints
);
C Syntax
FMOD_RESULT FMOD_Sound_GetNumSyncPoints(
FMOD_SOUND *sound,
int *numsyncpoints
);
C# Syntax
RESULT Sound.getNumSyncPoints(
out int numsyncpoints
);
JavaScript Syntax
Sound.getNumSyncPoints(
numsyncpoints // writes value to numsyncpoints.val
);
Parameters
numsyncpoints
Address of a variable to receive the number of sync points within this
sound.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
In sound forge, a marker can be added a wave file by clicking on the timeline /
ruler, and right clicking then selecting 'Insert Marker/Region'.
Riff wrapped mp3 files are also supported.
See Also
Sound::getSyncPoint
Sound::getSyncPointInfo
Sound::addSyncPoint
Sound::deleteSyncPoint
C++ Syntax
FMOD_RESULT Sound::getNumTags(
int *numtags,
int *numtagsupdated
);
C Syntax
FMOD_RESULT FMOD_Sound_GetNumTags(
FMOD_SOUND *sound,
int *numtags,
int *numtagsupdated
);
C# Syntax
RESULT Sound.getNumTags(
out int numtags,
out int numtagsupdated
);
JavaScript Syntax
Sound.getNumTags(
numtags, // writes value to numtags.val
numtagsupdated // writes value to numtagsupdated.val
);
Parameters
numtags
Address of a variable that receives the number of tags in the sound.
Optional. Specify 0 or NULL to ignore.
numtagsupdated
Address of a variable that receives the number of tags updated since this
function was last called. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The 'numtagsupdated' parameter can be used to check if any tags have been
updated since last calling this function.
This can be useful to update tag fields, for example from internet based streams,
such as shoutcast or icecast where the name of the song might change.
See Also
Sound::getTag
C++ Syntax
FMOD_RESULT Sound::getOpenState(
FMOD_OPENSTATE *openstate,
unsigned int *percentbuffered,
bool *starving,
bool *diskbusy
);
C Syntax
FMOD_RESULT FMOD_Sound_GetOpenState(
FMOD_SOUND *sound,
FMOD_OPENSTATE *openstate,
unsigned int *percentbuffered,
FMOD_BOOL *starving,
FMOD_BOOL *diskbusy
);
C# Syntax
RESULT Sound.getOpenState(
out OPENSTATE openstate,
out uint percentbuffered,
out bool starving,
out bool diskbusy
);
JavaScript Syntax
Sound.getOpenState(
openstate, // writes value to openstate.val
percentbuffered, // writes value to percentbuffered.val
starving, // writes value to starving.val
diskbusy // writes value to diskbusy.val
);
Parameters
openstate
Address of a variable that receives the open state of a sound. Optional.
Specify 0 or NULL to ignore.
percentbuffered
Address of a variable that receives the percentage of the file buffer filled
progress of a stream. Optional. Specify 0 or NULL to ignore.
starving
Address of a variable that receives the starving state of a sound. If a stream
has decoded more than the stream file buffer has ready for it, it will return
TRUE. Optional. Specify 0 or NULL to ignore.
diskbusy
Address of a variable that receives the disk busy state of a sound. That is,
whether the disk is currently being accessed for the sound.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When a sound is opened with FMOD_NONBLOCKING, it is opened and
prepared in the background, or asynchronously.
This allows the main application to execute without stalling on audio loads.
This function will describe the state of the asynchronous load routine i.e.
whether it has succeeded, failed or is still in progress.
If 'starving' is true, then you will most likely hear a stuttering/repeating sound as
the decode buffer loops on itself and replays old data.
Now that this variable exists, you can detect buffer underrun and use something
like Channel::setMute to keep it quiet until it is not starving any more.
Note: Always check 'openstate' to determine the state of the sound. Do not
assume that if this function returns FMOD_OK then the sound has finished
loading.
See Also
FMOD_OPENSTATE
FMOD_MODE
Channel::setMute
C++ Syntax
FMOD_RESULT Sound::getSoundGroup(
FMOD::SoundGroup **soundgroup
);
C Syntax
FMOD_RESULT FMOD_Sound_GetSoundGroup(
FMOD_SOUND *sound,
FMOD_SOUNDGROUP **soundgroup
);
C# Syntax
RESULT Sound.getSoundGroup(
out SoundGroup soundgroup
);
JavaScript Syntax
Sound.getSoundGroup(
soundgroup // writes value to soundgroup.val
);
Parameters
soundgroup
Address of a pointer to a SoundGroup to receive the sound's current
soundgroup.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Sound::setSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT Sound::getSubSound(
int index,
FMOD::Sound **subsound
);
C Syntax
FMOD_RESULT FMOD_Sound_GetSubSound(
FMOD_SOUND *sound,
int index,
FMOD_SOUND **subsound
);
C# Syntax
RESULT Sound.getSubSound(
int index,
out Sound subsound
);
JavaScript Syntax
Sound.getSubSound(
index,
subsound // writes value to subsound.val
);
Parameters
index
Index of the subsound to retrieve within this sound.
subsound
Address of a variable that receives the sound object specified.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If the sound is a stream and FMOD_NONBLOCKING was not used, then this
call will perform a blocking seek/flush to the specified subsound.
C++ Syntax
FMOD_RESULT Sound::getSubSoundParent(
FMOD::Sound **parentsound
);
C Syntax
FMOD_RESULT FMOD_Sound_GetSubSoundParent(
FMOD_SOUND *sound,
FMOD_SOUND **parentsound
);
C# Syntax
RESULT Sound.getSubSoundParent(
out Sound parentsound
);
JavaScript Syntax
Sound.getSubSoundParent(
parentsound // writes value to parentsound.val
);
Parameters
parentsound
Address of a variable that receives the sound object specified.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If the sound is not a subsound, the parentsound will be returned as NULL.
See Also
Sound::getNumSubSounds
Sound::getSubSound
C++ Syntax
FMOD_RESULT Sound::getSyncPoint(
int index,
FMOD_SYNCPOINT **point
);
C Syntax
FMOD_RESULT FMOD_Sound_GetSyncPoint(
FMOD_SOUND *sound,
int index,
FMOD_SYNCPOINT **point
);
C# Syntax
RESULT Sound.getSyncPoint(
int index,
out IntPtr point
);
JavaScript Syntax
Sound.getSyncPoint(
);
Parameters
index
Index of the sync point to retrieve. Use Sound::getNumSyncPoints to
determine the number of syncpoints.
point
Address of a variable to receive a pointer to a sync point.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
In sound forge, a marker can be added a wave file by clicking on the timeline /
ruler, and right clicking then selecting 'Insert Marker/Region'.
Riff wrapped mp3 files are also supported.
JavaScript only :
C++ Syntax
FMOD_RESULT Sound::getSyncPointInfo(
FMOD_SYNCPOINT *point,
char *name,
int namelen,
unsigned int *offset,
FMOD_TIMEUNIT offsettype
);
C Syntax
FMOD_RESULT FMOD_Sound_GetSyncPointInfo(
FMOD_SOUND *sound,
FMOD_SYNCPOINT *point,
char *name,
int namelen,
unsigned int *offset,
FMOD_TIMEUNIT offsettype
);
C# Syntax
RESULT Sound.getSyncPointInfo(
IntPtr point,
StringBuilder name,
int namelen,
out uint offset,
TIMEUNIT offsettype
);
JavaScript Syntax
Sound.getSyncPointInfo(
);
Parameters
point
Pointer to a sync point. Use Sound::getSyncPoint to retrieve a syncpoint or
Sound::addSyncPoint to create one.
name
Address of a variable to receive the name of the syncpoint. Optional.
Specify 0 or NULL to ignore.
namelen
Size of buffer in bytes for name parameter. FMOD will only copy to this
point if the string is bigger than the buffer passed in. Specify 0 to ignore
name parameter.
offset
Address of a variable to receieve the offset of the syncpoint in a format
determined by the offsettype parameter. Optional. Specify 0 or NULL to
ignore.
offsettype
A timeunit parameter to determine a desired format for the offset parameter.
For example the offset can be specified as pcm samples, or milliseconds.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
In sound forge, a marker can be added a wave file by clicking on the timeline /
ruler, and right clicking then selecting 'Insert Marker/Region'.
Riff wrapped mp3 files are also supported.
JavaScript only :
C++ Syntax
FMOD_RESULT Sound::getSystemObject(
FMOD::System **system
);
C Syntax
FMOD_RESULT FMOD_Sound_GetSystemObject(
FMOD_SOUND *sound,
FMOD_SYSTEM **system
);
C# Syntax
RESULT Sound.getSystemObject(
out System system
);
JavaScript Syntax
Sound.getSystemObject(
system // writes value to system.val
);
Parameters
system
Address of a pointer that receives the System object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createSound
C++ Syntax
FMOD_RESULT Sound::getTag(
const char *name,
int index,
FMOD_TAG *tag
);
C Syntax
FMOD_RESULT FMOD_Sound_GetTag(
FMOD_SOUND *sound,
const char *name,
int index,
FMOD_TAG *tag
);
C# Syntax
RESULT Sound.getTag(
string name,
int index,
out TAG tag
);
JavaScript Syntax
Sound.getTag(
name,
index,
tag // writes value to tag.val
);
Parameters
name
Optional. Name of a tag to retrieve. Used to specify a particular tag if the
user requires it. To get all types of tags leave this parameter as 0 or NULL.
index
Index into the tag list. If the name parameter is null, then the index is the
index into all tags present, from 0 up to but not including the numtags value
returned by Sound::getNumTags.
If name is not null, then index is the index from 0 up to the number of tags
with the same name. For example if there were 2 tags with the name
"TITLE" then you could use 0 and 1 to reference them.
Specifying an index of -1 returns new or updated tags. This can be used to
pull tags out as they are added or updated.
tag
Pointer to a tag structure. This will receive all the details regarding the tag
specified by name / index.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The number of tags available can be found with Sound::getNumTags. The way
to display or retrieve tags can be done in 3 different ways.
All tags can be continuously retrieved by looping from 0 to the numtags value in
Sound::getNumTags - 1. Updated tags will refresh automatically, and the
'updated' member of the FMOD_TAG structure will be set to true if a tag has
been updated, due to something like a netstream changing the song name for
example.
Tags could also be retrieved by specifying -1 as the index and only updating tags
that are returned. If all tags are retrieved and this function is called the function
will return an error of FMOD_ERR_TAGNOTFOUND.
Specific tags can be retrieved by specifying a name parameter. The index can be
0 based or -1 in the same fashion as described previously.
See Also
Sound::getNumTags
FMOD_TAG
C++ Syntax
FMOD_RESULT Sound::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_Sound_GetUserData(
FMOD_SOUND *sound,
void **userdata
);
C# Syntax
RESULT Sound.getUserData(
out IntPtr userdata
);
JavaScript Syntax
Sound.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of a pointer that receives the data specified with the
Sound::setUserData function.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Sound::setUserData
C++ Syntax
FMOD_RESULT Sound::lock(
unsigned int offset,
unsigned int length,
void **ptr1,
void **ptr2,
unsigned int *len1,
unsigned int *len2
);
C Syntax
FMOD_RESULT FMOD_Sound_Lock(
FMOD_SOUND *sound,
unsigned int offset,
unsigned int length,
void **ptr1,
void **ptr2,
unsigned int *len1,
unsigned int *len2
);
C# Syntax
RESULT Sound.lock(
uint offset,
uint length,
out IntPtr ptr1,
out IntPtr ptr2,
out uint len1,
out uint len2
);
JavaScript Syntax
Sound.lock(
offset,
length,
ptr1, // writes value to ptr1.val
ptr2, // writes value to ptr2.val
len1, // writes value to len1.val
len2 // writes value to len2.val
);
Parameters
offset
Offset in bytes to the position you want to lock in the sample buffer.
length
Number of bytes you want to lock in the sample buffer.
ptr1
Address of a pointer that will point to the first part of the locked data.
ptr2
Address of a pointer that will point to the second part of the locked data.
This will be null if the data locked hasn't wrapped at the end of the buffer.
len1
Length of data in bytes that was locked for ptr1.
len2
Length of data in bytes that was locked for ptr2. This will be 0 if the data
locked hasn't wrapped at the end of the buffer.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You must always unlock the data again after you have finished with it, using
Sound::unlock.
With this function you get access to the RAW audio data, for example 8, 16, 24
or 32bit PCM data, mono or stereo data. You must take this into consideration
when processing the data within the pointer.
See Also
Sound::unlock
System::createSound
C++ Syntax
FMOD_RESULT Sound::readData(
void *buffer,
unsigned int lenbytes,
unsigned int *read
);
C Syntax
FMOD_RESULT FMOD_Sound_ReadData(
FMOD_SOUND *sound,
void *buffer,
unsigned int lenbytes,
unsigned int *read
);
C# Syntax
RESULT Sound.readData(
IntPtr buffer,
uint length,
out uint read
);
JavaScript Syntax
Sound.readData(
buffer, // writes value to buffer.val
length,
read // writes value to read.val
);
Parameters
buffer
Address of a buffer that receives the decoded data from the sound.
lenbytes
Number of bytes to read into the buffer.
read
Number of bytes actually read.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If too much data is read, it is possible FMOD_ERR_FILE_EOF will be returned,
meaning it is out of data. The 'read' parameter will reflect this by returning a
smaller number of bytes read than was requested.
As a sound already reads the whole file then closes it upon calling
System::createSound (unless System::createStream or
FMOD_CREATESTREAM is used), this function will not work because the file
is no longer open.
Note that opening a stream makes it read a chunk of data and this will advance
the read cursor. You need to either use FMOD_OPENONLY to stop the stream
pre-buffering or call Sound::seekData to reset the read cursor.
If FMOD_OPENONLY flag is used when opening a sound, it will leave the file
handle open, and FMOD will not read any data internally, so the read cursor will
be at position 0. This will allow the user to read the data from the start.
As noted previously, if a sound is opened as a stream and this function is called
to read some data, then you will 'miss the start' of the sound.
Channel::setPosition will have the same result. These function will flush the
stream buffer and read in a chunk of audio internally. This is why if you want to
read from an absolute position you should use Sound::seekData and not the
previously mentioned functions.
Remember if you are calling readData and seekData on a stream it is up to you
to cope with the side effects that may occur. Information functions such as
Channel::getPosition may give misleading results. Calling Channel::setPosition
will reset and flush the stream, leading to the time values returning to their
correct position.
NOTE! Thread safety. If you call this from another stream callback, or any other
thread besides the main thread, make sure to put a criticalsection around the call,
and another around Sound::release in case the sound is still being read from
while releasing.
This function is thread safe to call from a stream callback or different thread as
long as it doesnt conflict with a call to Sound::release.
See Also
Sound::seekData
FMOD_MODE
Channel::setPosition
System::createSound
System::createStream
Sound::release
C++ Syntax
FMOD_RESULT Sound::release();
C Syntax
FMOD_RESULT FMOD_Sound_Release(FMOD_SOUND *sound);
C# Syntax
RESULT Sound.release();
JavaScript Syntax
Sound.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This will free the sound object and everything created under it.
C++ Syntax
FMOD_RESULT Sound::seekData(
unsigned int pcm
);
C Syntax
FMOD_RESULT FMOD_Sound_SeekData(
FMOD_SOUND *sound,
unsigned int pcm
);
C# Syntax
RESULT Sound.seekData(
uint pcm
);
JavaScript Syntax
Sound.seekData(
pcm
);
Parameters
pcm
Offset to seek to in PCM samples.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note. If a stream is opened and this function is called to read some data, then it
will advance the internal file pointer, so data will be skipped if you play the
stream. Also calling position / time information functions will lead to misleading
results.
A stream can be reset before playing by setting the position of the channel (ie
using Channel::setPosition), which will make it seek, reset and flush the stream
buffer. This will make it sound correct again.
Remember if you are calling readData and seekData on a stream it is up to you
to cope with the side effects that may occur.
See Also
Sound::readData
Channel::setPosition
C++ Syntax
FMOD_RESULT Sound::set3DConeSettings(
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
C Syntax
FMOD_RESULT FMOD_Sound_Set3DConeSettings(
FMOD_SOUND *sound,
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
C# Syntax
RESULT Sound.set3DConeSettings(
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
JavaScript Syntax
Sound.set3DConeSettings(
insideconeangle,
outsideconeangle,
outsidevolume
);
Parameters
insideconeangle
Inside cone angle, in degrees, from 0 to 360. This is the angle within which
the sound is at its normal volume. Must not be greater than
outsideconeangle. Default = 360.
outsideconeangle
Outside cone angle, in degrees, from 0 to 360. This is the angle outside of
which the sound is at its outside volume. Must not be less than
insideconeangle. Default = 360.
outsidevolume
Cone outside volume, from 0 to 1.0. Default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Sound::get3DConeSettings
Channel::set3DConeSettings
C++ Syntax
FMOD_RESULT Sound::set3DCustomRolloff(
FMOD_VECTOR *points,
int numpoints
);
C Syntax
FMOD_RESULT FMOD_Sound_Set3DCustomRolloff(
FMOD_SOUND *sound,
FMOD_VECTOR *points,
int numpoints
);
C# Syntax
RESULT Sound.set3DCustomRolloff(
ref VECTOR points,
int numpoints
);
JavaScript Syntax
Sound.set3DCustomRolloff(
points,
numpoints
);
Parameters
points
An array of FMOD_VECTOR structures where x = distance and y =
volume from 0.0 to 1.0. z should be set to 0.
numpoints
The number of points in the array.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note! This function does not duplicate the memory for the points internally. The
pointer you pass to FMOD must remain valid until there is no more use for it.
Do not free the memory while in use, or use a local variable that goes out of
scope while in use.
Points must be sorted by distance! Passing an unsorted list to FMOD will result
in an error.
MinDistance is the minimum distance that the sound emitter will cease to
continue growing louder at (as it approaches the listener).
Within the mindistance it stays at the constant loudest volume possible. Outside
of this mindistance it begins to attenuate.
MaxDistance is the distance a sound stops attenuating at. Beyond this point it
will stay at the volume it would be at maxdistance units from the listener and
will not attenuate any more.
MinDistance is useful to give the impression that the sound is loud or soft in 3D
space. An example of this is a small quiet object, such as a bumblebee, which
you could set a mindistance of to 0.1 for example, which would cause it to
attenuate quickly and dissapear when only a few meters away from the listener.
Another example is a jumbo jet, which you could set to a mindistance of 100.0,
which would keep the sound volume at max until the listener was 100 meters
away, then it would be hundreds of meters more before it would fade out.
C++ Syntax
FMOD_RESULT Sound::set3DMinMaxDistance(
float min,
float max
);
C Syntax
FMOD_RESULT FMOD_Sound_Set3DMinMaxDistance(
FMOD_SOUND *sound,
float min,
float max
);
C# Syntax
RESULT Sound.set3DMinMaxDistance(
float min,
float max
);
JavaScript Syntax
Sound.set3DMinMaxDistance(
min,
max
);
Parameters
min
The sound's minimum volume distance in "units". See remarks for more on
units.
max
The sound's maximum volume distance in "units". See remarks for more on
units.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
See System::set3DSettings for more on this.
The default units for minimum and maximum distances are 1.0 and 10,000.0f.
See Also
Sound::get3DMinMaxDistance
Channel::set3DMinMaxDistance
Channel::get3DMinMaxDistance
System::set3DSettings
C++ Syntax
FMOD_RESULT Sound::setDefaults(
float frequency,
int priority
);
C Syntax
FMOD_RESULT FMOD_Sound_SetDefaults(
FMOD_SOUND *sound,
float frequency,
int priority
);
C# Syntax
RESULT Sound.setDefaults(
float frequency,
int priority
);
JavaScript Syntax
Sound.setDefaults(
frequency,
priority
);
Parameters
frequency
Default playback frequency for the sound, in hz. (ie 44100hz).
priority
Default priority for the sound when played on a channel. 0 to 256. 0 = most
important, 256 = least important. Default = 128.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
There are no 'ignore' values for these parameters. Use Sound::getDefaults if you
want to change only 1 and leave others unaltered.
See Also
Sound::getDefaults
System::playSound
System::createSound
C++ Syntax
FMOD_RESULT Sound::setLoopCount(
int loopcount
);
C Syntax
FMOD_RESULT FMOD_Sound_SetLoopCount(
FMOD_SOUND *sound,
int loopcount
);
C# Syntax
RESULT Sound.setLoopCount(
int loopcount
);
JavaScript Syntax
Sound.setLoopCount(
loopcount
);
Parameters
loopcount
Number of times to loop before stopping. 0 = oneshot. 1 = loop once then
stop. -1 = loop forever. Default = -1
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Issues with streamed audio. (Sounds created with with System::createStream or
FMOD_CREATESTREAM).
When changing the loop count, sounds created with System::createStream or
FMOD_CREATESTREAM may already have been pre-buffered and executed
their loop logic ahead of time, before this call was even made.
This is dependant on the size of the sound versus the size of the stream decode
buffer. See FMOD_CREATESOUNDEXINFO.
If this happens, you may need to reflush the stream buffer. To do this, you can
call Channel::setPosition which forces a reflush of the stream buffer.
Note this will usually only happen if you have sounds or looppoints that are
smaller than the stream decode buffer size. Otherwise you will not normally
encounter any problems.
See Also
Sound::getLoopCount
System::setStreamBufferSize
FMOD_CREATESOUNDEXINFO
C++ Syntax
FMOD_RESULT Sound::setLoopPoints(
unsigned int loopstart,
FMOD_TIMEUNIT loopstarttype,
unsigned int loopend,
FMOD_TIMEUNIT loopendtype
);
C Syntax
FMOD_RESULT FMOD_Sound_SetLoopPoints(
FMOD_SOUND *sound,
unsigned int loopstart,
FMOD_TIMEUNIT loopstarttype,
unsigned int loopend,
FMOD_TIMEUNIT loopendtype
);
C# Syntax
RESULT Sound.setLoopPoints(
uint loopstart,
TIMEUNIT loopstarttype,
uint loopend,
TIMEUNIT loopendtype
);
JavaScript Syntax
Sound.setLoopPoints(
loopstart,
loopstarttype,
loopend,
loopendtype
);
Parameters
loopstart
The loop start point. This point in time is played, so it is inclusive.
loopstarttype
The time format used for the loop start point. See FMOD_TIMEUNIT.
loopend
The loop end point. This point in time is played, so it is inclusive.
loopendtype
The time format used for the loop end point. See FMOD_TIMEUNIT.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a sound was 44100 samples long and you wanted to loop the whole sound,
loopstart would be 0, and loopend would be 44099, not 44100. You wouldn't use
milliseconds in this case because they are not sample accurate.
If loop end is smaller or equal to loop start, it will result in an error.
If loop start or loop end is larger than the length of the sound, it will result in an
error.
C++ Syntax
FMOD_RESULT Sound::setMode(
FMOD_MODE mode
);
C Syntax
FMOD_RESULT FMOD_Sound_SetMode(
FMOD_SOUND *sound,
FMOD_MODE mode
);
C# Syntax
RESULT Sound.setMode(
MODE mode
);
JavaScript Syntax
Sound.setMode(
mode
);
Parameters
mode
Mode bits to set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When calling this function, note that it will only take effect when the sound is
played again with System::playSound. Consider this mode the 'default mode' for
when the sound plays, not a mode that will suddenly change all currently playing
instances of this sound.
Flags supported:
FMOD_LOOP_OFF
FMOD_LOOP_NORMAL
FMOD_LOOP_BIDI
FMOD_3D_HEADRELATIVE
FMOD_3D_WORLDRELATIVE
FMOD_2D
FMOD_3D
FMOD_3D_INVERSEROLLOFF
FMOD_3D_LINEARROLLOFF
FMOD_3D_LINEARSQUAREROLLOFF
FMOD_3D_CUSTOMROLLOFF
FMOD_3D_IGNOREGEOMETRY
C++ Syntax
FMOD_RESULT Sound::setMusicChannelVolume(
int channel,
float volume
);
C Syntax
FMOD_RESULT FMOD_Sound_SetMusicChannelVolume(
FMOD_SOUND *sound,
int channel,
float volume
);
C# Syntax
RESULT Sound.setMusicChannelVolume(
int channel,
float volume
);
JavaScript Syntax
Sound.setMusicChannelVolume(
channel,
volume
);
Parameters
channel
MOD/S3M/XM/IT/MIDI music subchannel to set a linear volume for.
volume
Volume of the channel from 0.0 to 1.0. Default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use Sound::getMusicNumChannels to get the maximum number of music
channels in the song.
See Also
Sound::getMusicNumChannels
Sound::getMusicChannelVolume
C++ Syntax
FMOD_RESULT Sound::setMusicSpeed(
float speed
);
C Syntax
FMOD_RESULT FMOD_Sound_SetMusicSpeed(
FMOD_SOUND *sound,
float speed
);
C# Syntax
RESULT Sound.setMusicSpeed(
float speed
);
JavaScript Syntax
Sound.setMusicSpeed(
speed
);
Parameters
speed
Relative speed of the song from 0.01 to 100.0. 0.5 = half speed, 2.0 =
double speed. Default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Setting a speed outside the bounds of 0.01 to 100.0 will not return an error, it
will clamp the value.
See Also
Sound::getMusicSpeed
Sound::setMusicChannelVolume
Sound::getMusicChannelVolume
C++ Syntax
FMOD_RESULT Sound::setSoundGroup(
FMOD::SoundGroup *soundgroup
);
C Syntax
FMOD_RESULT FMOD_Sound_SetSoundGroup(
FMOD_SOUND *sound,
FMOD_SOUNDGROUP *soundgroup
);
C# Syntax
RESULT Sound.setSoundGroup(
SoundGroup soundgroup
);
JavaScript Syntax
Sound.setSoundGroup(
soundgroup
);
Parameters
soundgroup
Address of a SoundGroup object to move the sound to.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
By default a sound is located in the 'master sound group'. This can be retrieved
with System::getMasterSoundGroup.
Putting a sound in a sound group (or just using the master sound group) allows
for functionality like limiting a group of sounds to a certain number of playbacks
(see SoundGroup::setMaxAudible).
See Also
Sound::getSoundGroup
System::getMasterSoundGroup
System::createSoundGroup
SoundGroup::setMaxAudible
C++ Syntax
FMOD_RESULT Sound::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_Sound_SetUserData(
FMOD_SOUND *sound,
void *userdata
);
C# Syntax
RESULT Sound.setUserData(
IntPtr userdata
);
JavaScript Syntax
Sound.setUserData(
userdata
);
Parameters
userdata
Address of user data that the user wishes stored within the Sound object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
It can be useful if an FMOD callback passes an object of this type as a
parameter, and the user does not know which object it is (if many of these types
of objects exist). Using Sound::getUserData would help in the identification of
the object.
See Also
Sound::getUserData
C++ Syntax
FMOD_RESULT Sound::unlock(
void *ptr1,
void *ptr2,
unsigned int len1,
unsigned int len2
);
C Syntax
FMOD_RESULT FMOD_Sound_Unlock(
FMOD_SOUND *sound,
void *ptr1,
void *ptr2,
unsigned int len1,
unsigned int len2
);
C# Syntax
RESULT Sound.unlock(
IntPtr ptr1,
IntPtr ptr2,
uint len1,
uint len2
);
JavaScript Syntax
Sound.unlock(
ptr1,
ptr2,
len1,
len2
);
Parameters
ptr1
Pointer to the 1st locked portion of sample data, from Sound::lock.
ptr2
Pointer to the 2nd locked portion of sample data, from Sound::lock.
len1
Length of data in bytes that was locked for ptr1.
len2
Length of data in bytes that was locked for ptr2. This will be 0 if the data
locked hasn't wrapped at the end of the buffer.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Sound::lock
System::createSound
C++ Syntax
FMOD_RESULT ChannelControl::addDSP(
int index,
DSP *dsp
);
Parameters
index
dsp
C++ Syntax
FMOD_RESULT ChannelControl::addFadePoint(
unsigned long long dspclock,
float volume
);
Parameters
dspclock
DSP clock of the parent channel group to set the fade point volume.
volume
C++ Syntax
FMOD_RESULT ChannelControl::get3DAttributes(
FMOD_VECTOR *pos,
FMOD_VECTOR *vel,
FMOD_VECTOR *alt_pan_pos
);
Parameters
pos
Address of a variable that receives the position in 3D space used for panning and
attenuation. Optional, specify 0 or NULL to ignore.
vel
Address of a variable that receives the velocity in 'distance units per second' (see
remarks) in 3D space. Optional, specify 0 or NULL to ignore.
alt_pan_pos
(Unimplemented).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
See Also
ChannelControl::set3DAttributes
System::set3DSettings
FMOD_VECTOR
C++ Syntax
FMOD_RESULT ChannelControl::get3DConeOrientation(
FMOD_VECTOR *orientation
);
Parameters
orientation
Address of a variable that receives the coordinates of the sound cone orientation
vector, the vector information represents the center of the sound cone.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DConeOrientation
C++ Syntax
FMOD_RESULT ChannelControl::get3DConeSettings(
float *insideconeangle,
float *outsideconeangle,
float *outsidevolume
);
Parameters
insideconeangle
Address of a variable that receives the inside cone angle, in degrees. This is the
angle within which the sound is at its normal volume.
outsideconeangle
Address of a variable that receives the outside cone angle, in degrees. This is the
angle outside of which the sound is at its outside volume.
outsidevolume
C++ Syntax
FMOD_RESULT ChannelControl::get3DCustomRolloff(
FMOD_VECTOR **points,
int *numpoints
);
Parameters
points
Address of a variable to receive the pointer to the current custom rolloff point
list. Optional, specify 0 or NULL to ignore.
numpoints
C++ Syntax
FMOD_RESULT ChannelControl::get3DDistanceFilter(
bool *custom,
float *customLevel,
float *centerFreq
);
Parameters
custom
customLevel
centerFreq
C++ Syntax
FMOD_RESULT ChannelControl::get3DDopplerLevel(
float *level
);
Parameters
level
Address of a variable to receives the doppler scale from 0.0 (none), to 1.0
(normal) to 5.0 (exaggerated).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DDopplerLevel
C++ Syntax
FMOD_RESULT ChannelControl::get3DLevel(
float *level
);
Parameters
level
3D pan level from 0.0 (attenuation is ignored and panning as set by 2D panning
functions) to 1.0 (pan and attenuate according to 3D position).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DPanLevel
C++ Syntax
FMOD_RESULT ChannelControl::get3DMinMaxDistance(
float *mindistance,
float *maxdistance
);
Parameters
mindistance
Address of a variable that receives the minimum volume distance in 'units' (see
remarks). Optional, specify 0 or NULL to ignore.
maxdistance
Address of a variable that receives the maximum volume distance in 'units' (see
remarks). Optional, specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
See Also
ChannelControl::set3DMinMaxDistance
System::set3DSettings
C++ Syntax
FMOD_RESULT ChannelControl::get3DOcclusion(
float *directocclusion,
float *reverbocclusion
);
Parameters
directocclusion
Address of a variable that receives the occlusion factor for the direct path.
reverbocclusion
Address of a variable that receives the occlusion factor for the reverb mix.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DOcclusion
C++ Syntax
FMOD_RESULT ChannelControl::get3DSpread(
float *angle
);
Parameters
angle
C++ Syntax
FMOD_RESULT ChannelControl::getAudibility(
float *audibility
);
Parameters
audibility
See the Virtual Voice System page for more details about how the audibility is
calculated.
See Also
Channel::isVirtual
ChannelControl::getVolume
ChannelControl::get3DOcclusion
ChannelControl::get3DAttributes
FMOD_DSP_PARAMETER_OVERALLGAIN
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN
C++ Syntax
FMOD_RESULT ChannelControl::getDSP(
int index,
DSP **dsp
);
Parameters
index
dsp
C++ Syntax
FMOD_RESULT ChannelControl::getDSPClock(
unsigned long long *dspclock,
unsigned long long *parentclock
);
Parameters
dspclock
Address of a variable to receive the DSP clock value for the head DSP node.
parentclock
Address of a variable to receive the DSP clock value for the tail DSP node.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use result with ChannelControl::setDelay to play a sound on an exact tick in the
future, or stop it in the future.
Note that when delaying a channel or channel group you want to sync it to the
parent channel group DSP clock value, not its own DSP clock value.
See Also
ChannelControl::setDelay
ChannelControl::getDelay
C++ Syntax
FMOD_RESULT ChannelControl::getDSPIndex(
DSP *dsp,
int *index
);
Parameters
dsp
index
Address of a variable to receive the offset in the DSP chain of the specified DSP.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setDSPIndex
C++ Syntax
FMOD_RESULT ChannelControl::getDelay(
unsigned long long *dspclock_start,
unsigned long long *dspclock_end,
bool *stopchannels
);
Parameters
dspclock_start
Address of a variable that receives the DSP clock of the parent channel group to
audibly start playing sound at. Optional, specify 0 or NULL to ignore.
dspclock_end
Address of a variable that receives the DSP clock of the parent channel group to
audibly stop playing sound at. Optional, specify 0 or NULL to ignore.
stopchannels
C++ Syntax
FMOD_RESULT ChannelControl::getFadePoints(
unsigned int *numpoints,
unsigned long long *point_dspclock,
float *point_volume
);
Parameters
numpoints
Address of a variable to receive the number of fade points stored within the
Channel or ChannelGroup.
point_dspclock
point_volume
C++ Syntax
FMOD_RESULT ChannelControl::getLowPassGain(
float *gain
);
Parameters
gain
Address of a variable that receives the linear gain level, from 0 (silent) to 1.0
(full volume).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setLowPassGain
C++ Syntax
FMOD_RESULT ChannelControl::getMixMatrix(
float *matrix,
int *outchannels,
int *inchannels,
int matrixhop
);
Parameters
matrix
outchannels
inchannels
matrixhop
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion.
The matrix size will generally be the size of the number of channels in the
current speaker mode. Use System::getSoftwareFormat to determine this.
Passing NULL for 'matrix' will allow you to query 'outchannels' and 'inchannels'
without copying any data.
See Also
ChannelControl::setMixMatrix
System::getSoftwareFormat
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT ChannelControl::getMode(
FMOD_MODE *mode
);
Parameters
mode
C++ Syntax
FMOD_RESULT ChannelControl::getMute(
bool *mute
);
Parameters
mute
Address of a variable that receives the current mute state, true = mute (silent),
false = normal volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setMute
C++ Syntax
FMOD_RESULT ChannelControl::getNumDSPs(
int *numdsps
);
Parameters
numdsps
Address of a variable that receives the number of DSP units in the DSP chain.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addDSP
ChannelControl::removeDSP
ChannelControl::getDSP
C++ Syntax
FMOD_RESULT ChannelControl::getPaused(
bool *paused
);
Parameters
paused
Address of a variable that receives the current paused state, true = paused, false
= not paused.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setPaused
C++ Syntax
FMOD_RESULT ChannelControl::getPitch(
float *pitch
);
Parameters
pitch
Address of a variable to receive the pitch value, 0.5 = half pitch, 2.0 = double
pitch, etc.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setPitch
Channel::setFrequency
Channel::getFrequency
C++ Syntax
FMOD_RESULT ChannelControl::getReverbProperties(
int instance,
float *wet
);
Parameters
instance
wet
Address of a variable that receives the send level for the signal to the reverb,
from 0 (none) to 1.0 (full).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setReverbProperties
C++ Syntax
FMOD_RESULT ChannelControl::getSystemObject(
System **system
);
Parameters
system
C++ Syntax
FMOD_RESULT ChannelControl::getUserData(
void **userdata
);
Parameters
userdata
Address of a variable to receives data that the user has stored within this object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setUserData
C++ Syntax
FMOD_RESULT ChannelControl::getVolume(
float *volume
);
Parameters
volume
C++ Syntax
FMOD_RESULT ChannelControl::getVolumeRamp(
bool *ramp
);
Parameters
ramp
C++ Syntax
FMOD_RESULT ChannelControl::isPlaying(
bool *isplaying
);
Parameters
isplaying
Address of a variable that receives the current playing status, true = currently
playing a sound, false = not playing a sound.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::playSound
System::playDSP
C++ Syntax
FMOD_RESULT ChannelControl::removeDSP(
DSP *dsp
);
Parameters
dsp
Pointer to a DSP unit (that exists in the DSP chain) you wish to remove.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addDSP
ChannelControl::getDSP
ChannelControl::getNumDSPs
C++ Syntax
FMOD_RESULT ChannelControl::removeFadePoints(
unsigned long long dspclock_start,
unsigned long long dspclock_end
);
Parameters
dspclock_start
DSP clock of the parent channel group to start removing fade points from.
dspclock_end
DSP clock of the parent channel group to start removing fade points to.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addFadePoint
ChannelControl::getFadePoints
C++ Syntax
FMOD_RESULT ChannelControl::set3DAttributes(
const FMOD_VECTOR *pos,
const FMOD_VECTOR *vel,
const FMOD_VECTOR *alt_pan_pos
);
Parameters
pos
vel
alt_pan_pos
(Unimplemented).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
For a stereo 3D sound, you can set the spread of the left/right parts in speaker
space by using ChannelControl::set3DSpread.
Vectors should use your chosen coordinate system, see 3D sounds for more
information.
See Also
ChannelControl::get3DAttributes
ChannelControl::set3DSpread
System::set3DSettings
FMOD_VECTOR
C++ Syntax
FMOD_RESULT ChannelControl::set3DConeOrientation(
FMOD_VECTOR *orientation
);
Parameters
orientation
C++ Syntax
FMOD_RESULT ChannelControl::set3DConeSettings(
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
Parameters
insideconeangle
Inside cone angle, in degrees. This is the angle within which the sound is at its
normal volume. Must not be greater than 'outsideconeangle'. Default = 360.
outsideconeangle
Outside cone angle, in degrees. This is the angle outside of which the sound is at
its outside volume. Must not be less than 'insideconeangle'. Default = 360.
outsidevolume
C++ Syntax
FMOD_RESULT ChannelControl::set3DCustomRolloff(
FMOD_VECTOR *points,
int numpoints
);
Parameters
points
numpoints
Points must be sorted by distance! Passing an unsorted list to FMOD will result
in an error.
Note that after the highest distance specified, the volume in the last entry is used
from that distance onwards.
C++ Syntax
FMOD_RESULT ChannelControl::set3DDistanceFilter(
bool custom,
float customLevel,
float centerFreq
);
Parameters
custom
customLevel
centerFreq
Specify a center frequency in hz for the high-pass filter used to simulate distance
attenuation, from 10.0 to 22050.0. Default = 1500.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::get3DDistanceFilter
C++ Syntax
FMOD_RESULT ChannelControl::set3DDopplerLevel(
float level
);
Parameters
level
Doppler scale from 0.0 (none), to 1.0 (normal) to 5.0 (exaggerated), default =
1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::get3DDopplerLevel
C++ Syntax
FMOD_RESULT ChannelControl::set3DLevel(
float level
);
Parameters
level
3D pan level from 0.0 (attenuation is ignored and panning as set by 2D panning
functions) to 1.0 (pan and attenuate according to 3D position), default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Only affects sounds created FMOD_3D.
Useful for morhping a sound between 3D and 2D. This is most common in
volumetric sound, when the sound goes from directional, to 'all around you' (and
doesn't pan according to listener position / direction).
See Also
ChannelControl::get3DLevel
ChannelControl::setPan
ChannelControl::setMixLevelsOutput
ChannelControl::setMixLevelsInput
ChannelControl::setMixMatrix
C++ Syntax
FMOD_RESULT ChannelControl::set3DMinMaxDistance(
float mindistance,
float maxdistance
);
Parameters
mindistance
maxdistance
Minimum distance is useful to give the impression that the sound is loud or soft
in 3D space. An example of this is a small quiet object, such as a bumblebee,
which you could set a small mindistance such as 0.1. This would cause it to
attenuate quickly and dissapear when only a few meters away from the listener.
Another example is a jumbo jet, which you could set to a mindistance of 100.0
causing the volume to stay at its loudest until the listener was 100 meters away,
then it would be hundreds of meters more before it would fade out.
Maximum distance is effectively obsolete unless you need the sound to stop
fading out at a certain point. Do not adjust this from the default if you dont need
to. Some people have the confusion that maxdistance is the point the sound will
fade out to zero, this is not the case.
C++ Syntax
FMOD_RESULT ChannelControl::set3DOcclusion(
float directocclusion,
float reverbocclusion
);
Parameters
directocclusion
Occlusion factor for the direct path, from 0.0 (not occluded) to 1.0 (fully
occluded), default = 0.0.
reverbocclusion
Occlusion factor for the reverb mix, from 0.0 (not occluded) to 1.0 (fully
occluded), default = 0.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Normally the volume is simply attenuated by the 'directocclusion' factor
however if FMOD_INIT_CHANNEL_LOWPASS is specified frequency
filtering will be used with a very small CPU hit.
See Also
ChannelControl::get3DOcclusion
FMOD_INIT_CHANNEL_LOWPASS
C++ Syntax
FMOD_RESULT ChannelControl::set3DSpread(
float angle
);
Parameters
angle
Speaker spread angle. 0 = all sound channels are located at the same speaker
location and is 'mono'. 360 = all sound channels are located at the opposite
speaker location to the speaker location that it should be according to 3D
position. Default = 0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Normally a 3D sound is aimed at one position in a speaker array depending on
the 3D position to give it direction. Left and right parts of a stereo sound for
example are consequently summed together and become 'mono'. When
increasing the 'spread' of a sound, the left and right parts of a stereo sound rotate
away from their original position, to give it more 'stereoness'. The rotation of the
sound channels are done in 'speaker space'.
Multichannel sounds with channel counts greater than stereo have their sub-
channels spread evently through the specified angle. For example a 6 channel
sound over a 90 degree spread has each channel located 15 degrees apart from
each other in the speaker array.
Mono sounds are spread as if they were a stereo signal, i.e. the signal is split into
2. The power will remain the same as it spreads around the speakers.
1. A spread angle of 0 makes the stereo sound mono at the point of the 3D
emitter.
2. A spread angle of 90 makes the left part of the stereo sound place itself at
45 degrees to the left and the right part 45 degrees to the right.
3. A spread angle of 180 makes the left part of the stero sound place itself at
90 degrees to the left and the right part 90 degrees to the right.
4. A spread angle of 360 makes the stereo sound mono at the opposite speaker
location to where the 3D emitter should be located (by moving the left part
180 degrees left and the right part 180 degrees right). So in this case, behind
you when the sound should be in front of you!
See Also
ChannelControl::get3DSpread
C++ Syntax
FMOD_RESULT ChannelControl::setCallback(
FMOD_CHANNELCONTROL_CALLBACK callback
);
Parameters
callback
Callbacks are stdcall. Use F_CALLBACK in between your return type and
function name.
FMOD_RESULT F_CALLBACK mycallback(FMOD_CHANNELCONTROL *chanControl,
{
if (controlType == FMOD_CHANNELCONTROL_TYPE_CHANNEL)
{
FMOD::Channel *channel = (FMOD::Channel *)chanControl;
// Channel specific functions here...
}
else
{
FMOD::ChannelGroup *group = (FMOD::ChannelGroup *)chanControl;
// ChannelGroup specific functions here...
}
return FMOD_OK;
}
See Also
System::update
FMOD_CHANNELCONTROL_CALLBACK
FMOD_CHANNELCONTROL_CALLBACK_TYPE
C++ Syntax
FMOD_RESULT ChannelControl::setDSPIndex(
DSP *dsp,
int index
);
Parameters
dsp
index
You can verify the order of the DSP chain using iteration via
ChannelControl::getNumDSPs and ChannelControl::getDSP or with the FMOD
Profiler tool.
See Also
ChannelControl::getDSPIndex
ChannelControl::getNumDSPs
ChannelControl::getDSP
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT ChannelControl::setDelay(
unsigned long long dspclock_start,
unsigned long long dspclock_end,
bool stopchannels
);
Parameters
dspclock_start
DSP clock of the parent channel group to audibly start playing sound at, a value
of 0 indicates no delay.
dspclock_end
DSP clock of the parent channel group to audibly stop playing sound at, a value
of 0 indicates no delay.
stopchannels
If a parent channel group changes its pitch, the start and stop times will still be
correct as the parent clock is rate adjusted by that pitch.
See Also
ChannelControl::getDelay
ChannelControl::getDSPClock
ChannelControl::isPlaying
C++ Syntax
FMOD_RESULT ChannelControl::setFadePointRamp(
unsigned long long dspclock,
float volume
);
Parameters
dspclock
DSP clock of the parent channel group when the volume will be ramped to.
volume
C++ Syntax
FMOD_RESULT ChannelControl::setLowPassGain(
float gain
);
Parameters
gain
Linear gain level, from 0 (silent, full filtering) to 1.0 (full volume, no filtering),
default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Requires the built in lowpass to be created with
FMOD_INIT_CHANNEL_LOWPASS or
FMOD_INIT_CHANNEL_DISTANCEFILTER.
See Also
ChannelControl::getLowPassGain
C++ Syntax
FMOD_RESULT ChannelControl::setMixLevelsInput(
float *levels,
int numlevels
);
Parameters
levels
numlevels
NOTE: Levels can be below 0 to invert a signal and above 1 to amplify the
signal. Note that increasing the signal level too far may cause audible distortion.
See Also
ChannelControl::setMixMatrix
ChannelControl::getMixMatrix
ChannelControl::getDSP
DSP::setChannelFormat
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT ChannelControl::setMixLevelsOutput(
float frontleft,
float frontright,
float center,
float lfe,
float surroundleft,
float surroundright,
float backleft,
float backright
);
Parameters
frontleft
Volume level for the front left speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
frontright
Volume level for the front right speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
center
Volume level for the center speaker of a multichannel speaker setup, 0.0 (silent),
1.0 (normal volume).
lfe
Volume level for the subwoofer speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
surroundleft
Volume level for the surround left speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
surroundright
Volume level for the surround right speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
backleft
Volume level for the back left speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
backright
Volume level for the back right speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE: This function overwrites any pan/mixlevel by overwriting the
ChannelControl's Matrix.
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion. Speakers
specified that don't exist will simply be ignored. For more advanced speaker
control, including sending the different channels of a stereo sound to arbitrary
speakers, see ChannelControl::setMixMatrix.
See Also
ChannelControl::setMixMatrix
ChannelControl::getMixMatrix
C++ Syntax
FMOD_RESULT ChannelControl::setMixMatrix(
float *matrix,
int outchannels,
int inchannels,
int matrixhop
);
Parameters
matrix
outchannels
Number of output channels (rows) in the matrix being passed in, from 0 to
FMOD_MAX_CHANNEL_WIDTH inclusive.
inchannels
Number of input channels (columns) in the matrix being passed in, from 0 to
FMOD_MAX_CHANNEL_WIDTH inclusive.
matrixhop
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion.
The matrix size will generally be the size of the number of channels in the
current speaker mode. Use System::getSoftwareFormat to determine this.
If a matrix already exists then the matrix passed in will applied over the top of it.
The input matrix can be smaller than the existing matrix.
A 'unit' matrix allows a signal to pass through unchanged. For example for a 5.1
matrix a unit matrix would look like this:
[ 1 0 0 0 0 0 ]
[ 0 1 0 0 0 0 ]
[ 0 0 1 0 0 0 ]
[ 0 0 0 1 0 0 ]
[ 0 0 0 0 1 0 ]
[ 0 0 0 0 0 1 ]
See Also
ChannelControl::getMixMatrix
ChannelControl::setPan
ChannelControl::setMixLevelsOutput
ChannelControl::setMixLevelsInput
System::getSoftwareFormat
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT ChannelControl::setMode(
FMOD_MODE mode
);
Parameters
mode
FMOD_LOOP_OFF
FMOD_LOOP_NORMAL
FMOD_LOOP_BIDI
FMOD_2D
FMOD_3D
FMOD_3D_HEADRELATIVE
FMOD_3D_WORLDRELATIVE
FMOD_3D_INVERSEROLLOFF
FMOD_3D_LINEARROLLOFF
FMOD_3D_LINEARSQUAREROLLOFF
FMOD_3D_CUSTOMROLLOFF
FMOD_3D_IGNOREGEOMETRY
FMOD_VIRTUAL_PLAYFROMSTART
When changing the loop mode of sounds created with with System::createSound
or FMOD_CREATESAMPLE, if the sound was set up as FMOD_LOOP_OFF,
then set to FMOD_LOOP_NORMAL with this function, the sound may click
when playing the end of the sound. This is because the sound needs to be pre-
prepared for looping using Sound::setMode, by modifying the content of the
PCM data (i.e. data past the end of the actual sample data) to allow the
interpolators to read ahead without clicking. If you use Channel::setMode it will
not do this (because different channels may have different loop modes for the
same sound) and may click if you try to set it to looping on an unprepared sound.
If you want to change the loop mode at runtime it may be better to load the
sound as looping first (or use Sound::setMode), to let it pre-prepare the data as if
it was looping so that it does not click whenever Channel::setMode is used to
turn looping on.
If FMOD_3D_IGNOREGEOMETRY or
FMOD_VIRTUAL_PLAYFROMSTART is not specified, the flag will be
cleared if it was specified previously.
See Also
Channel::getMode
Channel::setPosition
Sound::setMode
System::createStream
System::createSound
System::setStreamBufferSize
FMOD_CREATESOUNDEXINFO
FMOD_MODE
C++ Syntax
FMOD_RESULT ChannelControl::setMute(
bool mute
);
Parameters
mute
C++ Syntax
FMOD_RESULT ChannelControl::setPan(
float pan
);
Parameters
pan
Stereo sounds heave each left/right value faded up and down according to the
specified pan position. This means when pan = 0.0, the balance for the sound in
each speaker is 100% left and 100% right. When pan = -1.0, only the left
channel of the stereo sound is audible, when pan = 1.0, only the right channel of
the stereo sound is audible.
C++ Syntax
FMOD_RESULT ChannelControl::setPaused(
bool paused
);
Parameters
paused
C++ Syntax
FMOD_RESULT ChannelControl::setPitch(
float pitch
);
Parameters
pitch
Pitch value, 0.5 = half pitch, 2.0 = double pitch, etc default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function scales existing frequency values by the pitch.
See Also
ChannelControl::getPitch
Channel::setFrequency
Channel::getFrequency
C++ Syntax
FMOD_RESULT ChannelControl::setReverbProperties(
int instance,
float wet
);
Parameters
instance
wet
Send level for the signal to the reverb, from 0 (none) to 1.0 (full), default = 1.0
for Channels, 0.0 for ChannelGroups. See remarks.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A Channel is automatically connected to all existing reverb instances due to the
default wet level of 1.0. A ChannelGroup however will not send to any reverb by
default requiring an explicit call to this function.
A ChannelGroup reverb is optimal for the case where you want to send 1 mixed
signal to the reverb, rather than a lot of individual channel reverb sends. It is
advisable to do this to reduce CPU if you have many Channels inside a
ChannelGroup.
Keep in mind when setting a wet level for a ChannelGroup, any Channels under
that ChannelGroup will still have their existing sends to the reverb. To avoid this
doubling up you should explicitly set the Channel wet levels to 0.0.
See Also
ChannelControl::getReverbProperties
C++ Syntax
FMOD_RESULT ChannelControl::setUserData(
void *userdata
);
Parameters
userdata
C++ Syntax
FMOD_RESULT ChannelControl::setVolume(
float volume
);
Parameters
volume
Sound::setDefaults can be used to change the default volume for any channels
played using that sound.
See Also
ChannelControl::getVolume
Sound::setDefaults
C++ Syntax
FMOD_RESULT ChannelControl::setVolumeRamp(
bool ramp
);
Parameters
ramp
C++ Syntax
FMOD_RESULT ChannelControl::stop();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::playSound
C++ Syntax
FMOD_RESULT Channel::addDSP(
int index,
DSP *dsp
);
C Syntax
FMOD_RESULT FMOD_Channel_AddDSP(
FMOD_CHANNEL *channel,
int index,
FMOD_DSP *dsp
);
C# Syntax
RESULT Channel.addDSP(
int index,
DSP dsp
);
JavaScript Syntax
Channel.addDSP(
index,
dsp
);
Parameters
index
Offset to add this DSP unit at in the DSP chain, see
FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
dsp
Pointer to a pre-created DSP unit to be inserted at the specified offset.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createDSP
System::createDSPByType
System::createDSPByPlugin
ChannelControl::removeDSP
ChannelControl::getDSP
ChannelControl::getNumDSPs
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT Channel::addFadePoint(
unsigned long long dspclock,
float volume
);
C Syntax
FMOD_RESULT FMOD_Channel_AddFadePoint(
FMOD_CHANNEL *channel,
unsigned long long dspclock,
float volume
);
C# Syntax
RESULT Channel.addFadePoint(
ulong dspclock,
float volume
);
JavaScript Syntax
Channel.addFadePoint(
dspclock,
volume
);
Parameters
dspclock
DSP clock of the parent channel group to set the fade point volume.
volume
Volume level where 0 is silent and 1.0 is normal volume. Amplification is
supported.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
For every fade point, FMOD will do a per sample volume ramp between them. It
will scale with the current Channel or ChannelGroup's volume.
// Ramp from full volume to half volume over the next 4096 samples
FMOD_RESULT result;
unsigned long long parentclock;
result = target->getDSPClock(NULL, &parentclock);
result = target->addFadePoint(parentclock, 1.0f);
result = target->addFadePoint(parentclock + 4096, 0.5f);
See Also
ChannelControl::removeFadePoints
ChannelControl::setFadePointRamp
ChannelControl::getFadePoints
C++ Syntax
FMOD_RESULT Channel::get3DAttributes(
FMOD_VECTOR *pos,
FMOD_VECTOR *vel,
FMOD_VECTOR *alt_pan_pos
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DAttributes(
FMOD_CHANNEL *channel,
FMOD_VECTOR *pos,
FMOD_VECTOR *vel,
FMOD_VECTOR *alt_pan_pos
);
C# Syntax
RESULT Channel.get3DAttributes(
out VECTOR pos,
out VECTOR vel,
out VECTOR alt_pan_pos
);
JavaScript Syntax
Channel.get3DAttributes(
pos, // writes value to pos.val
vel, // writes value to vel.val
alt_pan_pos // writes value to alt_pan_pos.val
);
Parameters
pos
Address of a variable that receives the position in 3D space used for
panning and attenuation. Optional, specify 0 or NULL to ignore.
vel
Address of a variable that receives the velocity in 'distance units per second'
(see remarks) in 3D space. Optional, specify 0 or NULL to ignore.
alt_pan_pos
(Unimplemented).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
See Also
ChannelControl::set3DAttributes
System::set3DSettings
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Channel::get3DConeOrientation(
FMOD_VECTOR *orientation
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DConeOrientation(
FMOD_CHANNEL *channel,
FMOD_VECTOR *orientation
);
C# Syntax
RESULT Channel.get3DConeOrientation(
out VECTOR orientation
);
JavaScript Syntax
Channel.get3DConeOrientation(
orientation // writes value to orientation.val
);
Parameters
orientation
Address of a variable that receives the coordinates of the sound cone
orientation vector, the vector information represents the center of the sound
cone.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DConeOrientation
C++ Syntax
FMOD_RESULT Channel::get3DConeSettings(
float *insideconeangle,
float *outsideconeangle,
float *outsidevolume
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DConeSettings(
FMOD_CHANNEL *channel,
float *insideconeangle,
float *outsideconeangle,
float *outsidevolume
);
C# Syntax
RESULT Channel.get3DConeSettings(
out float insideconeangle,
out float outsideconeangle,
out float outsidevolume
);
JavaScript Syntax
Channel.get3DConeSettings(
insideconeangle, // writes value to insideconeangle.val
outsideconeangle, // writes value to outsideconeangle.val
outsidevolume // writes value to outsidevolume.val
);
Parameters
insideconeangle
Address of a variable that receives the inside cone angle, in degrees. This is
the angle within which the sound is at its normal volume.
outsideconeangle
Address of a variable that receives the outside cone angle, in degrees. This
is the angle outside of which the sound is at its outside volume.
outsidevolume
Address of a variable that receives the cone outside volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DConeSettings
C++ Syntax
FMOD_RESULT Channel::get3DCustomRolloff(
FMOD_VECTOR **points,
int *numpoints
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DCustomRolloff(
FMOD_CHANNEL *channel,
FMOD_VECTOR **points,
int *numpoints
);
C# Syntax
RESULT Channel.get3DCustomRolloff(
out IntPtr points,
out int numpoints
);
JavaScript Syntax
Channel.get3DCustomRolloff(
points, // writes value to points.val
numpoints // writes value to numpoints.val
);
Parameters
points
Address of a variable to receive the pointer to the current custom rolloff
point list. Optional, specify 0 or NULL to ignore.
numpoints
Address of a variable to receive the number of points int he current custom
rolloff point list. Optional, specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DCustomRolloff
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Channel::get3DDistanceFilter(
bool *custom,
float *customLevel,
float *centerFreq
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DDistanceFilter(
FMOD_CHANNEL *channel,
FMOD_BOOL *custom,
float *customLevel,
float *centerFreq
);
C# Syntax
RESULT Channel.get3DDistanceFilter(
out bool custom,
out float customLevel,
out float centerFreq
);
JavaScript Syntax
Channel.get3DDistanceFilter(
custom, // writes value to custom.val
customLevel, // writes value to customLevel.val
centerFreq // writes value to centerFreq.val
);
Parameters
custom
Address of a variable to receive the enabled/disabled state of the FMOD
distance rolloff calculation. Default = false.
customLevel
Address of a variable to receive the manual user attenuation, where 1.0 = no
attenuation and 0 = complete attenuation. Default = 1.0.
centerFreq
Address of a variable to receive center frequency in hz for the high-pass
filter used to simulate distance attenuation, from 10.0 to 22050.0. Default =
1500.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DDistanceFilter
C++ Syntax
FMOD_RESULT Channel::get3DDopplerLevel(
float *level
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DDopplerLevel(
FMOD_CHANNEL *channel,
float *level
);
C# Syntax
RESULT Channel.get3DDopplerLevel(
out float level
);
JavaScript Syntax
Channel.get3DDopplerLevel(
level // writes value to level.val
);
Parameters
level
Address of a variable to receives the doppler scale from 0.0 (none), to 1.0
(normal) to 5.0 (exaggerated).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DDopplerLevel
C++ Syntax
FMOD_RESULT Channel::get3DLevel(
float *level
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DLevel(
FMOD_CHANNEL *channel,
float *level
);
C# Syntax
RESULT Channel.get3DLevel(
out float level
);
JavaScript Syntax
Channel.get3DLevel(
level // writes value to level.val
);
Parameters
level
3D pan level from 0.0 (attenuation is ignored and panning as set by 2D
panning functions) to 1.0 (pan and attenuate according to 3D position).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DPanLevel
C++ Syntax
FMOD_RESULT Channel::get3DMinMaxDistance(
float *mindistance,
float *maxdistance
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DMinMaxDistance(
FMOD_CHANNEL *channel,
float *mindistance,
float *maxdistance
);
C# Syntax
RESULT Channel.get3DMinMaxDistance(
out float mindistance,
out float maxdistance
);
JavaScript Syntax
Channel.get3DMinMaxDistance(
mindistance, // writes value to mindistance.val
maxdistance // writes value to maxdistance.val
);
Parameters
mindistance
Address of a variable that receives the minimum volume distance in 'units'
(see remarks). Optional, specify 0 or NULL to ignore.
maxdistance
Address of a variable that receives the maximum volume distance in 'units'
(see remarks). Optional, specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
See Also
ChannelControl::set3DMinMaxDistance
System::set3DSettings
C++ Syntax
FMOD_RESULT Channel::get3DOcclusion(
float *directocclusion,
float *reverbocclusion
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DOcclusion(
FMOD_CHANNEL *channel,
float *directocclusion,
float *reverbocclusion
);
C# Syntax
RESULT Channel.get3DOcclusion(
out float directocclusion,
out float reverbocclusion
);
JavaScript Syntax
Channel.get3DOcclusion(
directocclusion, // writes value to directocclusion.val
reverbocclusion // writes value to reverbocclusion.val
);
Parameters
directocclusion
Address of a variable that receives the occlusion factor for the direct path.
reverbocclusion
Address of a variable that receives the occlusion factor for the reverb mix.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DOcclusion
C++ Syntax
FMOD_RESULT Channel::get3DSpread(
float *angle
);
C Syntax
FMOD_RESULT FMOD_Channel_Get3DSpread(
FMOD_CHANNEL *channel,
float *angle
);
C# Syntax
RESULT Channel.get3DSpread(
out float angle
);
JavaScript Syntax
Channel.get3DSpread(
angle // writes value to angle.val
);
Parameters
angle
Address of a variable that receives the speaker spread angle.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DSpread
C++ Syntax
FMOD_RESULT Channel::getAudibility(
float *audibility
);
C Syntax
FMOD_RESULT FMOD_Channel_GetAudibility(
FMOD_CHANNEL *channel,
float *audibility
);
C# Syntax
RESULT Channel.getAudibility(
out float audibility
);
JavaScript Syntax
Channel.getAudibility(
audibility // writes value to audibility.val
);
Parameters
audibility
Address of a variable that receives the audibility value.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This does not represent the waveform, just the calculated result of all volume
modifiers. This value is used by the virtual channel system to order its channels
between real and virtual.
See the Virtual Voice System page for more details about how the audibility is
calculated.
See Also
Channel::isVirtual
ChannelControl::getVolume
ChannelControl::get3DOcclusion
ChannelControl::get3DAttributes
FMOD_DSP_PARAMETER_OVERALLGAIN
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN
C++ Syntax
FMOD_RESULT Channel::getChannelGroup(
FMOD::ChannelGroup **channelgroup
);
C Syntax
FMOD_RESULT FMOD_Channel_GetChannelGroup(
FMOD_CHANNEL *channel,
FMOD_CHANNELGROUP **channelgroup
);
C# Syntax
RESULT Channel.getChannelGroup(
out ChannelGroup channelgroup
);
JavaScript Syntax
Channel.getChannelGroup(
channelgroup // writes value to channelgroup.val
);
Parameters
channelgroup
Address of a variable to receive a pointer to the currently assigned channel
group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Channel::setChannelGroup
C++ Syntax
FMOD_RESULT Channel::getCurrentSound(
FMOD::Sound **sound
);
C Syntax
FMOD_RESULT FMOD_Channel_GetCurrentSound(
FMOD_CHANNEL *channel,
FMOD_SOUND **sound
);
C# Syntax
RESULT Channel.getCurrentSound(
out Sound sound
);
JavaScript Syntax
Channel.getCurrentSound(
sound // writes value to sound.val
);
Parameters
sound
Address of a variable that receives a pointer to the currently playing sound
for this channel.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a sound is not playing the returned pointer will be 0 or NULL.
See Also
System::playSound
C++ Syntax
FMOD_RESULT Channel::getDSP(
int index,
DSP **dsp
);
C Syntax
FMOD_RESULT FMOD_Channel_GetDSP(
FMOD_CHANNEL *channel,
int index,
FMOD_DSP **dsp
);
C# Syntax
RESULT Channel.getDSP(
int index,
out DSP dsp
);
JavaScript Syntax
Channel.getDSP(
index,
dsp // writes value to dsp.val
);
Parameters
index
Offset into the DSP chain, see
FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
dsp
Address of a variable to receive a pointer to the requested DSP unit.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addDSP
ChannelControl::removeDSP
ChannelControl::getNumDSPs
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT Channel::getDSPClock(
unsigned long long *dspclock,
unsigned long long *parentclock
);
C Syntax
FMOD_RESULT FMOD_Channel_GetDSPClock(
FMOD_CHANNEL *channel,
unsigned long long *dspclock,
unsigned long long *parentclock
);
C# Syntax
RESULT Channel.getDSPClock(
out ulong dspclock,
out ulong parentclock
);
JavaScript Syntax
Channel.getDSPClock(
dspclock, // writes value to dspclock.val
parentclock // writes value to parentclock.val
);
Parameters
dspclock
Address of a variable to receive the DSP clock value for the head DSP
node.
parentclock
Address of a variable to receive the DSP clock value for the tail DSP node.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use result with ChannelControl::setDelay to play a sound on an exact tick in the
future, or stop it in the future.
Note that when delaying a channel or channel group you want to sync it to the
parent channel group DSP clock value, not its own DSP clock value.
See Also
ChannelControl::setDelay
ChannelControl::getDelay
C++ Syntax
FMOD_RESULT Channel::getDSPIndex(
DSP *dsp,
int *index
);
C Syntax
FMOD_RESULT FMOD_Channel_GetDSPIndex(
FMOD_CHANNEL *channel,
FMOD_DSP *dsp,
int *index
);
C# Syntax
RESULT Channel.getDSPIndex(
DSP dsp,
out int index
);
JavaScript Syntax
Channel.getDSPIndex(
dsp,
index // writes value to index.val
);
Parameters
dsp
Pointer to a DSP unit that exists in the DSP chain.
index
Address of a variable to receive the offset in the DSP chain of the specified
DSP.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setDSPIndex
C++ Syntax
FMOD_RESULT Channel::getDelay(
unsigned long long *dspclock_start,
unsigned long long *dspclock_end,
bool *stopchannels
);
C Syntax
FMOD_RESULT FMOD_Channel_GetDelay(
FMOD_CHANNEL *channel,
unsigned long long *dspclock_start,
unsigned long long *dspclock_end,
FMOD_BOOL *stopchannels
);
C# Syntax
RESULT Channel.getDelay(
out ulong dspclock_start,
out ulong dspclock_end,
out bool stopchannels
);
JavaScript Syntax
Channel.getDelay(
dspclock_start, // writes value to dspclock_start.val
dspclock_end, // writes value to dspclock_end.val
stopchannels // writes value to stopchannels.val
);
Parameters
dspclock_start
Address of a variable that receives the DSP clock of the parent channel
group to audibly start playing sound at. Optional, specify 0 or NULL to
ignore.
dspclock_end
Address of a variable that receives the DSP clock of the parent channel
group to audibly stop playing sound at. Optional, specify 0 or NULL to
ignore.
stopchannels
Address of a variable that receives TRUE = stop according to
ChannelControl::isPlaying. FALSE = remain 'active' and a new start delay
could start playback again at a later time. Optional, specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setDelay
ChannelControl::getDSPClock
ChannelControl::isPlaying
C++ Syntax
FMOD_RESULT Channel::getFadePoints(
unsigned int *numpoints,
unsigned long long *point_dspclock,
float *point_volume
);
C Syntax
FMOD_RESULT FMOD_Channel_GetFadePoints(
FMOD_CHANNEL *channel,
unsigned int *numpoints,
unsigned long long *point_dspclock,
float *point_volume
);
C# Syntax
RESULT Channel.getFadePoints(
ref uint numpoints,
ulong[] point_dspclock,
float[] point_volume
);
JavaScript Syntax
Channel.getFadePoints(
numpoints, // writes value to numpoints.val
point_dspclock, // writes value to point_dspclock.val
point_volume // writes value to point_volume.val
);
Parameters
numpoints
Address of a variable to receive the number of fade points stored within the
Channel or ChannelGroup.
point_dspclock
Address of a variable to receive an array of 64bit clock values. Can be 0 or
NULL.
point_volume
Address of a variable to receive an array of floating point volume values.
Can be 0 or NULL.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
To first get the number of points for memory purposes, and not store any data,
call this function with point_dpsclock and point_volume parameters being 0 or
NULL.
See Also
ChannelControl::addFadePoint
ChannelControl::removeFadePoints
C++ Syntax
FMOD_RESULT Channel::getFrequency(
float *frequency
);
C Syntax
FMOD_RESULT FMOD_Channel_GetFrequency(
FMOD_CHANNEL *channel,
float *frequency
);
C# Syntax
RESULT Channel.getFrequency(
out float frequency
);
JavaScript Syntax
Channel.getFrequency(
frequency // writes value to frequency.val
);
Parameters
frequency
Address of a variable that receives the current frequency of the channel in
Hz.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Channel::setFrequency
C++ Syntax
FMOD_RESULT Channel::getIndex(
int *index
);
C Syntax
FMOD_RESULT FMOD_Channel_GetIndex(
FMOD_CHANNEL *channel,
int *index
);
C# Syntax
RESULT Channel.getIndex(
out int index
);
JavaScript Syntax
Channel.getIndex(
index // writes value to index.val
);
Parameters
index
Address of a variable to receive the channel index. This will be from 0 to
the value specified in System::init minus 1.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::playSound
System::init
C++ Syntax
FMOD_RESULT Channel::getLoopCount(
int *loopcount
);
C Syntax
FMOD_RESULT FMOD_Channel_GetLoopCount(
FMOD_CHANNEL *channel,
int *loopcount
);
C# Syntax
RESULT Channel.getLoopCount(
out int loopcount
);
JavaScript Syntax
Channel.getLoopCount(
loopcount // writes value to loopcount.val
);
Parameters
loopcount
Address of a variable that receives the number of times to loop before
stopping. 0 = oneshot, 1 = loop once then stop, -1 = loop forever.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function retrieves the current loop countdown value for the channel being
played. This means it will decrement until reaching 0, as it plays. To reset the
value, use Channel::setLoopCount.
See Also
Channel::setLoopCount
C++ Syntax
FMOD_RESULT Channel::getLoopPoints(
unsigned int *loopstart,
FMOD_TIMEUNIT loopstarttype,
unsigned int *loopend,
FMOD_TIMEUNIT loopendtype
);
C Syntax
FMOD_RESULT FMOD_Channel_GetLoopPoints(
FMOD_CHANNEL *channel,
unsigned int *loopstart,
FMOD_TIMEUNIT loopstarttype,
unsigned int *loopend,
FMOD_TIMEUNIT loopendtype
);
C# Syntax
RESULT Channel.getLoopPoints(
out uint loopstart,
TIMEUNIT loopstarttype,
out uint loopend,
TIMEUNIT loopendtype
);
JavaScript Syntax
Channel.getLoopPoints(
loopstart, // writes value to loopstart.val
loopstarttype,
loopend, // writes value to loopend.val
loopendtype
);
Parameters
loopstart
Address of a variable to receive the loop start point, this point in time is
played so it is inclusive. Optional, specify 0 or NULL to ignore.
loopstarttype
Time format used for the loop start point (see FMOD_TIMEUNIT).
loopend
Address of a variable to receive the loop end point, this point in time is
played so it is inclusive. Optional, specify 0 or NULL to ignore.
loopendtype
Time format used for the loop end point (see FMOD_TIMEUNIT).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Channel::setLoopPoints
FMOD_TIMEUNIT
C++ Syntax
FMOD_RESULT Channel::getLowPassGain(
float *gain
);
C Syntax
FMOD_RESULT FMOD_Channel_GetLowPassGain(
FMOD_CHANNEL *channel,
float *gain
);
C# Syntax
RESULT Channel.getLowPassGain(
out float gain
);
JavaScript Syntax
Channel.getLowPassGain(
gain // writes value to gain.val
);
Parameters
gain
Address of a variable that receives the linear gain level, from 0 (silent) to
1.0 (full volume).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setLowPassGain
C++ Syntax
FMOD_RESULT Channel::getMixMatrix(
float *matrix,
int *outchannels,
int *inchannels,
int matrixhop
);
C Syntax
FMOD_RESULT FMOD_Channel_GetMixMatrix(
FMOD_CHANNEL *channel,
float *matrix,
int *outchannels,
int *inchannels,
int matrixhop
);
C# Syntax
RESULT Channel.getMixMatrix(
float[] matrix,
out int outchannels,
out int inchannels,
int inchannel_hop
);
JavaScript Syntax
Channel.getMixMatrix(
matrix, // writes value to matrix.val
outchannels, // writes value to outchannels.val
inchannels, // writes value to inchannels.val
inchannel_hop
);
Parameters
matrix
Address of a 2 dimensional array of volume levels in row-major order. Each
row represents an output speaker, each column represents an input channel.
outchannels
Address of a variable to receive the number of output channels (rows) in the
matrix being passed in.
inchannels
Address of a variable to receive the number of input channels (columns) in
the matrix being passed in.
matrixhop
The width (total number of columns) of the matrix. Optional. If this is 0,
inchannels will be taken as the width of the matrix. Maximum of
FMOD_MAX_CHANNEL_WIDTH.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The gain for input channel 's' to output channel 't' is matrix[t * matrixhop + s].
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion.
The matrix size will generally be the size of the number of channels in the
current speaker mode. Use System::getSoftwareFormat to determine this.
Passing NULL for 'matrix' will allow you to query 'outchannels' and 'inchannels'
without copying any data.
See Also
ChannelControl::setMixMatrix
System::getSoftwareFormat
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT Channel::getMode(
FMOD_MODE *mode
);
C Syntax
FMOD_RESULT FMOD_Channel_GetMode(
FMOD_CHANNEL *channel,
FMOD_MODE *mode
);
C# Syntax
RESULT Channel.getMode(
out MODE mode
);
JavaScript Syntax
Channel.getMode(
mode // writes value to mode.val
);
Parameters
mode
Address of a variable to receive the mode bits.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Channel::setMode
FMOD_MODE
C++ Syntax
FMOD_RESULT Channel::getMute(
bool *mute
);
C Syntax
FMOD_RESULT FMOD_Channel_GetMute(
FMOD_CHANNEL *channel,
FMOD_BOOL *mute
);
C# Syntax
RESULT Channel.getMute(
out bool mute
);
JavaScript Syntax
Channel.getMute(
mute // writes value to mute.val
);
Parameters
mute
Address of a variable that receives the current mute state, true = mute
(silent), false = normal volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setMute
C++ Syntax
FMOD_RESULT Channel::getNumDSPs(
int *numdsps
);
C Syntax
FMOD_RESULT FMOD_Channel_GetNumDSPs(
FMOD_CHANNEL *channel,
int *numdsps
);
C# Syntax
RESULT Channel.getNumDSPs(
out int numdsps
);
JavaScript Syntax
Channel.getNumDSPs(
numdsps // writes value to numdsps.val
);
Parameters
numdsps
Address of a variable that receives the number of DSP units in the DSP
chain.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addDSP
ChannelControl::removeDSP
ChannelControl::getDSP
C++ Syntax
FMOD_RESULT Channel::getPaused(
bool *paused
);
C Syntax
FMOD_RESULT FMOD_Channel_GetPaused(
FMOD_CHANNEL *channel,
FMOD_BOOL *paused
);
C# Syntax
RESULT Channel.getPaused(
out bool paused
);
JavaScript Syntax
Channel.getPaused(
paused // writes value to paused.val
);
Parameters
paused
Address of a variable that receives the current paused state, true = paused,
false = not paused.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setPaused
C++ Syntax
FMOD_RESULT Channel::getPitch(
float *pitch
);
C Syntax
FMOD_RESULT FMOD_Channel_GetPitch(
FMOD_CHANNEL *channel,
float *pitch
);
C# Syntax
RESULT Channel.getPitch(
out float pitch
);
JavaScript Syntax
Channel.getPitch(
pitch // writes value to pitch.val
);
Parameters
pitch
Address of a variable to receive the pitch value, 0.5 = half pitch, 2.0 =
double pitch, etc.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setPitch
Channel::setFrequency
Channel::getFrequency
C++ Syntax
FMOD_RESULT Channel::getPosition(
unsigned int *position,
FMOD_TIMEUNIT postype
);
C Syntax
FMOD_RESULT FMOD_Channel_GetPosition(
FMOD_CHANNEL *channel,
unsigned int *position,
FMOD_TIMEUNIT postype
);
C# Syntax
RESULT Channel.getPosition(
out uint position,
TIMEUNIT postype
);
JavaScript Syntax
Channel.getPosition(
position, // writes value to position.val
postype
);
Parameters
position
Address of a variable that receives the position of the sound.
postype
Time unit to retrieve into the position parameter. See FMOD_TIMEUNIT.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Certain timeunits do not work depending on the file format. For example
FMOD_TIMEUNIT_MODORDER will not work with an MP3 file.
See Also
Channel::setPosition
FMOD_TIMEUNIT
C++ Syntax
FMOD_RESULT Channel::getPriority(
int *priority
);
C Syntax
FMOD_RESULT FMOD_Channel_GetPriority(
FMOD_CHANNEL *channel,
int *priority
);
C# Syntax
RESULT Channel.getPriority(
out int priority
);
JavaScript Syntax
Channel.getPriority(
priority // writes value to priority.val
);
Parameters
priority
Address of a variable that receives the priority for the channel, from 0 (most
important) to 256 (least important).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Channel::setPriority
C++ Syntax
FMOD_RESULT Channel::getReverbProperties(
int instance,
float *wet
);
C Syntax
FMOD_RESULT FMOD_Channel_GetReverbProperties(
FMOD_CHANNEL *channel,
int instance,
float *wet
);
C# Syntax
RESULT Channel.getReverbProperties(
int instance,
out float wet
);
JavaScript Syntax
Channel.getReverbProperties(
instance,
wet // writes value to wet.val
);
Parameters
instance
Index of the particular reverb instance to target, from 0 to
FMOD_REVERB_MAXINSTANCES inclusive.
wet
Address of a variable that receives the send level for the signal to the
reverb, from 0 (none) to 1.0 (full).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setReverbProperties
C++ Syntax
FMOD_RESULT Channel::getSystemObject(
System **system
);
C Syntax
FMOD_RESULT FMOD_Channel_GetSystemObject(
FMOD_CHANNEL *channel,
FMOD_SYSTEM **system
);
C# Syntax
RESULT Channel.getSystemObject(
out System system
);
JavaScript Syntax
Channel.getSystemObject(
system // writes value to system.val
);
Parameters
system
Address of a variable that receives the System object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createChannelGroup
System::getMasterChannelGroup
System::playSound
C++ Syntax
FMOD_RESULT Channel::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_Channel_GetUserData(
FMOD_CHANNEL *channel,
void **userdata
);
C# Syntax
RESULT Channel.getUserData(
out IntPtr userdata
);
JavaScript Syntax
Channel.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of a variable to receives data that the user has stored within this
object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setUserData
C++ Syntax
FMOD_RESULT Channel::getVolume(
float *volume
);
C Syntax
FMOD_RESULT FMOD_Channel_GetVolume(
FMOD_CHANNEL *channel,
float *volume
);
C# Syntax
RESULT Channel.getVolume(
out float volume
);
JavaScript Syntax
Channel.getVolume(
volume // writes value to volume.val
);
Parameters
volume
Address of a variable to receive the linear volume level.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setVolume
C++ Syntax
FMOD_RESULT Channel::getVolumeRamp(
bool *ramp
);
C Syntax
FMOD_RESULT FMOD_Channel_GetVolumeRamp(
FMOD_CHANNEL *channel,
FMOD_BOOL *ramp
);
C# Syntax
RESULT Channel.getVolumeRamp(
out bool ramp
);
JavaScript Syntax
Channel.getVolumeRamp(
ramp // writes value to ramp.val
);
Parameters
ramp
Address of a variable to receive the volume ramp state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setVolumeRamp
C++ Syntax
FMOD_RESULT Channel::isPlaying(
bool *isplaying
);
C Syntax
FMOD_RESULT FMOD_Channel_IsPlaying(
FMOD_CHANNEL *channel,
FMOD_BOOL *isplaying
);
C# Syntax
RESULT Channel.isPlaying(
out bool isplaying
);
JavaScript Syntax
Channel.isPlaying(
isplaying // writes value to isplaying.val
);
Parameters
isplaying
Address of a variable that receives the current playing status, true =
currently playing a sound, false = not playing a sound.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::playSound
System::playDSP
C++ Syntax
FMOD_RESULT Channel::isVirtual(
bool *isvirtual
);
C Syntax
FMOD_RESULT FMOD_Channel_IsVirtual(
FMOD_CHANNEL *channel,
FMOD_BOOL *isvirtual
);
C# Syntax
RESULT Channel.isVirtual(
out bool isvirtual
);
JavaScript Syntax
Channel.isVirtual(
isvirtual // writes value to isvirtual.val
);
Parameters
isvirtual
Address of a variable that receives the virtual status. TRUE = inaudible and
currently being emulated at no CPU cost, FALSE = real voice that should
be audible.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
See the Virtual Voice System page for more details about how channel
virtualization works.
See Also
System::playSound
ChannelControl::getAudibility
C++ Syntax
FMOD_RESULT Channel::removeDSP(
DSP *dsp
);
C Syntax
FMOD_RESULT FMOD_Channel_RemoveDSP(
FMOD_CHANNEL *channel,
FMOD_DSP *dsp
);
C# Syntax
RESULT Channel.removeDSP(
DSP dsp
);
JavaScript Syntax
Channel.removeDSP(
dsp
);
Parameters
dsp
Pointer to a DSP unit (that exists in the DSP chain) you wish to remove.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addDSP
ChannelControl::getDSP
ChannelControl::getNumDSPs
C++ Syntax
FMOD_RESULT Channel::removeFadePoints(
unsigned long long dspclock_start,
unsigned long long dspclock_end
);
C Syntax
FMOD_RESULT FMOD_Channel_RemoveFadePoints(
FMOD_CHANNEL *channel,
unsigned long long dspclock_start,
unsigned long long dspclock_end
);
C# Syntax
RESULT Channel.removeFadePoints(
ulong dspclock_start,
ulong dspclock_end
);
JavaScript Syntax
Channel.removeFadePoints(
dspclock_start,
dspclock_end
);
Parameters
dspclock_start
DSP clock of the parent channel group to start removing fade points from.
dspclock_end
DSP clock of the parent channel group to start removing fade points to.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addFadePoint
ChannelControl::getFadePoints
C++ Syntax
FMOD_RESULT Channel::set3DAttributes(
const FMOD_VECTOR *pos,
const FMOD_VECTOR *vel,
const FMOD_VECTOR *alt_pan_pos
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DAttributes(
FMOD_CHANNEL *channel,
const FMOD_VECTOR *pos,
const FMOD_VECTOR *vel,
const FMOD_VECTOR *alt_pan_pos
);
C# Syntax
RESULT Channel.set3DAttributes(
ref VECTOR pos,
ref VECTOR vel,
ref VECTOR alt_pan_pos
);
JavaScript Syntax
Channel.set3DAttributes(
pos,
vel,
alt_pan_pos
);
Parameters
pos
Position in 3D space used for panning and attenuation. Optional, specify 0
or NULL to ignore.
vel
Velocity in 'distance units per second' (see remarks) in 3D space. Optional,
specify 0 or NULL to ignore.
alt_pan_pos
(Unimplemented).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
For a stereo 3D sound, you can set the spread of the left/right parts in speaker
space by using ChannelControl::set3DSpread.
Vectors should use your chosen coordinate system, see 3D sounds for more
information.
See Also
ChannelControl::get3DAttributes
ChannelControl::set3DSpread
System::set3DSettings
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Channel::set3DConeOrientation(
FMOD_VECTOR *orientation
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DConeOrientation(
FMOD_CHANNEL *channel,
FMOD_VECTOR *orientation
);
C# Syntax
RESULT Channel.set3DConeOrientation(
ref VECTOR orientation
);
JavaScript Syntax
Channel.set3DConeOrientation(
orientation
);
Parameters
orientation
Coordinates of the sound cone orientation vector, the vector information
represents the center of the sound cone.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function has no effect unless the cone angle and cone outside volume have
also been set to values other than the default.
See Also
ChannelControl::get3DConeOrientation
ChannelControl::set3DConeSettings
Sound::set3DConeSettings
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Channel::set3DConeSettings(
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DConeSettings(
FMOD_CHANNEL *channel,
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
C# Syntax
RESULT Channel.set3DConeSettings(
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
JavaScript Syntax
Channel.set3DConeSettings(
insideconeangle,
outsideconeangle,
outsidevolume
);
Parameters
insideconeangle
Inside cone angle, in degrees. This is the angle within which the sound is at
its normal volume. Must not be greater than 'outsideconeangle'. Default =
360.
outsideconeangle
Outside cone angle, in degrees. This is the angle outside of which the sound
is at its outside volume. Must not be less than 'insideconeangle'. Default =
360.
outsidevolume
Cone outside volume, from 0.0 to 1.0, default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
To define the parameters per sound use Sound::set3DConeSettings.
See Also
ChannelControl::get3DConeSettings
ChannelControl::set3DConeOrientation
Sound::set3DConeSettings
C++ Syntax
FMOD_RESULT Channel::set3DCustomRolloff(
FMOD_VECTOR *points,
int numpoints
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DCustomRolloff(
FMOD_CHANNEL *channel,
FMOD_VECTOR *points,
int numpoints
);
C# Syntax
RESULT Channel.set3DCustomRolloff(
ref VECTOR points,
int numpoints
);
JavaScript Syntax
Channel.set3DCustomRolloff(
points,
numpoints
);
Parameters
points
Array of FMOD_VECTOR structures where x = distance and y = volume
from 0.0 to 1.0. z should be set to 0.
numpoints
Number of points in the array.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note! This function does not duplicate the memory for the points internally. The
pointer you pass to FMOD must remain valid until there is no more use for it.
Do not free the memory while in use, or use a local variable that goes out of
scope while in use.
Points must be sorted by distance! Passing an unsorted list to FMOD will result
in an error.
Note that after the highest distance specified, the volume in the last entry is used
from that distance onwards.
C++ Syntax
FMOD_RESULT Channel::set3DDistanceFilter(
bool custom,
float customLevel,
float centerFreq
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DDistanceFilter(
FMOD_CHANNEL *channel,
FMOD_BOOL custom,
float customLevel,
float centerFreq
);
C# Syntax
RESULT Channel.set3DDistanceFilter(
bool custom,
float customLevel,
float centerFreq
);
JavaScript Syntax
Channel.set3DDistanceFilter(
custom,
customLevel,
centerFreq
);
Parameters
custom
Specify true to disable FMOD distance rolloff calculation. Default = false.
customLevel
Specify a attenuation factor manually here, where 1.0 = no attenuation and
0 = complete attenuation. Default = 1.0.
centerFreq
Specify a center frequency in hz for the high-pass filter used to simulate
distance attenuation, from 10.0 to 22050.0. Default = 1500.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::get3DDistanceFilter
C++ Syntax
FMOD_RESULT Channel::set3DDopplerLevel(
float level
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DDopplerLevel(
FMOD_CHANNEL *channel,
float level
);
C# Syntax
RESULT Channel.set3DDopplerLevel(
float level
);
JavaScript Syntax
Channel.set3DDopplerLevel(
level
);
Parameters
level
Doppler scale from 0.0 (none), to 1.0 (normal) to 5.0 (exaggerated), default
= 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::get3DDopplerLevel
C++ Syntax
FMOD_RESULT Channel::set3DLevel(
float level
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DLevel(
FMOD_CHANNEL *channel,
float level
);
C# Syntax
RESULT Channel.set3DLevel(
float level
);
JavaScript Syntax
Channel.set3DLevel(
level
);
Parameters
level
3D pan level from 0.0 (attenuation is ignored and panning as set by 2D
panning functions) to 1.0 (pan and attenuate according to 3D position),
default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Only affects sounds created FMOD_3D.
Useful for morhping a sound between 3D and 2D. This is most common in
volumetric sound, when the sound goes from directional, to 'all around you' (and
doesn't pan according to listener position / direction).
See Also
ChannelControl::get3DLevel
ChannelControl::setPan
ChannelControl::setMixLevelsOutput
ChannelControl::setMixLevelsInput
ChannelControl::setMixMatrix
C++ Syntax
FMOD_RESULT Channel::set3DMinMaxDistance(
float mindistance,
float maxdistance
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DMinMaxDistance(
FMOD_CHANNEL *channel,
float mindistance,
float maxdistance
);
C# Syntax
RESULT Channel.set3DMinMaxDistance(
float mindistance,
float maxdistance
);
JavaScript Syntax
Channel.set3DMinMaxDistance(
mindistance,
maxdistance
);
Parameters
mindistance
Minimum volume distance in 'units' (see remarks), default = 1.0.
maxdistance
Maximum volume distance in 'units' (see remarks), default = 10000.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When the listener is in-between the minimum distance and the sound source the
volume will be at its maximum. As the listener moves from the minimum
distance to the maximum distance the sound will attenuate following the rolloff
curve set. When outside the maximum distance the sound will no longer
attenuate.
Minimum distance is useful to give the impression that the sound is loud or soft
in 3D space. An example of this is a small quiet object, such as a bumblebee,
which you could set a small mindistance such as 0.1. This would cause it to
attenuate quickly and dissapear when only a few meters away from the listener.
Another example is a jumbo jet, which you could set to a mindistance of 100.0
causing the volume to stay at its loudest until the listener was 100 meters away,
then it would be hundreds of meters more before it would fade out.
Maximum distance is effectively obsolete unless you need the sound to stop
fading out at a certain point. Do not adjust this from the default if you dont need
to. Some people have the confusion that maxdistance is the point the sound will
fade out to zero, this is not the case.
C++ Syntax
FMOD_RESULT Channel::set3DOcclusion(
float directocclusion,
float reverbocclusion
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DOcclusion(
FMOD_CHANNEL *channel,
float directocclusion,
float reverbocclusion
);
C# Syntax
RESULT Channel.set3DOcclusion(
float directocclusion,
float reverbocclusion
);
JavaScript Syntax
Channel.set3DOcclusion(
directocclusion,
reverbocclusion
);
Parameters
directocclusion
Occlusion factor for the direct path, from 0.0 (not occluded) to 1.0 (fully
occluded), default = 0.0.
reverbocclusion
Occlusion factor for the reverb mix, from 0.0 (not occluded) to 1.0 (fully
occluded), default = 0.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Normally the volume is simply attenuated by the 'directocclusion' factor
however if FMOD_INIT_CHANNEL_LOWPASS is specified frequency
filtering will be used with a very small CPU hit.
See Also
ChannelControl::get3DOcclusion
FMOD_INIT_CHANNEL_LOWPASS
C++ Syntax
FMOD_RESULT Channel::set3DSpread(
float angle
);
C Syntax
FMOD_RESULT FMOD_Channel_Set3DSpread(
FMOD_CHANNEL *channel,
float angle
);
C# Syntax
RESULT Channel.set3DSpread(
float angle
);
JavaScript Syntax
Channel.set3DSpread(
angle
);
Parameters
angle
Speaker spread angle. 0 = all sound channels are located at the same
speaker location and is 'mono'. 360 = all sound channels are located at the
opposite speaker location to the speaker location that it should be according
to 3D position. Default = 0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Normally a 3D sound is aimed at one position in a speaker array depending on
the 3D position to give it direction. Left and right parts of a stereo sound for
example are consequently summed together and become 'mono'. When
increasing the 'spread' of a sound, the left and right parts of a stereo sound rotate
away from their original position, to give it more 'stereoness'. The rotation of the
sound channels are done in 'speaker space'.
Multichannel sounds with channel counts greater than stereo have their sub-
channels spread evently through the specified angle. For example a 6 channel
sound over a 90 degree spread has each channel located 15 degrees apart from
each other in the speaker array.
Mono sounds are spread as if they were a stereo signal, i.e. the signal is split into
2. The power will remain the same as it spreads around the speakers.
1. A spread angle of 0 makes the stereo sound mono at the point of the 3D
emitter.
2. A spread angle of 90 makes the left part of the stereo sound place itself at
45 degrees to the left and the right part 45 degrees to the right.
3. A spread angle of 180 makes the left part of the stero sound place itself at
90 degrees to the left and the right part 90 degrees to the right.
4. A spread angle of 360 makes the stereo sound mono at the opposite speaker
location to where the 3D emitter should be located (by moving the left part
180 degrees left and the right part 180 degrees right). So in this case, behind
you when the sound should be in front of you!
See Also
ChannelControl::get3DSpread
C++ Syntax
FMOD_RESULT Channel::setCallback(
FMOD_CHANNELCONTROL_CALLBACK callback
);
C Syntax
FMOD_RESULT FMOD_Channel_SetCallback(
FMOD_CHANNEL *channel,
FMOD_CHANNELCONTROL_CALLBACK callback
);
C# Syntax
RESULT Channel.setCallback(
CHANNEL_CALLBACK callback
);
JavaScript Syntax
Channel.setCallback(
callback
);
Parameters
callback
Pointer to a callback to receive the event when it happens.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Currently callbacks are driven by System::update and will only occur when this
function is called. This has the main advantage of far less complication due to
thread issues, and allows all FMOD commands, including loading sounds and
playing new sounds from the callback. It also allows any type of sound to have
an end callback, no matter what it is. The only disadvantage is that callbacks are
not asynchronous and are bound by the latency caused by the rate the user calls
the update command.
Callbacks are stdcall. Use F_CALLBACK in between your return type and
function name.
FMOD_RESULT F_CALLBACK mycallback(FMOD_CHANNELCONTROL *chanControl,
{
if (controlType == FMOD_CHANNELCONTROL_TYPE_CHANNEL)
{
FMOD::Channel *channel = (FMOD::Channel *)chanControl;
// Channel specific functions here...
}
else
{
FMOD::ChannelGroup *group = (FMOD::ChannelGroup *)chanControl;
// ChannelGroup specific functions here...
}
return FMOD_OK;
}
See Also
System::update
FMOD_CHANNELCONTROL_CALLBACK
FMOD_CHANNELCONTROL_CALLBACK_TYPE
C++ Syntax
FMOD_RESULT Channel::setChannelGroup(
FMOD::ChannelGroup *channelgroup
);
C Syntax
FMOD_RESULT FMOD_Channel_SetChannelGroup(
FMOD_CHANNEL *channel,
FMOD_CHANNELGROUP *channelgroup
);
C# Syntax
RESULT Channel.setChannelGroup(
ChannelGroup channelgroup
);
JavaScript Syntax
Channel.setChannelGroup(
channelgroup
);
Parameters
channelgroup
Pointer to a ChannelGroup object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Setting a channel to a channel group removes it from any previous group, it does
not allow sharing of channel groups.
See Also
Channel::getChannelGroup
C++ Syntax
FMOD_RESULT Channel::setDSPIndex(
DSP *dsp,
int index
);
C Syntax
FMOD_RESULT FMOD_Channel_SetDSPIndex(
FMOD_CHANNEL *channel,
FMOD_DSP *dsp,
int index
);
C# Syntax
RESULT Channel.setDSPIndex(
DSP dsp,
int index
);
JavaScript Syntax
Channel.setDSPIndex(
dsp,
index
);
Parameters
dsp
Pointer to a DSP unit that exists in the DSP chain.
index
Offset in the DSP chain to move the DSP to, see
FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is useful for reordering DSP units inside a Channel or
ChannelGroup so that processing can happen in the desired order.
You can verify the order of the DSP chain using iteration via
ChannelControl::getNumDSPs and ChannelControl::getDSP or with the FMOD
Profiler tool.
See Also
ChannelControl::getDSPIndex
ChannelControl::getNumDSPs
ChannelControl::getDSP
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT Channel::setDelay(
unsigned long long dspclock_start,
unsigned long long dspclock_end,
bool stopchannels
);
C Syntax
FMOD_RESULT FMOD_Channel_SetDelay(
FMOD_CHANNEL *channel,
unsigned long long dspclock_start,
unsigned long long dspclock_end,
FMOD_BOOL stopchannels
);
C# Syntax
RESULT Channel.setDelay(
ulong dspclock_start,
ulong dspclock_end,
bool stopchannels
);
JavaScript Syntax
Channel.setDelay(
dspclock_start,
dspclock_end,
stopchannels
);
Parameters
dspclock_start
DSP clock of the parent channel group to audibly start playing sound at, a
value of 0 indicates no delay.
dspclock_end
DSP clock of the parent channel group to audibly stop playing sound at, a
value of 0 indicates no delay.
stopchannels
TRUE = stop according to ChannelControl::isPlaying. FALSE = remain
'active' and a new start delay could start playback again at a later time.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Every channel and channel group has its own DSP Clock. A channel or channel
group can be delayed relatively against its parent, with sample accurate
positioning. To delay a sound, use the 'parent' channel group DSP clock to
reference against when passing values into this function.
If a parent channel group changes its pitch, the start and stop times will still be
correct as the parent clock is rate adjusted by that pitch.
See Also
ChannelControl::getDelay
ChannelControl::getDSPClock
ChannelControl::isPlaying
C++ Syntax
FMOD_RESULT Channel::setFadePointRamp(
unsigned long long dspclock,
float volume
);
C Syntax
FMOD_RESULT FMOD_Channel_SetFadePointRamp(
FMOD_CHANNEL *channel,
unsigned long long dspclock,
float volume
);
C# Syntax
RESULT Channel.setFadePointRamp(
ulong dspclock,
float volume
);
JavaScript Syntax
Channel.setFadePointRamp(
dspclock,
volume
);
Parameters
dspclock
DSP clock of the parent channel group when the volume will be ramped to.
volume
Volume level where 0 is silent and 1.0 is normal volume. Amplification is
supported.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This is a helper function that automatically ramps from the current fade volume
to the newly provided volume at a specified time. It will clear any fade points set
after this time. Use in conjunction with ChannelControl::setDelay stop delay, to
ramp down volume before it stops. The user would specify the same clock value
for the fade ramp and stop delay. This can also be used as a way to provide
sample accurate delayed volume changes without clicks.
See Also
ChannelControl::setDelay
ChannelControl::removeFadePoints
ChannelControl::addFadePoint
ChannelControl::getFadePoints
C++ Syntax
FMOD_RESULT Channel::setFrequency(
float frequency
);
C Syntax
FMOD_RESULT FMOD_Channel_SetFrequency(
FMOD_CHANNEL *channel,
float frequency
);
C# Syntax
RESULT Channel.setFrequency(
float frequency
);
JavaScript Syntax
Channel.setFrequency(
frequency
);
Parameters
frequency
Frequency value in Hz. This value can also be negative to play the sound
backwards (negative frequencies allowed with non-stream sounds only).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When a sound is played, it plays at the default frequency of the sound which can
be set by Sound::setDefaults.
For most file formats, the default frequency is determined by the audio format.
See Also
Channel::getFrequency
Sound::setDefaults
C++ Syntax
FMOD_RESULT Channel::setLoopCount(
int loopcount
);
C Syntax
FMOD_RESULT FMOD_Channel_SetLoopCount(
FMOD_CHANNEL *channel,
int loopcount
);
C# Syntax
RESULT Channel.setLoopCount(
int loopcount
);
JavaScript Syntax
Channel.setLoopCount(
loopcount
);
Parameters
loopcount
Number of times to loop before stopping. 0 = oneshot, 1 = loop once then
stop, -1 = loop forever, default = -1.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Issues with streamed audio:
C++ Syntax
FMOD_RESULT Channel::setLoopPoints(
unsigned int loopstart,
FMOD_TIMEUNIT loopstarttype,
unsigned int loopend,
FMOD_TIMEUNIT loopendtype
);
C Syntax
FMOD_RESULT FMOD_Channel_SetLoopPoints(
FMOD_CHANNEL *channel,
unsigned int loopstart,
FMOD_TIMEUNIT loopstarttype,
unsigned int loopend,
FMOD_TIMEUNIT loopendtype
);
C# Syntax
RESULT Channel.setLoopPoints(
uint loopstart,
TIMEUNIT loopstarttype,
uint loopend,
TIMEUNIT loopendtype
);
JavaScript Syntax
Channel.setLoopPoints(
loopstart,
loopstarttype,
loopend,
loopendtype
);
Parameters
loopstart
Loop start point, this point in time is played so it is inclusive.
loopstarttype
Time format used for the loop start point (see FMOD_TIMEUNIT).
loopend
Loop end point, this point in time is played so it is inclusive.
loopendtype
Time format used for the loop end point (see FMOD_TIMEUNIT).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a sound was 44100 samples long and you wanted to loop the whole sound,
loopstart would be 0, and loopend would be 44099, not 44100. You wouldn't use
milliseconds in this case because they are not sample accurate.
C++ Syntax
FMOD_RESULT Channel::setLowPassGain(
float gain
);
C Syntax
FMOD_RESULT FMOD_Channel_SetLowPassGain(
FMOD_CHANNEL *channel,
float gain
);
C# Syntax
RESULT Channel.setLowPassGain(
float gain
);
JavaScript Syntax
Channel.setLowPassGain(
gain
);
Parameters
gain
Linear gain level, from 0 (silent, full filtering) to 1.0 (full volume, no
filtering), default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Requires the built in lowpass to be created with
FMOD_INIT_CHANNEL_LOWPASS or
FMOD_INIT_CHANNEL_DISTANCEFILTER.
See Also
ChannelControl::getLowPassGain
C++ Syntax
FMOD_RESULT Channel::setMixLevelsInput(
float *levels,
int numlevels
);
C Syntax
FMOD_RESULT FMOD_Channel_SetMixLevelsInput(
FMOD_CHANNEL *channel,
float *levels,
int numlevels
);
C# Syntax
RESULT Channel.setMixLevelsInput(
float[] levels,
int numlevels
);
JavaScript Syntax
Channel.setMixLevelsInput(
levels,
numlevels
);
Parameters
levels
Array of volume levels for each incoming channel.
numlevels
Number of levels in the array, from 0 to 32 inclusive.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
An example use case for this function is if the sound file has multiple channels
in it with different musical parts to it, but they are all in sync with each other.
This function can be used to fade in and out different tracks of the sound or to
solo/mute tracks within it.
NOTE: Levels can be below 0 to invert a signal and above 1 to amplify the
signal. Note that increasing the signal level too far may cause audible distortion.
See Also
ChannelControl::setMixMatrix
ChannelControl::getMixMatrix
ChannelControl::getDSP
DSP::setChannelFormat
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT Channel::setMixLevelsOutput(
float frontleft,
float frontright,
float center,
float lfe,
float surroundleft,
float surroundright,
float backleft,
float backright
);
C Syntax
FMOD_RESULT FMOD_Channel_SetMixLevelsOutput(
FMOD_CHANNEL *channel,
float frontleft,
float frontright,
float center,
float lfe,
float surroundleft,
float surroundright,
float backleft,
float backright
);
C# Syntax
RESULT Channel.setMixLevelsOutput(
float frontleft,
float frontright,
float center,
float lfe,
float surroundleft,
float surroundright,
float backleft,
float backright
);
JavaScript Syntax
Channel.setMixLevelsOutput(
frontleft,
frontright,
center,
lfe,
surroundleft,
surroundright,
backleft,
backright
);
Parameters
frontleft
Volume level for the front left speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
frontright
Volume level for the front right speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
center
Volume level for the center speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
lfe
Volume level for the subwoofer speaker of a multichannel speaker setup,
0.0 (silent), 1.0 (normal volume).
surroundleft
Volume level for the surround left speaker of a multichannel speaker setup,
0.0 (silent), 1.0 (normal volume).
surroundright
Volume level for the surround right speaker of a multichannel speaker
setup, 0.0 (silent), 1.0 (normal volume).
backleft
Volume level for the back left speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
backright
Volume level for the back right speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE: This function overwrites any pan/mixlevel by overwriting the
ChannelControl's Matrix.
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion. Speakers
specified that don't exist will simply be ignored. For more advanced speaker
control, including sending the different channels of a stereo sound to arbitrary
speakers, see ChannelControl::setMixMatrix.
See Also
ChannelControl::setMixMatrix
ChannelControl::getMixMatrix
C++ Syntax
FMOD_RESULT Channel::setMixMatrix(
float *matrix,
int outchannels,
int inchannels,
int matrixhop
);
C Syntax
FMOD_RESULT FMOD_Channel_SetMixMatrix(
FMOD_CHANNEL *channel,
float *matrix,
int outchannels,
int inchannels,
int matrixhop
);
C# Syntax
RESULT Channel.setMixMatrix(
float[] matrix,
int outchannels,
int inchannels,
int inchannel_hop
);
JavaScript Syntax
Channel.setMixMatrix(
matrix,
outchannels,
inchannels,
inchannel_hop
);
Parameters
matrix
Address of a 2 dimensional array of volume levels in row-major order. Each
row represents an output speaker, each column represents an input channel.
outchannels
Number of output channels (rows) in the matrix being passed in, from 0 to
FMOD_MAX_CHANNEL_WIDTH inclusive.
inchannels
Number of input channels (columns) in the matrix being passed in, from 0
to FMOD_MAX_CHANNEL_WIDTH inclusive.
matrixhop
The width (total number of columns) of the matrix. Optional. If this is 0,
inchannels will be taken as the width of the matrix. Maximum of
FMOD_MAX_CHANNEL_WIDTH.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The gain for input channel 's' to output channel 't' is matrix[t * matrixhop + s].
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion.
The matrix size will generally be the size of the number of channels in the
current speaker mode. Use System::getSoftwareFormat to determine this.
If a matrix already exists then the matrix passed in will applied over the top of it.
The input matrix can be smaller than the existing matrix.
A 'unit' matrix allows a signal to pass through unchanged. For example for a 5.1
matrix a unit matrix would look like this:
[ 1 0 0 0 0 0 ]
[ 0 1 0 0 0 0 ]
[ 0 0 1 0 0 0 ]
[ 0 0 0 1 0 0 ]
[ 0 0 0 0 1 0 ]
[ 0 0 0 0 0 1 ]
See Also
ChannelControl::getMixMatrix
ChannelControl::setPan
ChannelControl::setMixLevelsOutput
ChannelControl::setMixLevelsInput
System::getSoftwareFormat
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT Channel::setMode(
FMOD_MODE mode
);
C Syntax
FMOD_RESULT FMOD_Channel_SetMode(
FMOD_CHANNEL *channel,
FMOD_MODE mode
);
C# Syntax
RESULT Channel.setMode(
MODE mode
);
JavaScript Syntax
Channel.setMode(
mode
);
Parameters
mode
Mode bits to set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Flags supported:
FMOD_LOOP_OFF
FMOD_LOOP_NORMAL
FMOD_LOOP_BIDI
FMOD_2D
FMOD_3D
FMOD_3D_HEADRELATIVE
FMOD_3D_WORLDRELATIVE
FMOD_3D_INVERSEROLLOFF
FMOD_3D_LINEARROLLOFF
FMOD_3D_LINEARSQUAREROLLOFF
FMOD_3D_CUSTOMROLLOFF
FMOD_3D_IGNOREGEOMETRY
FMOD_VIRTUAL_PLAYFROMSTART
When changing the loop mode of sounds created with with System::createSound
or FMOD_CREATESAMPLE, if the sound was set up as FMOD_LOOP_OFF,
then set to FMOD_LOOP_NORMAL with this function, the sound may click
when playing the end of the sound. This is because the sound needs to be pre-
prepared for looping using Sound::setMode, by modifying the content of the
PCM data (i.e. data past the end of the actual sample data) to allow the
interpolators to read ahead without clicking. If you use Channel::setMode it will
not do this (because different channels may have different loop modes for the
same sound) and may click if you try to set it to looping on an unprepared sound.
If you want to change the loop mode at runtime it may be better to load the
sound as looping first (or use Sound::setMode), to let it pre-prepare the data as if
it was looping so that it does not click whenever Channel::setMode is used to
turn looping on.
If FMOD_3D_IGNOREGEOMETRY or
FMOD_VIRTUAL_PLAYFROMSTART is not specified, the flag will be
cleared if it was specified previously.
See Also
Channel::getMode
Channel::setPosition
Sound::setMode
System::createStream
System::createSound
System::setStreamBufferSize
FMOD_CREATESOUNDEXINFO
FMOD_MODE
C++ Syntax
FMOD_RESULT Channel::setMute(
bool mute
);
C Syntax
FMOD_RESULT FMOD_Channel_SetMute(
FMOD_CHANNEL *channel,
FMOD_BOOL mute
);
C# Syntax
RESULT Channel.setMute(
bool mute
);
JavaScript Syntax
Channel.setMute(
mute
);
Parameters
mute
Mute state, true = mute (silent), false = normal volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Each channel and channel group has its own mute state, muting a channel group
will mute all child channels but will not affect their individual setting. Calling
ChannelControl::getMute will always return the value you set.
See Also
ChannelControl::getMute
C++ Syntax
FMOD_RESULT Channel::setPan(
float pan
);
C Syntax
FMOD_RESULT FMOD_Channel_SetPan(
FMOD_CHANNEL *channel,
float pan
);
C# Syntax
RESULT Channel.setPan(
float pan
);
JavaScript Syntax
Channel.setPan(
pan
);
Parameters
pan
Pan level, from -1.0 (left) to 1.0 (right), default = 0 (center).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Mono sounds are panned from left to right using constant power panning (non
linear fade). This means when pan = 0.0, the balance for the sound in each
speaker is 71% left and 71% right, not 50% left and 50% right. This gives
(audibly) smoother pans.
Stereo sounds heave each left/right value faded up and down according to the
specified pan position. This means when pan = 0.0, the balance for the sound in
each speaker is 100% left and 100% right. When pan = -1.0, only the left
channel of the stereo sound is audible, when pan = 1.0, only the right channel of
the stereo sound is audible.
C++ Syntax
FMOD_RESULT Channel::setPaused(
bool paused
);
C Syntax
FMOD_RESULT FMOD_Channel_SetPaused(
FMOD_CHANNEL *channel,
FMOD_BOOL paused
);
C# Syntax
RESULT Channel.setPaused(
bool paused
);
JavaScript Syntax
Channel.setPaused(
paused
);
Parameters
paused
Paused state, true = paused, false = unpaused.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Each channel and channel group has its own paused state, pausing a channel
group will pause all contained channels but will not affect their individual
setting. Calling ChannelControl::getPaused will always return the value you set.
See Also
ChannelControl::getPaused
C++ Syntax
FMOD_RESULT Channel::setPitch(
float pitch
);
C Syntax
FMOD_RESULT FMOD_Channel_SetPitch(
FMOD_CHANNEL *channel,
float pitch
);
C# Syntax
RESULT Channel.setPitch(
float pitch
);
JavaScript Syntax
Channel.setPitch(
pitch
);
Parameters
pitch
Pitch value, 0.5 = half pitch, 2.0 = double pitch, etc default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function scales existing frequency values by the pitch.
See Also
ChannelControl::getPitch
Channel::setFrequency
Channel::getFrequency
C++ Syntax
FMOD_RESULT Channel::setPosition(
unsigned int position,
FMOD_TIMEUNIT postype
);
C Syntax
FMOD_RESULT FMOD_Channel_SetPosition(
FMOD_CHANNEL *channel,
unsigned int position,
FMOD_TIMEUNIT postype
);
C# Syntax
RESULT Channel.setPosition(
uint position,
TIMEUNIT postype
);
JavaScript Syntax
Channel.setPosition(
position,
postype
);
Parameters
position
Position of the channel to set in units specified in the 'postype' parameter.
postype
Time unit to set the channel position by. See FMOD_TIMEUNIT.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Certain timeunits do not work depending on the file format. For example
FMOD_TIMEUNIT_MODORDER will not work with an MP3 file.
If you are calling this function on a stream, it has to possibly reflush its buffer to
get zero latency playback when it resumes playing, therefore it could potentially
cause a stall or take a small amount of time to do this.
Warning! Using a VBR source that does not have an associated seek table or
seek information (such as MP3 or MOD/S3M/XM/IT) may cause inaccurate
seeking if you specify FMOD_TIMEUNIT_MS or FMOD_TIMEUNIT_PCM.
If you want FMOD to create a PCM vs bytes seek table so that seeking is
accurate, you will have to specify FMOD_ACCURATETIME when loading or
opening the sound. This means there is a slight delay as FMOD scans the whole
file when loading the sound to create this table.
See Also
Channel::getPosition
FMOD_TIMEUNIT
FMOD_MODE
Sound::getOpenState
C++ Syntax
FMOD_RESULT Channel::setPriority(
int priority
);
C Syntax
FMOD_RESULT FMOD_Channel_SetPriority(
FMOD_CHANNEL *channel,
int priority
);
C# Syntax
RESULT Channel.setPriority(
int priority
);
JavaScript Syntax
Channel.setPriority(
priority
);
Parameters
priority
Priority for the channel, from 0 (most important) to 256 (least important),
default = 128.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When more channels than available are played the virtual channel system will
choose existing channels to steal. Lower priority sounds will always be stolen
before higher priority sounds. For channels of equal priority, that with the
quietest ChannelControl::getAudibility value will be stolen.
See Also
Channel::getPriority
ChannelControl::getAudibility
C++ Syntax
FMOD_RESULT Channel::setReverbProperties(
int instance,
float wet
);
C Syntax
FMOD_RESULT FMOD_Channel_SetReverbProperties(
FMOD_CHANNEL *channel,
int instance,
float wet
);
C# Syntax
RESULT Channel.setReverbProperties(
int instance,
float wet
);
JavaScript Syntax
Channel.setReverbProperties(
instance,
wet
);
Parameters
instance
Index of the particular reverb instance to target, from 0 to
FMOD_REVERB_MAXINSTANCES inclusive.
wet
Send level for the signal to the reverb, from 0 (none) to 1.0 (full), default =
1.0 for Channels, 0.0 for ChannelGroups. See remarks.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A Channel is automatically connected to all existing reverb instances due to the
default wet level of 1.0. A ChannelGroup however will not send to any reverb by
default requiring an explicit call to this function.
A ChannelGroup reverb is optimal for the case where you want to send 1 mixed
signal to the reverb, rather than a lot of individual channel reverb sends. It is
advisable to do this to reduce CPU if you have many Channels inside a
ChannelGroup.
Keep in mind when setting a wet level for a ChannelGroup, any Channels under
that ChannelGroup will still have their existing sends to the reverb. To avoid this
doubling up you should explicitly set the Channel wet levels to 0.0.
See Also
ChannelControl::getReverbProperties
C++ Syntax
FMOD_RESULT Channel::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_Channel_SetUserData(
FMOD_CHANNEL *channel,
void *userdata
);
C# Syntax
RESULT Channel.setUserData(
IntPtr userdata
);
JavaScript Syntax
Channel.setUserData(
userdata
);
Parameters
userdata
Data that the user wishes stored within this object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You can use this to store a pointer to any wrapper or internal class that is
associated with this object. This is especially useful for callbacks where you
need to get back access to your own objects.
See Also
ChannelControl::getUserData
C++ Syntax
FMOD_RESULT Channel::setVolume(
float volume
);
C Syntax
FMOD_RESULT FMOD_Channel_SetVolume(
FMOD_CHANNEL *channel,
float volume
);
C# Syntax
RESULT Channel.setVolume(
float volume
);
JavaScript Syntax
Channel.setVolume(
volume
);
Parameters
volume
Linear volume level, default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Volume level can be below 0 to invert a signal and above 1 to amplify the signal.
Note that increasing the signal level too far may cause audible distortion.
Sound::setDefaults can be used to change the default volume for any channels
played using that sound.
See Also
ChannelControl::getVolume
Sound::setDefaults
C++ Syntax
FMOD_RESULT Channel::setVolumeRamp(
bool ramp
);
C Syntax
FMOD_RESULT FMOD_Channel_SetVolumeRamp(
FMOD_CHANNEL *channel,
FMOD_BOOL ramp
);
C# Syntax
RESULT Channel.setVolumeRamp(
bool ramp
);
JavaScript Syntax
Channel.setVolumeRamp(
ramp
);
Parameters
ramp
Whether to enable volume ramping.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When changing volumes on a non-paused channel, FMOD normally adds a
small ramp to avoid a pop sound. This function allows that setting to be
overriden and volume changes to be applied immediately.
See Also
ChannelControl::getVolumeRamp
C++ Syntax
FMOD_RESULT Channel::stop();
C Syntax
FMOD_RESULT FMOD_Channel_Stop(FMOD_CHANNEL *channel);
C# Syntax
RESULT Channel.stop();
JavaScript Syntax
Channel.stop();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::playSound
C++ Syntax
FMOD_RESULT ChannelGroup::addDSP(
int index,
DSP *dsp
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_AddDSP(
FMOD_CHANNELGROUP *channelgroup,
int index,
FMOD_DSP *dsp
);
C# Syntax
RESULT ChannelGroup.addDSP(
int index,
DSP dsp
);
JavaScript Syntax
ChannelGroup.addDSP(
index,
dsp
);
Parameters
index
Offset to add this DSP unit at in the DSP chain, see
FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
dsp
Pointer to a pre-created DSP unit to be inserted at the specified offset.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createDSP
System::createDSPByType
System::createDSPByPlugin
ChannelControl::removeDSP
ChannelControl::getDSP
ChannelControl::getNumDSPs
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT ChannelGroup::addFadePoint(
unsigned long long dspclock,
float volume
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_AddFadePoint(
FMOD_CHANNELGROUP *channelgroup,
unsigned long long dspclock,
float volume
);
C# Syntax
RESULT ChannelGroup.addFadePoint(
ulong dspclock,
float volume
);
JavaScript Syntax
ChannelGroup.addFadePoint(
dspclock,
volume
);
Parameters
dspclock
DSP clock of the parent channel group to set the fade point volume.
volume
Volume level where 0 is silent and 1.0 is normal volume. Amplification is
supported.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
For every fade point, FMOD will do a per sample volume ramp between them. It
will scale with the current Channel or ChannelGroup's volume.
// Ramp from full volume to half volume over the next 4096 samples
FMOD_RESULT result;
unsigned long long parentclock;
result = target->getDSPClock(NULL, &parentclock);
result = target->addFadePoint(parentclock, 1.0f);
result = target->addFadePoint(parentclock + 4096, 0.5f);
See Also
ChannelControl::removeFadePoints
ChannelControl::setFadePointRamp
ChannelControl::getFadePoints
C++ Syntax
FMOD_RESULT ChannelGroup::addGroup(
FMOD::ChannelGroup *group,
bool propagatedspclock,
FMOD::DSPConnection **connection
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_AddGroup(
FMOD_CHANNELGROUP *channelgroup,
FMOD_CHANNELGROUP *group,
FMOD_BOOL propagatedspclock,
FMOD_DSPCONNECTION **connection
);
C# Syntax
RESULT ChannelGroup.addGroup(
ChannelGroup group,
bool propagatedspclock,
out DSPConnection connection
);
JavaScript Syntax
ChannelGroup.addGroup(
group,
propagatedspclock,
connection // writes value to connection.val
);
Parameters
group
Channel group to add as a child.
propagatedspclock
When a child group is added to a parent group, the clock values from the
parent will be propogated down into the child.
connection
Address of a variable to receive a pointer to a DSP connection, which is the
connection between the parent and the child group's DSP units.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelGroup::getNumGroups
ChannelGroup::getGroup
ChannelGroup::getParentGroup
C++ Syntax
FMOD_RESULT ChannelGroup::get3DAttributes(
FMOD_VECTOR *pos,
FMOD_VECTOR *vel,
FMOD_VECTOR *alt_pan_pos
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DAttributes(
FMOD_CHANNELGROUP *channelgroup,
FMOD_VECTOR *pos,
FMOD_VECTOR *vel,
FMOD_VECTOR *alt_pan_pos
);
C# Syntax
RESULT ChannelGroup.get3DAttributes(
out VECTOR pos,
out VECTOR vel,
out VECTOR alt_pan_pos
);
JavaScript Syntax
ChannelGroup.get3DAttributes(
pos, // writes value to pos.val
vel, // writes value to vel.val
alt_pan_pos // writes value to alt_pan_pos.val
);
Parameters
pos
Address of a variable that receives the position in 3D space used for
panning and attenuation. Optional, specify 0 or NULL to ignore.
vel
Address of a variable that receives the velocity in 'distance units per second'
(see remarks) in 3D space. Optional, specify 0 or NULL to ignore.
alt_pan_pos
(Unimplemented).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
See Also
ChannelControl::set3DAttributes
System::set3DSettings
FMOD_VECTOR
C++ Syntax
FMOD_RESULT ChannelGroup::get3DConeOrientation(
FMOD_VECTOR *orientation
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DConeOrientation(
FMOD_CHANNELGROUP *channelgroup,
FMOD_VECTOR *orientation
);
C# Syntax
RESULT ChannelGroup.get3DConeOrientation(
out VECTOR orientation
);
JavaScript Syntax
ChannelGroup.get3DConeOrientation(
orientation // writes value to orientation.val
);
Parameters
orientation
Address of a variable that receives the coordinates of the sound cone
orientation vector, the vector information represents the center of the sound
cone.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DConeOrientation
C++ Syntax
FMOD_RESULT ChannelGroup::get3DConeSettings(
float *insideconeangle,
float *outsideconeangle,
float *outsidevolume
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DConeSettings(
FMOD_CHANNELGROUP *channelgroup,
float *insideconeangle,
float *outsideconeangle,
float *outsidevolume
);
C# Syntax
RESULT ChannelGroup.get3DConeSettings(
out float insideconeangle,
out float outsideconeangle,
out float outsidevolume
);
JavaScript Syntax
ChannelGroup.get3DConeSettings(
insideconeangle, // writes value to insideconeangle.val
outsideconeangle, // writes value to outsideconeangle.val
outsidevolume // writes value to outsidevolume.val
);
Parameters
insideconeangle
Address of a variable that receives the inside cone angle, in degrees. This is
the angle within which the sound is at its normal volume.
outsideconeangle
Address of a variable that receives the outside cone angle, in degrees. This
is the angle outside of which the sound is at its outside volume.
outsidevolume
Address of a variable that receives the cone outside volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DConeSettings
C++ Syntax
FMOD_RESULT ChannelGroup::get3DCustomRolloff(
FMOD_VECTOR **points,
int *numpoints
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DCustomRolloff(
FMOD_CHANNELGROUP *channelgroup,
FMOD_VECTOR **points,
int *numpoints
);
C# Syntax
RESULT ChannelGroup.get3DCustomRolloff(
out IntPtr points,
out int numpoints
);
JavaScript Syntax
ChannelGroup.get3DCustomRolloff(
points, // writes value to points.val
numpoints // writes value to numpoints.val
);
Parameters
points
Address of a variable to receive the pointer to the current custom rolloff
point list. Optional, specify 0 or NULL to ignore.
numpoints
Address of a variable to receive the number of points int he current custom
rolloff point list. Optional, specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DCustomRolloff
FMOD_VECTOR
C++ Syntax
FMOD_RESULT ChannelGroup::get3DDistanceFilter(
bool *custom,
float *customLevel,
float *centerFreq
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DDistanceFilter(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL *custom,
float *customLevel,
float *centerFreq
);
C# Syntax
RESULT ChannelGroup.get3DDistanceFilter(
out bool custom,
out float customLevel,
out float centerFreq
);
JavaScript Syntax
ChannelGroup.get3DDistanceFilter(
custom, // writes value to custom.val
customLevel, // writes value to customLevel.val
centerFreq // writes value to centerFreq.val
);
Parameters
custom
Address of a variable to receive the enabled/disabled state of the FMOD
distance rolloff calculation. Default = false.
customLevel
Address of a variable to receive the manual user attenuation, where 1.0 = no
attenuation and 0 = complete attenuation. Default = 1.0.
centerFreq
Address of a variable to receive center frequency in hz for the high-pass
filter used to simulate distance attenuation, from 10.0 to 22050.0. Default =
1500.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DDistanceFilter
C++ Syntax
FMOD_RESULT ChannelGroup::get3DDopplerLevel(
float *level
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DDopplerLevel(
FMOD_CHANNELGROUP *channelgroup,
float *level
);
C# Syntax
RESULT ChannelGroup.get3DDopplerLevel(
out float level
);
JavaScript Syntax
ChannelGroup.get3DDopplerLevel(
level // writes value to level.val
);
Parameters
level
Address of a variable to receives the doppler scale from 0.0 (none), to 1.0
(normal) to 5.0 (exaggerated).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DDopplerLevel
C++ Syntax
FMOD_RESULT ChannelGroup::get3DLevel(
float *level
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DLevel(
FMOD_CHANNELGROUP *channelgroup,
float *level
);
C# Syntax
RESULT ChannelGroup.get3DLevel(
out float level
);
JavaScript Syntax
ChannelGroup.get3DLevel(
level // writes value to level.val
);
Parameters
level
3D pan level from 0.0 (attenuation is ignored and panning as set by 2D
panning functions) to 1.0 (pan and attenuate according to 3D position).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DPanLevel
C++ Syntax
FMOD_RESULT ChannelGroup::get3DMinMaxDistance(
float *mindistance,
float *maxdistance
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DMinMaxDistance(
FMOD_CHANNELGROUP *channelgroup,
float *mindistance,
float *maxdistance
);
C# Syntax
RESULT ChannelGroup.get3DMinMaxDistance(
out float mindistance,
out float maxdistance
);
JavaScript Syntax
ChannelGroup.get3DMinMaxDistance(
mindistance, // writes value to mindistance.val
maxdistance // writes value to maxdistance.val
);
Parameters
mindistance
Address of a variable that receives the minimum volume distance in 'units'
(see remarks). Optional, specify 0 or NULL to ignore.
maxdistance
Address of a variable that receives the maximum volume distance in 'units'
(see remarks). Optional, specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
See Also
ChannelControl::set3DMinMaxDistance
System::set3DSettings
C++ Syntax
FMOD_RESULT ChannelGroup::get3DOcclusion(
float *directocclusion,
float *reverbocclusion
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DOcclusion(
FMOD_CHANNELGROUP *channelgroup,
float *directocclusion,
float *reverbocclusion
);
C# Syntax
RESULT ChannelGroup.get3DOcclusion(
out float directocclusion,
out float reverbocclusion
);
JavaScript Syntax
ChannelGroup.get3DOcclusion(
directocclusion, // writes value to directocclusion.val
reverbocclusion // writes value to reverbocclusion.val
);
Parameters
directocclusion
Address of a variable that receives the occlusion factor for the direct path.
reverbocclusion
Address of a variable that receives the occlusion factor for the reverb mix.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DOcclusion
C++ Syntax
FMOD_RESULT ChannelGroup::get3DSpread(
float *angle
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Get3DSpread(
FMOD_CHANNELGROUP *channelgroup,
float *angle
);
C# Syntax
RESULT ChannelGroup.get3DSpread(
out float angle
);
JavaScript Syntax
ChannelGroup.get3DSpread(
angle // writes value to angle.val
);
Parameters
angle
Address of a variable that receives the speaker spread angle.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::set3DSpread
C++ Syntax
FMOD_RESULT ChannelGroup::getAudibility(
float *audibility
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetAudibility(
FMOD_CHANNELGROUP *channelgroup,
float *audibility
);
C# Syntax
RESULT ChannelGroup.getAudibility(
out float audibility
);
JavaScript Syntax
ChannelGroup.getAudibility(
audibility // writes value to audibility.val
);
Parameters
audibility
Address of a variable that receives the audibility value.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This does not represent the waveform, just the calculated result of all volume
modifiers. This value is used by the virtual channel system to order its channels
between real and virtual.
See the Virtual Voice System page for more details about how the audibility is
calculated.
See Also
Channel::isVirtual
ChannelControl::getVolume
ChannelControl::get3DOcclusion
ChannelControl::get3DAttributes
FMOD_DSP_PARAMETER_OVERALLGAIN
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN
C++ Syntax
FMOD_RESULT ChannelGroup::getChannel(
int index,
FMOD::Channel **channel
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetChannel(
FMOD_CHANNELGROUP *channelgroup,
int index,
FMOD_CHANNEL **channel
);
C# Syntax
RESULT ChannelGroup.getChannel(
int index,
out Channel channel
);
JavaScript Syntax
ChannelGroup.getChannel(
index,
channel // writes value to channel.val
);
Parameters
index
Index of the channel inside the channel group, from 0 to the number of
channels returned by ChannelGroup::getNumChannels.
channel
Address of a variable to receieve a pointer to a channel.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelGroup::getNumChannels
System::getMasterChannelGroup
System::createChannelGroup
C++ Syntax
FMOD_RESULT ChannelGroup::getDSP(
int index,
DSP **dsp
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetDSP(
FMOD_CHANNELGROUP *channelgroup,
int index,
FMOD_DSP **dsp
);
C# Syntax
RESULT ChannelGroup.getDSP(
int index,
out DSP dsp
);
JavaScript Syntax
ChannelGroup.getDSP(
index,
dsp // writes value to dsp.val
);
Parameters
index
Offset into the DSP chain, see
FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
dsp
Address of a variable to receive a pointer to the requested DSP unit.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addDSP
ChannelControl::removeDSP
ChannelControl::getNumDSPs
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT ChannelGroup::getDSPClock(
unsigned long long *dspclock,
unsigned long long *parentclock
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetDSPClock(
FMOD_CHANNELGROUP *channelgroup,
unsigned long long *dspclock,
unsigned long long *parentclock
);
C# Syntax
RESULT ChannelGroup.getDSPClock(
out ulong dspclock,
out ulong parentclock
);
JavaScript Syntax
ChannelGroup.getDSPClock(
dspclock, // writes value to dspclock.val
parentclock // writes value to parentclock.val
);
Parameters
dspclock
Address of a variable to receive the DSP clock value for the head DSP
node.
parentclock
Address of a variable to receive the DSP clock value for the tail DSP node.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use result with ChannelControl::setDelay to play a sound on an exact tick in the
future, or stop it in the future.
Note that when delaying a channel or channel group you want to sync it to the
parent channel group DSP clock value, not its own DSP clock value.
See Also
ChannelControl::setDelay
ChannelControl::getDelay
C++ Syntax
FMOD_RESULT ChannelGroup::getDSPIndex(
DSP *dsp,
int *index
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetDSPIndex(
FMOD_CHANNELGROUP *channelgroup,
FMOD_DSP *dsp,
int *index
);
C# Syntax
RESULT ChannelGroup.getDSPIndex(
DSP dsp,
out int index
);
JavaScript Syntax
ChannelGroup.getDSPIndex(
dsp,
index // writes value to index.val
);
Parameters
dsp
Pointer to a DSP unit that exists in the DSP chain.
index
Address of a variable to receive the offset in the DSP chain of the specified
DSP.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setDSPIndex
C++ Syntax
FMOD_RESULT ChannelGroup::getDelay(
unsigned long long *dspclock_start,
unsigned long long *dspclock_end,
bool *stopchannels
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetDelay(
FMOD_CHANNELGROUP *channelgroup,
unsigned long long *dspclock_start,
unsigned long long *dspclock_end,
FMOD_BOOL *stopchannels
);
C# Syntax
RESULT ChannelGroup.getDelay(
out ulong dspclock_start,
out ulong dspclock_end,
out bool stopchannels
);
JavaScript Syntax
ChannelGroup.getDelay(
dspclock_start, // writes value to dspclock_start.val
dspclock_end, // writes value to dspclock_end.val
stopchannels // writes value to stopchannels.val
);
Parameters
dspclock_start
Address of a variable that receives the DSP clock of the parent channel
group to audibly start playing sound at. Optional, specify 0 or NULL to
ignore.
dspclock_end
Address of a variable that receives the DSP clock of the parent channel
group to audibly stop playing sound at. Optional, specify 0 or NULL to
ignore.
stopchannels
Address of a variable that receives TRUE = stop according to
ChannelControl::isPlaying. FALSE = remain 'active' and a new start delay
could start playback again at a later time. Optional, specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setDelay
ChannelControl::getDSPClock
ChannelControl::isPlaying
C++ Syntax
FMOD_RESULT ChannelGroup::getFadePoints(
unsigned int *numpoints,
unsigned long long *point_dspclock,
float *point_volume
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetFadePoints(
FMOD_CHANNELGROUP *channelgroup,
unsigned int *numpoints,
unsigned long long *point_dspclock,
float *point_volume
);
C# Syntax
RESULT ChannelGroup.getFadePoints(
ref uint numpoints,
ulong[] point_dspclock,
float[] point_volume
);
JavaScript Syntax
ChannelGroup.getFadePoints(
numpoints, // writes value to numpoints.val
point_dspclock, // writes value to point_dspclock.val
point_volume // writes value to point_volume.val
);
Parameters
numpoints
Address of a variable to receive the number of fade points stored within the
Channel or ChannelGroup.
point_dspclock
Address of a variable to receive an array of 64bit clock values. Can be 0 or
NULL.
point_volume
Address of a variable to receive an array of floating point volume values.
Can be 0 or NULL.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
To first get the number of points for memory purposes, and not store any data,
call this function with point_dpsclock and point_volume parameters being 0 or
NULL.
See Also
ChannelControl::addFadePoint
ChannelControl::removeFadePoints
C++ Syntax
FMOD_RESULT ChannelGroup::getGroup(
int index,
FMOD::ChannelGroup **group
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetGroup(
FMOD_CHANNELGROUP *channelgroup,
int index,
FMOD_CHANNELGROUP **group
);
C# Syntax
RESULT ChannelGroup.getGroup(
int index,
out ChannelGroup group
);
JavaScript Syntax
ChannelGroup.getGroup(
index,
group // writes value to group.val
);
Parameters
index
Index to specify which sub channel group to receieve.
group
Address of a variable to receieve a pointer to a channel group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelGroup::addGroup
ChannelGroup::getNumGroups
ChannelGroup::getParentGroup
C++ Syntax
FMOD_RESULT ChannelGroup::getLowPassGain(
float *gain
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetLowPassGain(
FMOD_CHANNELGROUP *channelgroup,
float *gain
);
C# Syntax
RESULT ChannelGroup.getLowPassGain(
out float gain
);
JavaScript Syntax
ChannelGroup.getLowPassGain(
gain // writes value to gain.val
);
Parameters
gain
Address of a variable that receives the linear gain level, from 0 (silent) to
1.0 (full volume).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setLowPassGain
C++ Syntax
FMOD_RESULT ChannelGroup::getMixMatrix(
float *matrix,
int *outchannels,
int *inchannels,
int matrixhop
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetMixMatrix(
FMOD_CHANNELGROUP *channelgroup,
float *matrix,
int *outchannels,
int *inchannels,
int matrixhop
);
C# Syntax
RESULT ChannelGroup.getMixMatrix(
float[] matrix,
out int outchannels,
out int inchannels,
int inchannel_hop
);
JavaScript Syntax
ChannelGroup.getMixMatrix(
matrix, // writes value to matrix.val
outchannels, // writes value to outchannels.val
inchannels, // writes value to inchannels.val
inchannel_hop
);
Parameters
matrix
Address of a 2 dimensional array of volume levels in row-major order. Each
row represents an output speaker, each column represents an input channel.
outchannels
Address of a variable to receive the number of output channels (rows) in the
matrix being passed in.
inchannels
Address of a variable to receive the number of input channels (columns) in
the matrix being passed in.
matrixhop
The width (total number of columns) of the matrix. Optional. If this is 0,
inchannels will be taken as the width of the matrix. Maximum of
FMOD_MAX_CHANNEL_WIDTH.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The gain for input channel 's' to output channel 't' is matrix[t * matrixhop + s].
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion.
The matrix size will generally be the size of the number of channels in the
current speaker mode. Use System::getSoftwareFormat to determine this.
Passing NULL for 'matrix' will allow you to query 'outchannels' and 'inchannels'
without copying any data.
See Also
ChannelControl::setMixMatrix
System::getSoftwareFormat
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT ChannelGroup::getMode(
FMOD_MODE *mode
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetMode(
FMOD_CHANNELGROUP *channelgroup,
FMOD_MODE *mode
);
C# Syntax
RESULT ChannelGroup.getMode(
out MODE mode
);
JavaScript Syntax
ChannelGroup.getMode(
mode // writes value to mode.val
);
Parameters
mode
Address of a variable to receive the mode bits.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Channel::setMode
FMOD_MODE
C++ Syntax
FMOD_RESULT ChannelGroup::getMute(
bool *mute
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetMute(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL *mute
);
C# Syntax
RESULT ChannelGroup.getMute(
out bool mute
);
JavaScript Syntax
ChannelGroup.getMute(
mute // writes value to mute.val
);
Parameters
mute
Address of a variable that receives the current mute state, true = mute
(silent), false = normal volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setMute
C++ Syntax
FMOD_RESULT ChannelGroup::getName(
char *name,
int namelen
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetName(
FMOD_CHANNELGROUP *channelgroup,
char *name,
int namelen
);
C# Syntax
RESULT ChannelGroup.getName(
StringBuilder name,
int namelen
);
JavaScript Syntax
ChannelGroup.getName(
name // writes value to name.val
);
Parameters
name
Address of a variable that receives the name of the channel group.
namelen
Length in bytes of the target buffer to receieve the string.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
JavaScript only :
Note: For the "name" parameter, the maximum string length is 512.
See Also
System::getMasterChannelGroup
System::createChannelGroup
C++ Syntax
FMOD_RESULT ChannelGroup::getNumChannels(
int *numchannels
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetNumChannels(
FMOD_CHANNELGROUP *channelgroup,
int *numchannels
);
C# Syntax
RESULT ChannelGroup.getNumChannels(
out int numchannels
);
JavaScript Syntax
ChannelGroup.getNumChannels(
numchannels // writes value to numchannels.val
);
Parameters
numchannels
Address of a variable to receive the current number of channels in this
channel group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use this function to enumerate the channels within the channel group. You can
then use ChannelGroup::getChannel to retrieve each individual channel.
See Also
ChannelGroup::getChannel
System::getMasterChannelGroup
System::createChannelGroup
C++ Syntax
FMOD_RESULT ChannelGroup::getNumDSPs(
int *numdsps
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetNumDSPs(
FMOD_CHANNELGROUP *channelgroup,
int *numdsps
);
C# Syntax
RESULT ChannelGroup.getNumDSPs(
out int numdsps
);
JavaScript Syntax
ChannelGroup.getNumDSPs(
numdsps // writes value to numdsps.val
);
Parameters
numdsps
Address of a variable that receives the number of DSP units in the DSP
chain.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addDSP
ChannelControl::removeDSP
ChannelControl::getDSP
C++ Syntax
FMOD_RESULT ChannelGroup::getNumGroups(
int *numgroups
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetNumGroups(
FMOD_CHANNELGROUP *channelgroup,
int *numgroups
);
C# Syntax
RESULT ChannelGroup.getNumGroups(
out int numgroups
);
JavaScript Syntax
ChannelGroup.getNumGroups(
numgroups // writes value to numgroups.val
);
Parameters
numgroups
Address of a variable to receive the number of channel groups within this
channel group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelGroup::addGroup
ChannelGroup::getGroup
ChannelGroup::getParentGroup
C++ Syntax
FMOD_RESULT ChannelGroup::getParentGroup(
FMOD::ChannelGroup **group
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetParentGroup(
FMOD_CHANNELGROUP *channelgroup,
FMOD_CHANNELGROUP **group
);
C# Syntax
RESULT ChannelGroup.getParentGroup(
out ChannelGroup group
);
JavaScript Syntax
ChannelGroup.getParentGroup(
group // writes value to group.val
);
Parameters
group
Address of a variable to receive a pointer to a channel group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelGroup::addGroup
ChannelGroup::getNumGroups
ChannelGroup::getGroup
C++ Syntax
FMOD_RESULT ChannelGroup::getPaused(
bool *paused
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetPaused(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL *paused
);
C# Syntax
RESULT ChannelGroup.getPaused(
out bool paused
);
JavaScript Syntax
ChannelGroup.getPaused(
paused // writes value to paused.val
);
Parameters
paused
Address of a variable that receives the current paused state, true = paused,
false = not paused.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setPaused
C++ Syntax
FMOD_RESULT ChannelGroup::getPitch(
float *pitch
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetPitch(
FMOD_CHANNELGROUP *channelgroup,
float *pitch
);
C# Syntax
RESULT ChannelGroup.getPitch(
out float pitch
);
JavaScript Syntax
ChannelGroup.getPitch(
pitch // writes value to pitch.val
);
Parameters
pitch
Address of a variable to receive the pitch value, 0.5 = half pitch, 2.0 =
double pitch, etc.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setPitch
Channel::setFrequency
Channel::getFrequency
C++ Syntax
FMOD_RESULT ChannelGroup::getReverbProperties(
int instance,
float *wet
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetReverbProperties(
FMOD_CHANNELGROUP *channelgroup,
int instance,
float *wet
);
C# Syntax
RESULT ChannelGroup.getReverbProperties(
int instance,
out float wet
);
JavaScript Syntax
ChannelGroup.getReverbProperties(
instance,
wet // writes value to wet.val
);
Parameters
instance
Index of the particular reverb instance to target, from 0 to
FMOD_REVERB_MAXINSTANCES inclusive.
wet
Address of a variable that receives the send level for the signal to the
reverb, from 0 (none) to 1.0 (full).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setReverbProperties
C++ Syntax
FMOD_RESULT ChannelGroup::getSystemObject(
System **system
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetSystemObject(
FMOD_CHANNELGROUP *channelgroup,
FMOD_SYSTEM **system
);
C# Syntax
RESULT ChannelGroup.getSystemObject(
out System system
);
JavaScript Syntax
ChannelGroup.getSystemObject(
system // writes value to system.val
);
Parameters
system
Address of a variable that receives the System object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createChannelGroup
System::getMasterChannelGroup
System::playSound
C++ Syntax
FMOD_RESULT ChannelGroup::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetUserData(
FMOD_CHANNELGROUP *channelgroup,
void **userdata
);
C# Syntax
RESULT ChannelGroup.getUserData(
out IntPtr userdata
);
JavaScript Syntax
ChannelGroup.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of a variable to receives data that the user has stored within this
object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setUserData
C++ Syntax
FMOD_RESULT ChannelGroup::getVolume(
float *volume
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetVolume(
FMOD_CHANNELGROUP *channelgroup,
float *volume
);
C# Syntax
RESULT ChannelGroup.getVolume(
out float volume
);
JavaScript Syntax
ChannelGroup.getVolume(
volume // writes value to volume.val
);
Parameters
volume
Address of a variable to receive the linear volume level.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setVolume
C++ Syntax
FMOD_RESULT ChannelGroup::getVolumeRamp(
bool *ramp
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_GetVolumeRamp(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL *ramp
);
C# Syntax
RESULT ChannelGroup.getVolumeRamp(
out bool ramp
);
JavaScript Syntax
ChannelGroup.getVolumeRamp(
ramp // writes value to ramp.val
);
Parameters
ramp
Address of a variable to receive the volume ramp state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::setVolumeRamp
C++ Syntax
FMOD_RESULT ChannelGroup::isPlaying(
bool *isplaying
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_IsPlaying(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL *isplaying
);
C# Syntax
RESULT ChannelGroup.isPlaying(
out bool isplaying
);
JavaScript Syntax
ChannelGroup.isPlaying(
isplaying // writes value to isplaying.val
);
Parameters
isplaying
Address of a variable that receives the current playing status, true =
currently playing a sound, false = not playing a sound.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::playSound
System::playDSP
C++ Syntax
FMOD_RESULT ChannelGroup::release();
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Release(FMOD_CHANNELGROUP *channelgroup
C# Syntax
RESULT ChannelGroup.release();
JavaScript Syntax
ChannelGroup.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
All channels (and groups) assigned to this group are returned back to the master
channel group owned by the System object (see
System::getMasterChannelGroup).
See Also
System::createChannelGroup
System::getMasterChannelGroup
C++ Syntax
FMOD_RESULT ChannelGroup::removeDSP(
DSP *dsp
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_RemoveDSP(
FMOD_CHANNELGROUP *channelgroup,
FMOD_DSP *dsp
);
C# Syntax
RESULT ChannelGroup.removeDSP(
DSP dsp
);
JavaScript Syntax
ChannelGroup.removeDSP(
dsp
);
Parameters
dsp
Pointer to a DSP unit (that exists in the DSP chain) you wish to remove.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addDSP
ChannelControl::getDSP
ChannelControl::getNumDSPs
C++ Syntax
FMOD_RESULT ChannelGroup::removeFadePoints(
unsigned long long dspclock_start,
unsigned long long dspclock_end
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_RemoveFadePoints(
FMOD_CHANNELGROUP *channelgroup,
unsigned long long dspclock_start,
unsigned long long dspclock_end
);
C# Syntax
RESULT ChannelGroup.removeFadePoints(
ulong dspclock_start,
ulong dspclock_end
);
JavaScript Syntax
ChannelGroup.removeFadePoints(
dspclock_start,
dspclock_end
);
Parameters
dspclock_start
DSP clock of the parent channel group to start removing fade points from.
dspclock_end
DSP clock of the parent channel group to start removing fade points to.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::addFadePoint
ChannelControl::getFadePoints
C++ Syntax
FMOD_RESULT ChannelGroup::set3DAttributes(
const FMOD_VECTOR *pos,
const FMOD_VECTOR *vel,
const FMOD_VECTOR *alt_pan_pos
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DAttributes(
FMOD_CHANNELGROUP *channelgroup,
const FMOD_VECTOR *pos,
const FMOD_VECTOR *vel,
const FMOD_VECTOR *alt_pan_pos
);
C# Syntax
RESULT ChannelGroup.set3DAttributes(
ref VECTOR pos,
ref VECTOR vel,
ref VECTOR alt_pan_pos
);
JavaScript Syntax
ChannelGroup.set3DAttributes(
pos,
vel,
alt_pan_pos
);
Parameters
pos
Position in 3D space used for panning and attenuation. Optional, specify 0
or NULL to ignore.
vel
Velocity in 'distance units per second' (see remarks) in 3D space. Optional,
specify 0 or NULL to ignore.
alt_pan_pos
(Unimplemented).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A 'distance unit' is specified by System::set3DSettings. By default this is set to
meters which is a distance scale of 1.0.
For a stereo 3D sound, you can set the spread of the left/right parts in speaker
space by using ChannelControl::set3DSpread.
Vectors should use your chosen coordinate system, see 3D sounds for more
information.
See Also
ChannelControl::get3DAttributes
ChannelControl::set3DSpread
System::set3DSettings
FMOD_VECTOR
C++ Syntax
FMOD_RESULT ChannelGroup::set3DConeOrientation(
FMOD_VECTOR *orientation
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DConeOrientation(
FMOD_CHANNELGROUP *channelgroup,
FMOD_VECTOR *orientation
);
C# Syntax
RESULT ChannelGroup.set3DConeOrientation(
ref VECTOR orientation
);
JavaScript Syntax
ChannelGroup.set3DConeOrientation(
orientation
);
Parameters
orientation
Coordinates of the sound cone orientation vector, the vector information
represents the center of the sound cone.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function has no effect unless the cone angle and cone outside volume have
also been set to values other than the default.
See Also
ChannelControl::get3DConeOrientation
ChannelControl::set3DConeSettings
Sound::set3DConeSettings
FMOD_VECTOR
C++ Syntax
FMOD_RESULT ChannelGroup::set3DConeSettings(
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DConeSettings(
FMOD_CHANNELGROUP *channelgroup,
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
C# Syntax
RESULT ChannelGroup.set3DConeSettings(
float insideconeangle,
float outsideconeangle,
float outsidevolume
);
JavaScript Syntax
ChannelGroup.set3DConeSettings(
insideconeangle,
outsideconeangle,
outsidevolume
);
Parameters
insideconeangle
Inside cone angle, in degrees. This is the angle within which the sound is at
its normal volume. Must not be greater than 'outsideconeangle'. Default =
360.
outsideconeangle
Outside cone angle, in degrees. This is the angle outside of which the sound
is at its outside volume. Must not be less than 'insideconeangle'. Default =
360.
outsidevolume
Cone outside volume, from 0.0 to 1.0, default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
To define the parameters per sound use Sound::set3DConeSettings.
See Also
ChannelControl::get3DConeSettings
ChannelControl::set3DConeOrientation
Sound::set3DConeSettings
C++ Syntax
FMOD_RESULT ChannelGroup::set3DCustomRolloff(
FMOD_VECTOR *points,
int numpoints
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DCustomRolloff(
FMOD_CHANNELGROUP *channelgroup,
FMOD_VECTOR *points,
int numpoints
);
C# Syntax
RESULT ChannelGroup.set3DCustomRolloff(
ref VECTOR points,
int numpoints
);
JavaScript Syntax
ChannelGroup.set3DCustomRolloff(
points,
numpoints
);
Parameters
points
Array of FMOD_VECTOR structures where x = distance and y = volume
from 0.0 to 1.0. z should be set to 0.
numpoints
Number of points in the array.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note! This function does not duplicate the memory for the points internally. The
pointer you pass to FMOD must remain valid until there is no more use for it.
Do not free the memory while in use, or use a local variable that goes out of
scope while in use.
Points must be sorted by distance! Passing an unsorted list to FMOD will result
in an error.
Note that after the highest distance specified, the volume in the last entry is used
from that distance onwards.
C++ Syntax
FMOD_RESULT ChannelGroup::set3DDistanceFilter(
bool custom,
float customLevel,
float centerFreq
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DDistanceFilter(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL custom,
float customLevel,
float centerFreq
);
C# Syntax
RESULT ChannelGroup.set3DDistanceFilter(
bool custom,
float customLevel,
float centerFreq
);
JavaScript Syntax
ChannelGroup.set3DDistanceFilter(
custom,
customLevel,
centerFreq
);
Parameters
custom
Specify true to disable FMOD distance rolloff calculation. Default = false.
customLevel
Specify a attenuation factor manually here, where 1.0 = no attenuation and
0 = complete attenuation. Default = 1.0.
centerFreq
Specify a center frequency in hz for the high-pass filter used to simulate
distance attenuation, from 10.0 to 22050.0. Default = 1500.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::get3DDistanceFilter
C++ Syntax
FMOD_RESULT ChannelGroup::set3DDopplerLevel(
float level
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DDopplerLevel(
FMOD_CHANNELGROUP *channelgroup,
float level
);
C# Syntax
RESULT ChannelGroup.set3DDopplerLevel(
float level
);
JavaScript Syntax
ChannelGroup.set3DDopplerLevel(
level
);
Parameters
level
Doppler scale from 0.0 (none), to 1.0 (normal) to 5.0 (exaggerated), default
= 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
ChannelControl::get3DDopplerLevel
C++ Syntax
FMOD_RESULT ChannelGroup::set3DLevel(
float level
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DLevel(
FMOD_CHANNELGROUP *channelgroup,
float level
);
C# Syntax
RESULT ChannelGroup.set3DLevel(
float level
);
JavaScript Syntax
ChannelGroup.set3DLevel(
level
);
Parameters
level
3D pan level from 0.0 (attenuation is ignored and panning as set by 2D
panning functions) to 1.0 (pan and attenuate according to 3D position),
default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Only affects sounds created FMOD_3D.
Useful for morhping a sound between 3D and 2D. This is most common in
volumetric sound, when the sound goes from directional, to 'all around you' (and
doesn't pan according to listener position / direction).
See Also
ChannelControl::get3DLevel
ChannelControl::setPan
ChannelControl::setMixLevelsOutput
ChannelControl::setMixLevelsInput
ChannelControl::setMixMatrix
C++ Syntax
FMOD_RESULT ChannelGroup::set3DMinMaxDistance(
float mindistance,
float maxdistance
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DMinMaxDistance(
FMOD_CHANNELGROUP *channelgroup,
float mindistance,
float maxdistance
);
C# Syntax
RESULT ChannelGroup.set3DMinMaxDistance(
float mindistance,
float maxdistance
);
JavaScript Syntax
ChannelGroup.set3DMinMaxDistance(
mindistance,
maxdistance
);
Parameters
mindistance
Minimum volume distance in 'units' (see remarks), default = 1.0.
maxdistance
Maximum volume distance in 'units' (see remarks), default = 10000.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When the listener is in-between the minimum distance and the sound source the
volume will be at its maximum. As the listener moves from the minimum
distance to the maximum distance the sound will attenuate following the rolloff
curve set. When outside the maximum distance the sound will no longer
attenuate.
Minimum distance is useful to give the impression that the sound is loud or soft
in 3D space. An example of this is a small quiet object, such as a bumblebee,
which you could set a small mindistance such as 0.1. This would cause it to
attenuate quickly and dissapear when only a few meters away from the listener.
Another example is a jumbo jet, which you could set to a mindistance of 100.0
causing the volume to stay at its loudest until the listener was 100 meters away,
then it would be hundreds of meters more before it would fade out.
Maximum distance is effectively obsolete unless you need the sound to stop
fading out at a certain point. Do not adjust this from the default if you dont need
to. Some people have the confusion that maxdistance is the point the sound will
fade out to zero, this is not the case.
C++ Syntax
FMOD_RESULT ChannelGroup::set3DOcclusion(
float directocclusion,
float reverbocclusion
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DOcclusion(
FMOD_CHANNELGROUP *channelgroup,
float directocclusion,
float reverbocclusion
);
C# Syntax
RESULT ChannelGroup.set3DOcclusion(
float directocclusion,
float reverbocclusion
);
JavaScript Syntax
ChannelGroup.set3DOcclusion(
directocclusion,
reverbocclusion
);
Parameters
directocclusion
Occlusion factor for the direct path, from 0.0 (not occluded) to 1.0 (fully
occluded), default = 0.0.
reverbocclusion
Occlusion factor for the reverb mix, from 0.0 (not occluded) to 1.0 (fully
occluded), default = 0.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Normally the volume is simply attenuated by the 'directocclusion' factor
however if FMOD_INIT_CHANNEL_LOWPASS is specified frequency
filtering will be used with a very small CPU hit.
See Also
ChannelControl::get3DOcclusion
FMOD_INIT_CHANNEL_LOWPASS
C++ Syntax
FMOD_RESULT ChannelGroup::set3DSpread(
float angle
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Set3DSpread(
FMOD_CHANNELGROUP *channelgroup,
float angle
);
C# Syntax
RESULT ChannelGroup.set3DSpread(
float angle
);
JavaScript Syntax
ChannelGroup.set3DSpread(
angle
);
Parameters
angle
Speaker spread angle. 0 = all sound channels are located at the same
speaker location and is 'mono'. 360 = all sound channels are located at the
opposite speaker location to the speaker location that it should be according
to 3D position. Default = 0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Normally a 3D sound is aimed at one position in a speaker array depending on
the 3D position to give it direction. Left and right parts of a stereo sound for
example are consequently summed together and become 'mono'. When
increasing the 'spread' of a sound, the left and right parts of a stereo sound rotate
away from their original position, to give it more 'stereoness'. The rotation of the
sound channels are done in 'speaker space'.
Multichannel sounds with channel counts greater than stereo have their sub-
channels spread evently through the specified angle. For example a 6 channel
sound over a 90 degree spread has each channel located 15 degrees apart from
each other in the speaker array.
Mono sounds are spread as if they were a stereo signal, i.e. the signal is split into
2. The power will remain the same as it spreads around the speakers.
1. A spread angle of 0 makes the stereo sound mono at the point of the 3D
emitter.
2. A spread angle of 90 makes the left part of the stereo sound place itself at
45 degrees to the left and the right part 45 degrees to the right.
3. A spread angle of 180 makes the left part of the stero sound place itself at
90 degrees to the left and the right part 90 degrees to the right.
4. A spread angle of 360 makes the stereo sound mono at the opposite speaker
location to where the 3D emitter should be located (by moving the left part
180 degrees left and the right part 180 degrees right). So in this case, behind
you when the sound should be in front of you!
See Also
ChannelControl::get3DSpread
C++ Syntax
FMOD_RESULT ChannelGroup::setCallback(
FMOD_CHANNELCONTROL_CALLBACK callback
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetCallback(
FMOD_CHANNELGROUP *channelgroup,
FMOD_CHANNELCONTROL_CALLBACK callback
);
C# Syntax
RESULT ChannelGroup.setCallback(
CHANNEL_CALLBACK callback
);
JavaScript Syntax
ChannelGroup.setCallback(
callback
);
Parameters
callback
Pointer to a callback to receive the event when it happens.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Currently callbacks are driven by System::update and will only occur when this
function is called. This has the main advantage of far less complication due to
thread issues, and allows all FMOD commands, including loading sounds and
playing new sounds from the callback. It also allows any type of sound to have
an end callback, no matter what it is. The only disadvantage is that callbacks are
not asynchronous and are bound by the latency caused by the rate the user calls
the update command.
Callbacks are stdcall. Use F_CALLBACK in between your return type and
function name.
FMOD_RESULT F_CALLBACK mycallback(FMOD_CHANNELCONTROL *chanControl,
{
if (controlType == FMOD_CHANNELCONTROL_TYPE_CHANNEL)
{
FMOD::Channel *channel = (FMOD::Channel *)chanControl;
// Channel specific functions here...
}
else
{
FMOD::ChannelGroup *group = (FMOD::ChannelGroup *)chanControl;
// ChannelGroup specific functions here...
}
return FMOD_OK;
}
See Also
System::update
FMOD_CHANNELCONTROL_CALLBACK
FMOD_CHANNELCONTROL_CALLBACK_TYPE
C++ Syntax
FMOD_RESULT ChannelGroup::setDSPIndex(
DSP *dsp,
int index
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetDSPIndex(
FMOD_CHANNELGROUP *channelgroup,
FMOD_DSP *dsp,
int index
);
C# Syntax
RESULT ChannelGroup.setDSPIndex(
DSP dsp,
int index
);
JavaScript Syntax
ChannelGroup.setDSPIndex(
dsp,
index
);
Parameters
dsp
Pointer to a DSP unit that exists in the DSP chain.
index
Offset in the DSP chain to move the DSP to, see
FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is useful for reordering DSP units inside a Channel or
ChannelGroup so that processing can happen in the desired order.
You can verify the order of the DSP chain using iteration via
ChannelControl::getNumDSPs and ChannelControl::getDSP or with the FMOD
Profiler tool.
See Also
ChannelControl::getDSPIndex
ChannelControl::getNumDSPs
ChannelControl::getDSP
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT ChannelGroup::setDelay(
unsigned long long dspclock_start,
unsigned long long dspclock_end,
bool stopchannels
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetDelay(
FMOD_CHANNELGROUP *channelgroup,
unsigned long long dspclock_start,
unsigned long long dspclock_end,
FMOD_BOOL stopchannels
);
C# Syntax
RESULT ChannelGroup.setDelay(
ulong dspclock_start,
ulong dspclock_end,
bool stopchannels
);
JavaScript Syntax
ChannelGroup.setDelay(
dspclock_start,
dspclock_end,
stopchannels
);
Parameters
dspclock_start
DSP clock of the parent channel group to audibly start playing sound at, a
value of 0 indicates no delay.
dspclock_end
DSP clock of the parent channel group to audibly stop playing sound at, a
value of 0 indicates no delay.
stopchannels
TRUE = stop according to ChannelControl::isPlaying. FALSE = remain
'active' and a new start delay could start playback again at a later time.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Every channel and channel group has its own DSP Clock. A channel or channel
group can be delayed relatively against its parent, with sample accurate
positioning. To delay a sound, use the 'parent' channel group DSP clock to
reference against when passing values into this function.
If a parent channel group changes its pitch, the start and stop times will still be
correct as the parent clock is rate adjusted by that pitch.
See Also
ChannelControl::getDelay
ChannelControl::getDSPClock
ChannelControl::isPlaying
C++ Syntax
FMOD_RESULT ChannelGroup::setFadePointRamp(
unsigned long long dspclock,
float volume
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetFadePointRamp(
FMOD_CHANNELGROUP *channelgroup,
unsigned long long dspclock,
float volume
);
C# Syntax
RESULT ChannelGroup.setFadePointRamp(
ulong dspclock,
float volume
);
JavaScript Syntax
ChannelGroup.setFadePointRamp(
dspclock,
volume
);
Parameters
dspclock
DSP clock of the parent channel group when the volume will be ramped to.
volume
Volume level where 0 is silent and 1.0 is normal volume. Amplification is
supported.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This is a helper function that automatically ramps from the current fade volume
to the newly provided volume at a specified time. It will clear any fade points set
after this time. Use in conjunction with ChannelControl::setDelay stop delay, to
ramp down volume before it stops. The user would specify the same clock value
for the fade ramp and stop delay. This can also be used as a way to provide
sample accurate delayed volume changes without clicks.
See Also
ChannelControl::setDelay
ChannelControl::removeFadePoints
ChannelControl::addFadePoint
ChannelControl::getFadePoints
C++ Syntax
FMOD_RESULT ChannelGroup::setLowPassGain(
float gain
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetLowPassGain(
FMOD_CHANNELGROUP *channelgroup,
float gain
);
C# Syntax
RESULT ChannelGroup.setLowPassGain(
float gain
);
JavaScript Syntax
ChannelGroup.setLowPassGain(
gain
);
Parameters
gain
Linear gain level, from 0 (silent, full filtering) to 1.0 (full volume, no
filtering), default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Requires the built in lowpass to be created with
FMOD_INIT_CHANNEL_LOWPASS or
FMOD_INIT_CHANNEL_DISTANCEFILTER.
See Also
ChannelControl::getLowPassGain
C++ Syntax
FMOD_RESULT ChannelGroup::setMixLevelsInput(
float *levels,
int numlevels
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetMixLevelsInput(
FMOD_CHANNELGROUP *channelgroup,
float *levels,
int numlevels
);
C# Syntax
RESULT ChannelGroup.setMixLevelsInput(
float[] levels,
int numlevels
);
JavaScript Syntax
ChannelGroup.setMixLevelsInput(
levels,
numlevels
);
Parameters
levels
Array of volume levels for each incoming channel.
numlevels
Number of levels in the array, from 0 to 32 inclusive.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
An example use case for this function is if the sound file has multiple channels
in it with different musical parts to it, but they are all in sync with each other.
This function can be used to fade in and out different tracks of the sound or to
solo/mute tracks within it.
NOTE: Levels can be below 0 to invert a signal and above 1 to amplify the
signal. Note that increasing the signal level too far may cause audible distortion.
See Also
ChannelControl::setMixMatrix
ChannelControl::getMixMatrix
ChannelControl::getDSP
DSP::setChannelFormat
FMOD_CHANNELCONTROL_DSP_INDEX
C++ Syntax
FMOD_RESULT ChannelGroup::setMixLevelsOutput(
float frontleft,
float frontright,
float center,
float lfe,
float surroundleft,
float surroundright,
float backleft,
float backright
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetMixLevelsOutput(
FMOD_CHANNELGROUP *channelgroup,
float frontleft,
float frontright,
float center,
float lfe,
float surroundleft,
float surroundright,
float backleft,
float backright
);
C# Syntax
RESULT ChannelGroup.setMixLevelsOutput(
float frontleft,
float frontright,
float center,
float lfe,
float surroundleft,
float surroundright,
float backleft,
float backright
);
JavaScript Syntax
ChannelGroup.setMixLevelsOutput(
frontleft,
frontright,
center,
lfe,
surroundleft,
surroundright,
backleft,
backright
);
Parameters
frontleft
Volume level for the front left speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
frontright
Volume level for the front right speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
center
Volume level for the center speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
lfe
Volume level for the subwoofer speaker of a multichannel speaker setup,
0.0 (silent), 1.0 (normal volume).
surroundleft
Volume level for the surround left speaker of a multichannel speaker setup,
0.0 (silent), 1.0 (normal volume).
surroundright
Volume level for the surround right speaker of a multichannel speaker
setup, 0.0 (silent), 1.0 (normal volume).
backleft
Volume level for the back left speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
backright
Volume level for the back right speaker of a multichannel speaker setup, 0.0
(silent), 1.0 (normal volume).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE: This function overwrites any pan/mixlevel by overwriting the
ChannelControl's Matrix.
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion. Speakers
specified that don't exist will simply be ignored. For more advanced speaker
control, including sending the different channels of a stereo sound to arbitrary
speakers, see ChannelControl::setMixMatrix.
See Also
ChannelControl::setMixMatrix
ChannelControl::getMixMatrix
C++ Syntax
FMOD_RESULT ChannelGroup::setMixMatrix(
float *matrix,
int outchannels,
int inchannels,
int matrixhop
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetMixMatrix(
FMOD_CHANNELGROUP *channelgroup,
float *matrix,
int outchannels,
int inchannels,
int matrixhop
);
C# Syntax
RESULT ChannelGroup.setMixMatrix(
float[] matrix,
int outchannels,
int inchannels,
int inchannel_hop
);
JavaScript Syntax
ChannelGroup.setMixMatrix(
matrix,
outchannels,
inchannels,
inchannel_hop
);
Parameters
matrix
Address of a 2 dimensional array of volume levels in row-major order. Each
row represents an output speaker, each column represents an input channel.
outchannels
Number of output channels (rows) in the matrix being passed in, from 0 to
FMOD_MAX_CHANNEL_WIDTH inclusive.
inchannels
Number of input channels (columns) in the matrix being passed in, from 0
to FMOD_MAX_CHANNEL_WIDTH inclusive.
matrixhop
The width (total number of columns) of the matrix. Optional. If this is 0,
inchannels will be taken as the width of the matrix. Maximum of
FMOD_MAX_CHANNEL_WIDTH.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The gain for input channel 's' to output channel 't' is matrix[t * matrixhop + s].
Levels can be below 0 to invert a signal and above 1 to amplify the signal. Note
that increasing the signal level too far may cause audible distortion.
The matrix size will generally be the size of the number of channels in the
current speaker mode. Use System::getSoftwareFormat to determine this.
If a matrix already exists then the matrix passed in will applied over the top of it.
The input matrix can be smaller than the existing matrix.
A 'unit' matrix allows a signal to pass through unchanged. For example for a 5.1
matrix a unit matrix would look like this:
[ 1 0 0 0 0 0 ]
[ 0 1 0 0 0 0 ]
[ 0 0 1 0 0 0 ]
[ 0 0 0 1 0 0 ]
[ 0 0 0 0 1 0 ]
[ 0 0 0 0 0 1 ]
See Also
ChannelControl::getMixMatrix
ChannelControl::setPan
ChannelControl::setMixLevelsOutput
ChannelControl::setMixLevelsInput
System::getSoftwareFormat
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT ChannelGroup::setMode(
FMOD_MODE mode
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetMode(
FMOD_CHANNELGROUP *channelgroup,
FMOD_MODE mode
);
C# Syntax
RESULT ChannelGroup.setMode(
MODE mode
);
JavaScript Syntax
ChannelGroup.setMode(
mode
);
Parameters
mode
Mode bits to set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Flags supported:
FMOD_LOOP_OFF
FMOD_LOOP_NORMAL
FMOD_LOOP_BIDI
FMOD_2D
FMOD_3D
FMOD_3D_HEADRELATIVE
FMOD_3D_WORLDRELATIVE
FMOD_3D_INVERSEROLLOFF
FMOD_3D_LINEARROLLOFF
FMOD_3D_LINEARSQUAREROLLOFF
FMOD_3D_CUSTOMROLLOFF
FMOD_3D_IGNOREGEOMETRY
FMOD_VIRTUAL_PLAYFROMSTART
When changing the loop mode of sounds created with with System::createSound
or FMOD_CREATESAMPLE, if the sound was set up as FMOD_LOOP_OFF,
then set to FMOD_LOOP_NORMAL with this function, the sound may click
when playing the end of the sound. This is because the sound needs to be pre-
prepared for looping using Sound::setMode, by modifying the content of the
PCM data (i.e. data past the end of the actual sample data) to allow the
interpolators to read ahead without clicking. If you use Channel::setMode it will
not do this (because different channels may have different loop modes for the
same sound) and may click if you try to set it to looping on an unprepared sound.
If you want to change the loop mode at runtime it may be better to load the
sound as looping first (or use Sound::setMode), to let it pre-prepare the data as if
it was looping so that it does not click whenever Channel::setMode is used to
turn looping on.
If FMOD_3D_IGNOREGEOMETRY or
FMOD_VIRTUAL_PLAYFROMSTART is not specified, the flag will be
cleared if it was specified previously.
See Also
Channel::getMode
Channel::setPosition
Sound::setMode
System::createStream
System::createSound
System::setStreamBufferSize
FMOD_CREATESOUNDEXINFO
FMOD_MODE
C++ Syntax
FMOD_RESULT ChannelGroup::setMute(
bool mute
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetMute(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL mute
);
C# Syntax
RESULT ChannelGroup.setMute(
bool mute
);
JavaScript Syntax
ChannelGroup.setMute(
mute
);
Parameters
mute
Mute state, true = mute (silent), false = normal volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Each channel and channel group has its own mute state, muting a channel group
will mute all child channels but will not affect their individual setting. Calling
ChannelControl::getMute will always return the value you set.
See Also
ChannelControl::getMute
C++ Syntax
FMOD_RESULT ChannelGroup::setPan(
float pan
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetPan(
FMOD_CHANNELGROUP *channelgroup,
float pan
);
C# Syntax
RESULT ChannelGroup.setPan(
float pan
);
JavaScript Syntax
ChannelGroup.setPan(
pan
);
Parameters
pan
Pan level, from -1.0 (left) to 1.0 (right), default = 0 (center).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Mono sounds are panned from left to right using constant power panning (non
linear fade). This means when pan = 0.0, the balance for the sound in each
speaker is 71% left and 71% right, not 50% left and 50% right. This gives
(audibly) smoother pans.
Stereo sounds heave each left/right value faded up and down according to the
specified pan position. This means when pan = 0.0, the balance for the sound in
each speaker is 100% left and 100% right. When pan = -1.0, only the left
channel of the stereo sound is audible, when pan = 1.0, only the right channel of
the stereo sound is audible.
C++ Syntax
FMOD_RESULT ChannelGroup::setPaused(
bool paused
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetPaused(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL paused
);
C# Syntax
RESULT ChannelGroup.setPaused(
bool paused
);
JavaScript Syntax
ChannelGroup.setPaused(
paused
);
Parameters
paused
Paused state, true = paused, false = unpaused.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Each channel and channel group has its own paused state, pausing a channel
group will pause all contained channels but will not affect their individual
setting. Calling ChannelControl::getPaused will always return the value you set.
See Also
ChannelControl::getPaused
C++ Syntax
FMOD_RESULT ChannelGroup::setPitch(
float pitch
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetPitch(
FMOD_CHANNELGROUP *channelgroup,
float pitch
);
C# Syntax
RESULT ChannelGroup.setPitch(
float pitch
);
JavaScript Syntax
ChannelGroup.setPitch(
pitch
);
Parameters
pitch
Pitch value, 0.5 = half pitch, 2.0 = double pitch, etc default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function scales existing frequency values by the pitch.
See Also
ChannelControl::getPitch
Channel::setFrequency
Channel::getFrequency
C++ Syntax
FMOD_RESULT ChannelGroup::setReverbProperties(
int instance,
float wet
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetReverbProperties(
FMOD_CHANNELGROUP *channelgroup,
int instance,
float wet
);
C# Syntax
RESULT ChannelGroup.setReverbProperties(
int instance,
float wet
);
JavaScript Syntax
ChannelGroup.setReverbProperties(
instance,
wet
);
Parameters
instance
Index of the particular reverb instance to target, from 0 to
FMOD_REVERB_MAXINSTANCES inclusive.
wet
Send level for the signal to the reverb, from 0 (none) to 1.0 (full), default =
1.0 for Channels, 0.0 for ChannelGroups. See remarks.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A Channel is automatically connected to all existing reverb instances due to the
default wet level of 1.0. A ChannelGroup however will not send to any reverb by
default requiring an explicit call to this function.
A ChannelGroup reverb is optimal for the case where you want to send 1 mixed
signal to the reverb, rather than a lot of individual channel reverb sends. It is
advisable to do this to reduce CPU if you have many Channels inside a
ChannelGroup.
Keep in mind when setting a wet level for a ChannelGroup, any Channels under
that ChannelGroup will still have their existing sends to the reverb. To avoid this
doubling up you should explicitly set the Channel wet levels to 0.0.
See Also
ChannelControl::getReverbProperties
C++ Syntax
FMOD_RESULT ChannelGroup::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetUserData(
FMOD_CHANNELGROUP *channelgroup,
void *userdata
);
C# Syntax
RESULT ChannelGroup.setUserData(
IntPtr userdata
);
JavaScript Syntax
ChannelGroup.setUserData(
userdata
);
Parameters
userdata
Data that the user wishes stored within this object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You can use this to store a pointer to any wrapper or internal class that is
associated with this object. This is especially useful for callbacks where you
need to get back access to your own objects.
See Also
ChannelControl::getUserData
C++ Syntax
FMOD_RESULT ChannelGroup::setVolume(
float volume
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetVolume(
FMOD_CHANNELGROUP *channelgroup,
float volume
);
C# Syntax
RESULT ChannelGroup.setVolume(
float volume
);
JavaScript Syntax
ChannelGroup.setVolume(
volume
);
Parameters
volume
Linear volume level, default = 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Volume level can be below 0 to invert a signal and above 1 to amplify the signal.
Note that increasing the signal level too far may cause audible distortion.
Sound::setDefaults can be used to change the default volume for any channels
played using that sound.
See Also
ChannelControl::getVolume
Sound::setDefaults
C++ Syntax
FMOD_RESULT ChannelGroup::setVolumeRamp(
bool ramp
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetVolumeRamp(
FMOD_CHANNELGROUP *channelgroup,
FMOD_BOOL ramp
);
C# Syntax
RESULT ChannelGroup.setVolumeRamp(
bool ramp
);
JavaScript Syntax
ChannelGroup.setVolumeRamp(
ramp
);
Parameters
ramp
Whether to enable volume ramping.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When changing volumes on a non-paused channel, FMOD normally adds a
small ramp to avoid a pop sound. This function allows that setting to be
overriden and volume changes to be applied immediately.
See Also
ChannelControl::getVolumeRamp
C++ Syntax
FMOD_RESULT ChannelGroup::stop();
C Syntax
FMOD_RESULT FMOD_ChannelGroup_Stop(FMOD_CHANNELGROUP *channelgroup);
C# Syntax
RESULT ChannelGroup.stop();
JavaScript Syntax
ChannelGroup.stop();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::playSound
C++ Syntax
FMOD_RESULT SoundGroup::getMaxAudible(
int *maxaudible
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetMaxAudible(
FMOD_SOUNDGROUP *soundgroup,
int *maxaudible
);
C# Syntax
RESULT SoundGroup.getMaxAudible(
out int maxaudible
);
JavaScript Syntax
SoundGroup.getMaxAudible(
maxaudible // writes value to maxaudible.val
);
Parameters
maxaudible
Address of a variable to receive the number of playbacks to be audible at
once. -1 = unlimited. 0 means no sounds in this group will succeed. Default
= -1.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
SoundGroup::getNumPlaying can be used to determine how many instances of
the sounds in the sound group are playing.
See Also
SoundGroup::setMaxAudible
SoundGroup::getNumPlaying
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::getMaxAudibleBehavior(
FMOD_SOUNDGROUP_BEHAVIOR *behavior
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetMaxAudibleBehavior(
FMOD_SOUNDGROUP *soundgroup,
FMOD_SOUNDGROUP_BEHAVIOR *behavior
);
C# Syntax
RESULT SoundGroup.getMaxAudibleBehavior(
out SOUNDGROUP_BEHAVIOR behavior
);
JavaScript Syntax
SoundGroup.getMaxAudibleBehavior(
behavior // writes value to behavior.val
);
Parameters
behavior
Address of a variable to receive the current sound group max playbacks
behavior. Default is FMOD_SOUNDGROUP_BEHAVIOR_FAIL.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_SOUNDGROUP_BEHAVIOR
SoundGroup::setMaxAudibleBehavior
SoundGroup::setMaxAudible
SoundGroup::getMaxAudible
SoundGroup::setMuteFadeSpeed
SoundGroup::getMuteFadeSpeed
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::getMuteFadeSpeed(
float *speed
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetMuteFadeSpeed(
FMOD_SOUNDGROUP *soundgroup,
float *speed
);
C# Syntax
RESULT SoundGroup.getMuteFadeSpeed(
out float speed
);
JavaScript Syntax
SoundGroup.getMuteFadeSpeed(
speed // writes value to speed.val
);
Parameters
speed
Address of a variable to receive the fade time in seconds (1.0 = 1 second).
Default = 0.0. (no fade).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a mode besides FMOD_SOUNDGROUP_BEHAVIOR_MUTE is used, the
fade speed is ignored.
See Also
SoundGroup::setMuteFadeSpeed
SoundGroup::setMaxAudibleBehavior
SoundGroup::getMaxAudibleBehavior
SoundGroup::setMaxAudible
SoundGroup::getMaxAudible
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::getName(
char *name,
int namelen
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetName(
FMOD_SOUNDGROUP *soundgroup,
char *name,
int namelen
);
C# Syntax
RESULT SoundGroup.getName(
StringBuilder name,
int namelen
);
JavaScript Syntax
SoundGroup.getName(
name // writes value to name.val
);
Parameters
name
Address of a variable that receives the name of the sound group.
namelen
Length in bytes of the target buffer to receieve the string.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
JavaScript only :
Note: For the "name" parameter, the maximum string length is 512.
See Also
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::getNumPlaying(
int *numplaying
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetNumPlaying(
FMOD_SOUNDGROUP *soundgroup,
int *numplaying
);
C# Syntax
RESULT SoundGroup.getNumPlaying(
out int numplaying
);
JavaScript Syntax
SoundGroup.getNumPlaying(
numplaying // writes value to numplaying.val
);
Parameters
numplaying
Address of a variable to receive the number of actively playing channels
from sounds in this sound group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This routine returns the number of channels playing. If the sound group only has
1 sound, and that sound is playing twice, the figure returned will be 2.
See Also
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::getNumSounds(
int *numsounds
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetNumSounds(
FMOD_SOUNDGROUP *soundgroup,
int *numsounds
);
C# Syntax
RESULT SoundGroup.getNumSounds(
out int numsounds
);
JavaScript Syntax
SoundGroup.getNumSounds(
numsounds // writes value to numsounds.val
);
Parameters
numsounds
Address of a variable to receive the number of sounds in this sound group.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createSoundGroup
System::getMasterSoundGroup
SoundGroup::setMaxAudible
SoundGroup::getSound
C++ Syntax
FMOD_RESULT SoundGroup::getSound(
int index,
FMOD::Sound **sound
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetSound(
FMOD_SOUNDGROUP *soundgroup,
int index,
FMOD_SOUND **sound
);
C# Syntax
RESULT SoundGroup.getSound(
int index,
out Sound sound
);
JavaScript Syntax
SoundGroup.getSound(
index,
sound // writes value to sound.val
);
Parameters
index
Index of the sound that is to be retrieved.
sound
Address of a variable to receieve a pointer to a Sound object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use SoundGroup::getNumSounds in conjunction with this function to enumerate
all sounds in a sound group.
See Also
System::createSoundGroup
System::createSound
SoundGroup::getNumSounds
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::getSystemObject(
FMOD::System **system
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetSystemObject(
FMOD_SOUNDGROUP *soundgroup,
FMOD_SYSTEM **system
);
C# Syntax
RESULT SoundGroup.getSystemObject(
out System system
);
JavaScript Syntax
SoundGroup.getSystemObject(
system // writes value to system.val
);
Parameters
system
Address of a pointer that receives the System object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetUserData(
FMOD_SOUNDGROUP *soundgroup,
void **userdata
);
C# Syntax
RESULT SoundGroup.getUserData(
out IntPtr userdata
);
JavaScript Syntax
SoundGroup.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of a pointer that receives the data specified with the
SoundGroup::setUserData function.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
SoundGroup::setUserData
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::getVolume(
float *volume
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_GetVolume(
FMOD_SOUNDGROUP *soundgroup,
float *volume
);
C# Syntax
RESULT SoundGroup.getVolume(
out float volume
);
JavaScript Syntax
SoundGroup.getVolume(
volume // writes value to volume.val
);
Parameters
volume
Address of a variable to receive the soundgroup volume level, 0.0 = silent,
1.0 = full volume. Default = 1.0. Negative volumes and amplification (>
1.0) are supported.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
SoundGroup::setVolume
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::release();
C Syntax
FMOD_RESULT FMOD_SoundGroup_Release(FMOD_SOUNDGROUP *soundgroup);
C# Syntax
RESULT SoundGroup.release();
JavaScript Syntax
SoundGroup.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You cannot release the master sound group.
See Also
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::setMaxAudible(
int maxaudible
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_SetMaxAudible(
FMOD_SOUNDGROUP *soundgroup,
int maxaudible
);
C# Syntax
RESULT SoundGroup.setMaxAudible(
int maxaudible
);
JavaScript Syntax
SoundGroup.setMaxAudible(
maxaudible
);
Parameters
maxaudible
Number of playbacks to be audible at once. -1 = unlimited. 0 means no
sounds in this group will succeed. Default = -1.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
SoundGroup::getNumPlaying can be used to determine how many instances of
the sounds in the sound group are currently playing.
See Also
System::createSoundGroup
SoundGroup::getMaxAudible
SoundGroup::getNumPlaying
SoundGroup::setMaxAudibleBehavior
SoundGroup::getMaxAudibleBehavior
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::setMaxAudibleBehavior(
FMOD_SOUNDGROUP_BEHAVIOR behavior
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_SetMaxAudibleBehavior(
FMOD_SOUNDGROUP *soundgroup,
FMOD_SOUNDGROUP_BEHAVIOR behavior
);
C# Syntax
RESULT SoundGroup.setMaxAudibleBehavior(
SOUNDGROUP_BEHAVIOR behavior
);
JavaScript Syntax
SoundGroup.setMaxAudibleBehavior(
behavior
);
Parameters
behavior
Specify a behavior determined with a
FMOD_SOUNDGROUP_BEHAVIOR flag. Default is
FMOD_SOUNDGROUP_BEHAVIOR_FAIL.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_SOUNDGROUP_BEHAVIOR
SoundGroup::getMaxAudibleBehavior
SoundGroup::setMaxAudible
SoundGroup::getMaxAudible
SoundGroup::setMuteFadeSpeed
SoundGroup::getMuteFadeSpeed
System::createSoundGroup
System::getMasterSoundGroup
When more sounds are playing in a SoundGroup than are specified with
SoundGroup::setMaxAudible, the least important sound (ie lowest priority /
lowest audible volume due to 3D position, volume etc) will fade to silence if
FMOD_SOUNDGROUP_BEHAVIOR_MUTE is used, and any previous sounds
that were silent because of this rule will fade in if they are more important.
C++ Syntax
FMOD_RESULT SoundGroup::setMuteFadeSpeed(
float speed
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_SetMuteFadeSpeed(
FMOD_SOUNDGROUP *soundgroup,
float speed
);
C# Syntax
RESULT SoundGroup.setMuteFadeSpeed(
float speed
);
JavaScript Syntax
SoundGroup.setMuteFadeSpeed(
speed
);
Parameters
speed
Fade time in seconds (1.0 = 1 second). Default = 0.0. (no fade).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a mode besides FMOD_SOUNDGROUP_BEHAVIOR_MUTE is used, the
fade speed is ignored.
See Also
SoundGroup::getMuteFadeSpeed
SoundGroup::setMaxAudibleBehavior
SoundGroup::getMaxAudibleBehavior
SoundGroup::setMaxAudible
SoundGroup::getMaxAudible
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_SetUserData(
FMOD_SOUNDGROUP *soundgroup,
void *userdata
);
C# Syntax
RESULT SoundGroup.setUserData(
IntPtr userdata
);
JavaScript Syntax
SoundGroup.setUserData(
userdata
);
Parameters
userdata
Address of user data that the user wishes stored within the sound group
object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
It can be useful if an FMOD callback passes an object of this type as a
parameter, and the user does not know which object it is (if many of these types
of objects exist). Using SoundGroup::getUserData would help in the
identification of the object.
See Also
SoundGroup::getUserData
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::setVolume(
float volume
);
C Syntax
FMOD_RESULT FMOD_SoundGroup_SetVolume(
FMOD_SOUNDGROUP *soundgroup,
float volume
);
C# Syntax
RESULT SoundGroup.setVolume(
float volume
);
JavaScript Syntax
SoundGroup.setVolume(
volume
);
Parameters
volume
A linear volume level. 0.0 = silent, 1.0 = full volume. Default = 1.0.
Negative volumes and amplification (> 1.0) are supported.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
SoundGroup::getVolume
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT SoundGroup::stop();
C Syntax
FMOD_RESULT FMOD_SoundGroup_Stop(FMOD_SOUNDGROUP *soundgroup);
C# Syntax
RESULT SoundGroup.stop();
JavaScript Syntax
SoundGroup.stop();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::playSound
System::createSoundGroup
System::getMasterSoundGroup
C++ Syntax
FMOD_RESULT DSP::addInput(
FMOD::DSP *input,
FMOD::DSPConnection **connection,
FMOD_DSPCONNECTION_TYPE type
);
C Syntax
FMOD_RESULT FMOD_DSP_AddInput(
FMOD_DSP *dsp,
FMOD_DSP *input,
FMOD_DSPCONNECTION **connection,
FMOD_DSPCONNECTION_TYPE type
);
C# Syntax
RESULT DSP.addInput(
DSP target,
out DSPConnection connection,
DSPCONNECTION_TYPE type
);
JavaScript Syntax
DSP.addInput(
input,
connection, // writes value to connection.val
type
);
Parameters
input
The DSP unit to add as an input of the current unit.
connection
The connection between the 2 units. Optional. Specify 0 or NULL to
ignore.
type
The type of connection between the 2 units. See
FMOD_DSPCONNECTION_TYPE.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If you want to add a unit as an output of another unit, then add 'this' unit as an
input of that unit instead.
Inputs are automatically mixed together, then the mixed data is sent to the unit's
output(s).
To find the number of inputs or outputs a unit has use DSP::getNumInputs or
DSP::getNumOutputs.
Note: The connection pointer retrieved here will become invalid if you
disconnect the 2 dsp units that use it.
See Also
DSP::getNumInputs
DSP::getInput
DSP::getNumOutputs
DSP::disconnectFrom
FMOD_DSPCONNECTION_TYPE
C++ Syntax
FMOD_RESULT DSP::disconnectAll(
bool inputs,
bool outputs
);
C Syntax
FMOD_RESULT FMOD_DSP_DisconnectAll(
FMOD_DSP *dsp,
FMOD_BOOL inputs,
FMOD_BOOL outputs
);
C# Syntax
RESULT DSP.disconnectAll(
bool inputs,
bool outputs
);
JavaScript Syntax
DSP.disconnectAll(
inputs,
outputs
);
Parameters
inputs
true = disconnect all inputs to this DSP unit. false = leave input connections
alone.
outputs
true = disconnect all outputs to this DSP unit. false = leave output
connections alone.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is optimized to be faster than disconnecting inputs and outputs
manually one by one.
Important note: If you have a handle to DSPConnection pointers that bind any
of the inputs or outputs to this DSP unit, then they will become invalid. The
connections are sent back to a freelist to be re-used again by a later addInput
command.
See Also
DSP::disconnectFrom
C++ Syntax
FMOD_RESULT DSP::disconnectFrom(
FMOD::DSP *target,
FMOD::DSPConnection *connection
);
C Syntax
FMOD_RESULT FMOD_DSP_DisconnectFrom(
FMOD_DSP *dsp,
FMOD_DSP *target,
FMOD_DSPCONNECTION *connection
);
C# Syntax
RESULT DSP.disconnectFrom(
DSP target,
DSPConnection connection
);
JavaScript Syntax
DSP.disconnectFrom(
target,
connection
);
Parameters
target
The input unit that this unit is to be disconnected from. Specify 0 or NULL
to disconnect the unit from all outputs and inputs.
connection
If there is more than one connection between 2 dsp units, this can be used to
define which of the connections should be disconnected.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note that when you disconnect a unit, it is up to you to reconnect the network so
that data flow can continue.
Important note: If you have a handle to the connection pointer that binds these
2 DSP units, then it will become invalid. The connection is then sent back to a
freelist to be re-used again by a later addInput command.
See Also
DSP::addInput
DSP::disconnectAll
C++ Syntax
FMOD_RESULT DSP::getActive(
bool *active
);
C Syntax
FMOD_RESULT FMOD_DSP_GetActive(
FMOD_DSP *dsp,
FMOD_BOOL *active
);
C# Syntax
RESULT DSP.getActive(
out bool active
);
JavaScript Syntax
DSP.getActive(
active // writes value to active.val
);
Parameters
active
Address of a variable that receives the active state of the unit. true = unit is
activated, false = unit is deactivated.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
DSP::setActive
DSP::setBypass
C++ Syntax
FMOD_RESULT DSP::getBypass(
bool *bypass
);
C Syntax
FMOD_RESULT FMOD_DSP_GetBypass(
FMOD_DSP *dsp,
FMOD_BOOL *bypass
);
C# Syntax
RESULT DSP.getBypass(
out bool bypass
);
JavaScript Syntax
DSP.getBypass(
bypass // writes value to bypass.val
);
Parameters
bypass
Address of a variable that receieves the bypass state for a DSP unit. true =
unit is not processing audio data, false = unit is processing audio data.
Default = false.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a unit is bypassed, it will still process its inputs, unlike DSP::setActive (when
set to false) which causes inputs to stop processing as well.
See Also
DSP::setBypass
DSP::setActive
C++ Syntax
FMOD_RESULT DSP::getChannelFormat(
FMOD_CHANNELMASK *channelmask,
int *numchannels,
FMOD_SPEAKERMODE *source_speakermode
);
C Syntax
FMOD_RESULT FMOD_DSP_GetChannelFormat(
FMOD_DSP *dsp,
FMOD_CHANNELMASK *channelmask,
int *numchannels,
FMOD_SPEAKERMODE *source_speakermode
);
C# Syntax
RESULT DSP.getChannelFormat(
out CHANNELMASK channelmask,
out int numchannels,
out SPEAKERMODE source_speakermode
);
JavaScript Syntax
DSP.getChannelFormat(
channelmask, // writes value to channelmask.val
numchannels, // writes value to numchannels.val
source_speakermode // writes value to source_speakermode.val
);
Parameters
channelmask
Address of a variable that receives the FMOD_CHANNELMASK which
determines which speakers are represented by the channels in the input
signal.
numchannels
Address of a variable that receives the number of channels to be processed
on this unit.
source_speakermode
Address of a variable that receives the source speaker mode where the
signal came from.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
source_speakermode is informational, when channelmask describes what bits are
active, and numchannels describes how many channels are in a buffer,
source_speakermode describes where the channels originated from. For example
if numchannels = 2 then this could describe for the DSP if the original signal
started from a stereo signal or a 5.1 signal. In the 5.1 signal the channels
described might only represent 2 surround speakers for example.
See Also
FMOD_CHANNELMASK
DSP::setChannelFormat
C++ Syntax
FMOD_RESULT DSP::getDataParameterIndex(
int datatype,
int *index
);
C Syntax
FMOD_RESULT FMOD_DSP_GetDataParameterIndex(
FMOD_DSP *dsp,
int datatype,
int *index
);
C# Syntax
RESULT DSP.getDataParameterIndex(
int datatype,
out int index
);
JavaScript Syntax
DSP.getDataParameterIndex(
datatype,
index // writes value to index.val
);
Parameters
datatype
The type of data to find. This would usually be set to a value defined in
FMOD_DSP_PARAMETER_DATA_TYPE but can be any value for
custom types.
index
Contains the index of the first data parameter of type 'datatype' after the
function is called. Will be -1 if no matches were found. Can be null.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function returns FMOD_OK if a parmeter of matching type is found and
FMOD_ERR_INVALID_PARAM if no matches were found.
The return code can therefore be used to check whether the DSP supports
specific functionality through data parameters of certain types without the need
to pass in 'index'.
See Also
FMOD_DSP_PARAMETER_DATA_TYPE
C++ Syntax
FMOD_RESULT DSP::getIdle(
bool *idle
);
C Syntax
FMOD_RESULT FMOD_DSP_GetIdle(
FMOD_DSP *dsp,
FMOD_BOOL *idle
);
C# Syntax
RESULT DSP.getIdle(
out bool idle
);
JavaScript Syntax
DSP.getIdle(
idle // writes value to idle.val
);
Parameters
idle
Address of a variable to receive the idle state for the DSP.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The idle state takes into account things like tails of echo filters, even if a
wavetable or dsp has finished generating sound. When all nodes in a graph have
finished processing, only then will it set the top level DSP state to idle.
C++ Syntax
FMOD_RESULT DSP::getInfo(
char *name,
unsigned int *version,
int *channels,
int *configwidth,
int *configheight
);
C Syntax
FMOD_RESULT FMOD_DSP_GetInfo(
FMOD_DSP *dsp,
char *name,
unsigned int *version,
int *channels,
int *configwidth,
int *configheight
);
C# Syntax
RESULT DSP.getInfo(
StringBuilder name,
out uint version,
out int channels,
out int configwidth,
out int configheight
);
JavaScript Syntax
DSP.getInfo(
name, // writes value to name.val
version, // writes value to version.val
channels, // writes value to channels.val
configwidth, // writes value to configwidth.val
configheight // writes value to configheight.val
);
Parameters
name
Address of a variable that receives the name of the unit. This will be a
maximum of 32bytes. If the DSP unit has filled all 32 bytes with the name
with no terminating \0 null character it is up to the caller to append a null
character. Optional. Specify 0 or NULL to ignore.
version
Address of a variable that receives the version number of the DSP unit.
Version number is usually formated as hex AAAABBBB where the AAAA
is the major version number and the BBBB is the minor version number.
Optional. Specify 0 or NULL to ignore.
channels
Address of a variable that receives the number of channels the unit was
initialized with. 0 means the plugin will process whatever number of
channels is currently in the network. >0 would be mostly used if the unit is
a unit that only generates sound, or is not flexible enough to take any
number of input channels. Optional. Specify 0 or NULL to ignore.
configwidth
Address of a variable that receives the width of an optional configuration
dialog box that can be displayed with DSP::showConfigDialog. 0 means the
dialog is not present. Optional. Specify 0 or NULL to ignore.
configheight
Address of a variable that receives the height of an optional configuration
dialog box that can be displayed with DSP::showConfigDialog. 0 means the
dialog is not present. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
JavaScript only :
Note: For the "name" parameter, the maximum string length is 512.
See Also
DSP::showConfigDialog
C++ Syntax
FMOD_RESULT DSP::getInput(
int index,
FMOD::DSP **input,
FMOD::DSPConnection **inputconnection
);
C Syntax
FMOD_RESULT FMOD_DSP_GetInput(
FMOD_DSP *dsp,
int index,
FMOD_DSP **input,
FMOD_DSPCONNECTION **inputconnection
);
C# Syntax
RESULT DSP.getInput(
int index,
out DSP input,
out DSPConnection inputconnection
);
JavaScript Syntax
DSP.getInput(
index,
input, // writes value to input.val
inputconnection // writes value to inputconnection.val
);
Parameters
index
Index of the input unit to retrieve.
input
Address of a variable that receieves the pointer to the desired input unit.
inputconnection
The connection between the 2 units. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
An input is a unit which feeds audio data to this unit.
If there are more than 1 input to this unit, the inputs will be mixed, and the
current unit processes the mixed result.
Find out the number of input units to this unit by calling DSP::getNumInputs.
Performance warning! Because this function needs to flush the dsp queue
before it can determine if the specified numerical input is available or not, this
function may block significantly while the background mixer thread operates.
Note: The connection pointer retrieved here will become invalid if you
disconnect the 2 dsp units that use it.
See Also
DSP::getNumInputs
DSP::addInput
DSP::getOutput
DSPConnection::getMix
DSPConnection::setMix
C++ Syntax
FMOD_RESULT DSP::getMeteringEnabled(
bool *inputEnabled,
bool *outputEnabled
);
C Syntax
FMOD_RESULT FMOD_DSP_GetMeteringEnabled(
FMOD_DSP *dsp,
FMOD_BOOL *inputEnabled,
FMOD_BOOL *outputEnabled
);
C# Syntax
RESULT DSP.getMeteringEnabled(
out bool inputEnabled,
out bool outputEnabled
);
JavaScript Syntax
DSP.getMeteringEnabled(
inputEnabled, // writes value to inputEnabled.val
outputEnabled // writes value to outputEnabled.val
);
Parameters
inputEnabled
Address of a variable to receive the metering enabled state for the DSP, for
the intput signal (pre-processing). true = on, false = off. Optional. Specify 0
or NULL to ignore.
outputEnabled
Address of a variable to receive the metering enabled state for the DSP, for
the output signal (post-processing). true = on, false = off. Optional. Specify
0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
FMOD_INIT_PROFILE_METER_ALL with System::init will automatically
turn on metering for all DSP units inside the FMOD mixer graph.
See Also
DSP::setMeteringEnabled
DSP::getMeteringInfo
System::init
C++ Syntax
FMOD_RESULT DSP::getMeteringInfo(
FMOD_DSP_METERING_INFO *inputInfo,
FMOD_DSP_METERING_INFO *outputInfo
);
C Syntax
FMOD_RESULT FMOD_DSP_GetMeteringInfo(
FMOD_DSP *dsp,
FMOD_DSP_METERING_INFO *inputInfo,
FMOD_DSP_METERING_INFO *outputInfo
);
C# Syntax
RESULT DSP.getMeteringInfo(
DSP_METERING_INFO inputInfo,
DSP_METERING_INFO outputInfo
);
JavaScript Syntax
DSP.getMeteringInfo(
inputInfo, // writes value to inputInfo.val
outputInfo // writes value to outputInfo.val
);
Parameters
inputInfo
Address of a variable to receive metering information for the DSP, for the
intput signal (pre-processing). true = on, false = off. Optional. Specify 0 or
NULL to ignore.
outputInfo
Address of a variable to receive metering information for the DSP, for the
output signal (post-processing). true = on, false = off. Optional. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
FMOD_INIT_PROFILE_METER_ALL with System::init will automatically
turn on metering for all DSP units inside the FMOD mixer graph.
See Also
FMOD_DSP_METERING_INFO
DSP::setMeteringEnabled
DSP::getMeteringEnabled
System::init
C++ Syntax
FMOD_RESULT DSP::getNumInputs(
int *numinputs
);
C Syntax
FMOD_RESULT FMOD_DSP_GetNumInputs(
FMOD_DSP *dsp,
int *numinputs
);
C# Syntax
RESULT DSP.getNumInputs(
out int numinputs
);
JavaScript Syntax
DSP.getNumInputs(
numinputs // writes value to numinputs.val
);
Parameters
numinputs
Address of a variable that receives the number of inputs connected to this
unit.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Inputs are units that feed data to this unit. When there are multiple inputs, they
are mixed together.
Performance warning! Because this function needs to flush the dsp queue
before it can determine how many units are available, this function may block
significantly while the background mixer thread operates.
See Also
DSP::getNumOutputs
DSP::getInput
C++ Syntax
FMOD_RESULT DSP::getNumOutputs(
int *numoutputs
);
C Syntax
FMOD_RESULT FMOD_DSP_GetNumOutputs(
FMOD_DSP *dsp,
int *numoutputs
);
C# Syntax
RESULT DSP.getNumOutputs(
out int numoutputs
);
JavaScript Syntax
DSP.getNumOutputs(
numoutputs // writes value to numoutputs.val
);
Parameters
numoutputs
Address of a variable that receives the number of outputs connected to this
unit.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Outputs are units that this unit feeds data to. When there are multiple outputs, the
data is split and sent to each unit individually.
Performance warning! Because this function needs to flush the dsp queue
before it can determine how many units are available, this function may block
significantly while the background mixer thread operates.
See Also
DSP::getNumInputs
DSP::getOutput
C++ Syntax
FMOD_RESULT DSP::getNumParameters(
int *numparams
);
C Syntax
FMOD_RESULT FMOD_DSP_GetNumParameters(
FMOD_DSP *dsp,
int *numparams
);
C# Syntax
RESULT DSP.getNumParameters(
out int numparams
);
JavaScript Syntax
DSP.getNumParameters(
numparams // writes value to numparams.val
);
Parameters
numparams
Address of a variable that receives the number of parameters contained
within this DSP unit.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use this to enumerate all parameters of a DSP unit with DSP::getParameterInfo.
See Also
DSP::getParameterInfo
DSP::setParameterFloat
DSP::setParameterInt
DSP::setParameterBool
DSP::setParameterData
DSP::getParameterFloat
DSP::getParameterInt
DSP::getParameterBool
DSP::getParameterData
C++ Syntax
FMOD_RESULT DSP::getOutput(
int index,
FMOD::DSP **output,
FMOD::DSPConnection **outputconnection
);
C Syntax
FMOD_RESULT FMOD_DSP_GetOutput(
FMOD_DSP *dsp,
int index,
FMOD_DSP **output,
FMOD_DSPCONNECTION **outputconnection
);
C# Syntax
RESULT DSP.getOutput(
int index,
out DSP output,
out DSPConnection outputconnection
);
JavaScript Syntax
DSP.getOutput(
index,
output, // writes value to output.val
outputconnection // writes value to outputconnection.val
);
Parameters
index
Index of the output unit to retrieve.
output
Address of a variable that receieves the pointer to the desired output unit.
outputconnection
The connection between the 2 units. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
An output is a unit which this unit will feed data too once it has processed its
data.
Find out the number of output units to this unit by calling DSP::getNumOutputs.
Performance warning! Because this function needs to flush the dsp queue
before it can determine if the specified numerical output is available or not, this
function may block significantly while the background mixer thread operates.
Note: The connection pointer retrieved here will become invalid if you
disconnect the 2 dsp units that use it.
See Also
DSP::getNumOutputs
DSP::addInput
DSP::getInput
DSPConnection::getMix
DSPConnection::setMix
C++ Syntax
FMOD_RESULT DSP::getOutputChannelFormat(
FMOD_CHANNELMASK inmask,
int inchannels,
FMOD_SPEAKERMODE inspeakermode,
FMOD_CHANNELMASK *outmask,
int *outchannels,
FMOD_SPEAKERMODE *outspeakermode
);
C Syntax
FMOD_RESULT FMOD_DSP_GetOutputChannelFormat(
FMOD_DSP *dsp,
FMOD_CHANNELMASK inmask,
int inchannels,
FMOD_SPEAKERMODE inspeakermode,
FMOD_CHANNELMASK *outmask,
int *outchannels,
FMOD_SPEAKERMODE *outspeakermode
);
C# Syntax
RESULT DSP.getOutputChannelFormat(
CHANNELMASK inmask,
int inchannels,
SPEAKERMODE inspeakermode,
out CHANNELMASK outmask,
out int outchannels,
out SPEAKERMODE outspeakermode
);
JavaScript Syntax
DSP.getOutputChannelFormat(
inmask,
inchannels,
inspeakermode,
outmask, // writes value to outmask.val
outchannels, // writes value to outchannels.val
outspeakermode // writes value to outspeakermode.val
);
Parameters
inmask
Channel bitmask representing the speakers enabled for the incoming signal.
For example a 5.1 signal could have inchannels 2 that represent
FMOD_CHANNELMASK_SURROUND_LEFT and
FMOD_CHANNELMASK_SURROUND_RIGHT.
inchannels
Number of channels for the incoming signal.
inspeakermode
Speaker mode for the incoming signal.
outmask
Address of a variable to receive the DSP unit's output mask, based on the
DSP units preference and settings.
outchannels
Address of a variable to receive the DSP unit's output channel count, based
on the DSP units preference and settings.
outspeakermode
Address of a variable to receive the DSP unit's output speaker mode, based
on the DSP units preference and settings.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A DSP unit may be an up mixer or down mixer for example. In this case if you
specified 6 in for a downmixer, it may provide you with 2 out for example.
Generally the input values will be reproduced for the output values, but some
DSP units will want to alter the output format.
See Also
DSP::getChannelFormat
C++ Syntax
FMOD_RESULT DSP::getParameterBool(
int index,
bool *value,
char *valuestr,
int valuestrlen
);
C Syntax
FMOD_RESULT FMOD_DSP_GetParameterBool(
FMOD_DSP *dsp,
int index,
FMOD_BOOL *value,
char *valuestr,
int valuestrlen
);
C# Syntax
RESULT DSP.getParameterBool(
int index,
out bool value
);
JavaScript Syntax
DSP.getParameterBool(
index,
value, // writes value to value.val
valuestr // writes value to valuestr.val
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
value
Address of a variable that receives the boolean parameter value for the
parameter specified.
valuestr
Address of a variable that receives the string containing a formatted or more
meaningful representation of the DSP parameter's value. For example if a
switch parameter has on and off (0.0 or 1.0) it will display "ON" or "OFF"
by using this parameter. Optional. Specify 0 or NULL to ignore.
valuestrlen
Length of the user supplied memory in bytes that valuestr will write to. This
will not exceed 16 bytes.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The parameter properties can be retrieved with DSP::getParameterInfo.
JavaScript only :
Note: For the "valuestr" parameter, the maximum string length is 512.
See Also
DSP::getParameterInfo
DSP::getNumParameters
DSP::setParameterBool
FMOD_DSP_OSCILLATOR
FMOD_DSP_LOWPASS
FMOD_DSP_ITLOWPASS
FMOD_DSP_HIGHPASS
FMOD_DSP_ECHO
FMOD_DSP_FLANGE
FMOD_DSP_DISTORTION
FMOD_DSP_NORMALIZE
FMOD_DSP_LIMITER
FMOD_DSP_PARAMEQ
FMOD_DSP_PITCHSHIFT
FMOD_DSP_CHORUS
FMOD_DSP_ITECHO
FMOD_DSP_COMPRESSOR
FMOD_DSP_SFXREVERB
FMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_DELAY
FMOD_DSP_TREMOLO
FMOD_DSP_SEND
FMOD_DSP_RETURN
FMOD_DSP_HIGHPASS_SIMPLE
FMOD_DSP_PAN
FMOD_DSP_THREE_EQ
FMOD_DSP_FFT
C++ Syntax
FMOD_RESULT DSP::getParameterData(
int index,
void **data,
unsigned int *length,
char *valuestr,
int valuestrlen
);
C Syntax
FMOD_RESULT FMOD_DSP_GetParameterData(
FMOD_DSP *dsp,
int index,
void **data,
unsigned int *length,
char *valuestr,
int valuestrlen
);
C# Syntax
RESULT DSP.getParameterData(
int index,
out IntPtr data,
out uint length
);
JavaScript Syntax
DSP.getParameterData(
index,
data, // writes value to data.val
length, // writes value to length.val
valuestr // writes value to valuestr.val
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
data
Address of a variable that receives binary data for the parameter specified.
length
Address of a variable that receives the length of data block in bytes.
Optional.
valuestr
Address of a variable that receives the string containing a formatted or more
meaningful representation of the DSP parameter's value. For example if a
switch parameter has on and off (0.0 or 1.0) it will display "ON" or "OFF"
by using this parameter. Optional. Specify 0 or NULL to ignore.
valuestrlen
Length of the user supplied memory in bytes that valuestr will write to. This
will not exceed 16 bytes.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The parameter properties can be retrieved with DSP::getParameterInfo.
JavaScript only :
Note: For the "valuestr" parameter, the maximum string length is 512.
See Also
DSP::getParameterInfo
DSP::getNumParameters
DSP::setParameterData
FMOD_DSP_PARAMETER_DATA_TYPE
FMOD_DSP_OSCILLATOR
FMOD_DSP_LOWPASS
FMOD_DSP_ITLOWPASS
FMOD_DSP_HIGHPASS
FMOD_DSP_ECHO
FMOD_DSP_FLANGE
FMOD_DSP_DISTORTION
FMOD_DSP_NORMALIZE
FMOD_DSP_LIMITER
FMOD_DSP_PARAMEQ
FMOD_DSP_PITCHSHIFT
FMOD_DSP_CHORUS
FMOD_DSP_ITECHO
FMOD_DSP_COMPRESSOR
FMOD_DSP_SFXREVERB
FMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_DELAY
FMOD_DSP_TREMOLO
FMOD_DSP_SEND
FMOD_DSP_RETURN
FMOD_DSP_HIGHPASS_SIMPLE
FMOD_DSP_PAN
FMOD_DSP_THREE_EQ
FMOD_DSP_FFT
C++ Syntax
FMOD_RESULT DSP::getParameterFloat(
int index,
float *value,
char *valuestr,
int valuestrlen
);
C Syntax
FMOD_RESULT FMOD_DSP_GetParameterFloat(
FMOD_DSP *dsp,
int index,
float *value,
char *valuestr,
int valuestrlen
);
C# Syntax
RESULT DSP.getParameterFloat(
int index,
out float value
);
JavaScript Syntax
DSP.getParameterFloat(
index,
value, // writes value to value.val
valuestr // writes value to valuestr.val
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
value
Address of a variable that receives the floating point parameter value for the
parameter specified.
valuestr
Address of a variable that receives the string containing a formatted or more
meaningful representation of the DSP parameter's value. For example if a
switch parameter has on and off (0.0 or 1.0) it will display "ON" or "OFF"
by using this parameter. Optional. Specify 0 or NULL to ignore.
valuestrlen
Length of the user supplied memory in bytes that valuestr will write to. This
will not exceed 16 bytes.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The parameter properties can be retrieved with DSP::getParameterInfo.
JavaScript only :
Note: For the "valuestr" parameter, the maximum string length is 512.
See Also
DSP::getParameterInfo
DSP::getNumParameters
DSP::setParameterFloat
FMOD_DSP_OSCILLATOR
FMOD_DSP_LOWPASS
FMOD_DSP_ITLOWPASS
FMOD_DSP_HIGHPASS
FMOD_DSP_ECHO
FMOD_DSP_FLANGE
FMOD_DSP_DISTORTION
FMOD_DSP_NORMALIZE
FMOD_DSP_LIMITER
FMOD_DSP_PARAMEQ
FMOD_DSP_PITCHSHIFT
FMOD_DSP_CHORUS
FMOD_DSP_ITECHO
FMOD_DSP_COMPRESSOR
FMOD_DSP_SFXREVERB
FMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_DELAY
FMOD_DSP_TREMOLO
FMOD_DSP_SEND
FMOD_DSP_RETURN
FMOD_DSP_HIGHPASS_SIMPLE
FMOD_DSP_PAN
FMOD_DSP_THREE_EQ
FMOD_DSP_FFT
C++ Syntax
FMOD_RESULT DSP::getParameterInfo(
int index,
FMOD_DSP_PARAMETER_DESC **desc
);
C Syntax
FMOD_RESULT FMOD_DSP_GetParameterInfo(
FMOD_DSP *dsp,
int index,
FMOD_DSP_PARAMETER_DESC **desc
);
C# Syntax
RESULT DSP.getParameterInfo(
int index,
out DSP_PARAMETER_DESC desc
);
JavaScript Syntax
DSP.getParameterInfo(
index,
desc // writes value to desc.val
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
desc
Address of a variable to receive the contents of an array of
FMOD_DSP_PARAMETER_DESC structures for this DSP unit.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use DSP::getNumParameters to find out the number of parameters for this DSP
unit.
See Also
DSP::setParameterFloat
DSP::setParameterInt
DSP::setParameterBool
DSP::setParameterData
DSP::getParameterFloat
DSP::getParameterInt
DSP::getParameterBool
DSP::getParameterData
DSP::getNumParameters
C++ Syntax
FMOD_RESULT DSP::getParameterInt(
int index,
int *value,
char *valuestr,
int valuestrlen
);
C Syntax
FMOD_RESULT FMOD_DSP_GetParameterInt(
FMOD_DSP *dsp,
int index,
int *value,
char *valuestr,
int valuestrlen
);
C# Syntax
RESULT DSP.getParameterInt(
int index,
out int value
);
JavaScript Syntax
DSP.getParameterInt(
index,
value, // writes value to value.val
valuestr // writes value to valuestr.val
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
value
Address of a variable that receives the integer parameter value for the
parameter specified.
valuestr
Address of a variable that receives the string containing a formatted or more
meaningful representation of the DSP parameter's value. For example if a
switch parameter has on and off (0.0 or 1.0) it will display "ON" or "OFF"
by using this parameter. Optional. Specify 0 or NULL to ignore.
valuestrlen
Length of the user supplied memory in bytes that valuestr will write to. This
will not exceed 16 bytes.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The parameter properties can be retrieved with DSP::getParameterInfo.
JavaScript only :
Note: For the "valuestr" parameter, the maximum string length is 512.
See Also
DSP::getParameterInfo
DSP::getNumParameters
DSP::setParameterInt
FMOD_DSP_OSCILLATOR
FMOD_DSP_LOWPASS
FMOD_DSP_ITLOWPASS
FMOD_DSP_HIGHPASS
FMOD_DSP_ECHO
FMOD_DSP_FLANGE
FMOD_DSP_DISTORTION
FMOD_DSP_NORMALIZE
FMOD_DSP_LIMITER
FMOD_DSP_PARAMEQ
FMOD_DSP_PITCHSHIFT
FMOD_DSP_CHORUS
FMOD_DSP_ITECHO
FMOD_DSP_COMPRESSOR
FMOD_DSP_SFXREVERB
FMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_DELAY
FMOD_DSP_TREMOLO
FMOD_DSP_SEND
FMOD_DSP_RETURN
FMOD_DSP_HIGHPASS_SIMPLE
FMOD_DSP_PAN
FMOD_DSP_THREE_EQ
FMOD_DSP_FFT
C++ Syntax
FMOD_RESULT DSP::getSystemObject(
FMOD::System **system
);
C Syntax
FMOD_RESULT FMOD_DSP_GetSystemObject(
FMOD_DSP *dsp,
FMOD_SYSTEM **system
);
C# Syntax
RESULT DSP.getSystemObject(
out System system
);
JavaScript Syntax
DSP.getSystemObject(
system // writes value to system.val
);
Parameters
system
Address of a variable that receives the System object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createDSP
System::createDSPByType
Channel::getDSP
ChannelGroup::getDSP
C++ Syntax
FMOD_RESULT DSP::getType(
FMOD_DSP_TYPE *type
);
C Syntax
FMOD_RESULT FMOD_DSP_GetType(
FMOD_DSP *dsp,
FMOD_DSP_TYPE *type
);
C# Syntax
RESULT DSP.getType(
out DSP_TYPE type
);
JavaScript Syntax
DSP.getType(
type // writes value to type.val
);
Parameters
type
Address of a variable to receive the FMOD dsp type.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This is only valid for built in FMOD effects. Any user plugins will simply return
FMOD_DSP_TYPE_UNKNOWN.
See Also
FMOD_DSP_TYPE
C++ Syntax
FMOD_RESULT DSP::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_DSP_GetUserData(
FMOD_DSP *dsp,
void **userdata
);
C# Syntax
RESULT DSP.getUserData(
out IntPtr userdata
);
JavaScript Syntax
DSP.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of a pointer that receives the user data specified with the
DSP::setUserData function.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
DSP::setUserData
C++ Syntax
FMOD_RESULT DSP::getWetDryMix(
float *prewet,
float *postwet,
float *dry
);
C Syntax
FMOD_RESULT FMOD_DSP_GetWetDryMix(
FMOD_DSP *dsp,
float *prewet,
float *postwet,
float *dry
);
C# Syntax
RESULT DSP.getWetDryMix(
out float prewet,
out float postwet,
out float dry
);
JavaScript Syntax
DSP.getWetDryMix(
prewet, // writes value to prewet.val
postwet, // writes value to postwet.val
dry // writes value to dry.val
);
Parameters
prewet
Address of a floating point value, to receive typically 0 to 1, describing a
linear scale of the 'wet' (pre-processed signal) mix of the effect. Default =
1.0. Scale can be lower than 0 (negating) and higher than 1 (amplifying).
postwet
Address of a floating point value, to receive typically 0 to 1, describing a
linear scale of the 'wet' (post-processed signal) mix of the effect. Default =
1.0. Scale can be lower than 0 (negating) and higher than 1 (amplifying).
dry
Address of a floating point value, to receive typically 0 to 1, describing a
linear scale of the 'dry' (pre-processed signal) mix of the effect. Default =
0.0. Scale can be lower than 0 and higher than 1 (amplifying).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The dry signal path is silent by default, because dsp effects transform the input
and pass the newly processed result to the output. It does not add to the input.
See Also
DSP::setWetDryMix
C++ Syntax
FMOD_RESULT DSP::release();
C Syntax
FMOD_RESULT FMOD_DSP_Release(FMOD_DSP *dsp);
C# Syntax
RESULT DSP.release();
JavaScript Syntax
DSP.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This will free the DSP object.
C++ Syntax
FMOD_RESULT DSP::reset();
C Syntax
FMOD_RESULT FMOD_DSP_Reset(FMOD_DSP *dsp);
C# Syntax
RESULT DSP.reset();
JavaScript Syntax
DSP.reset();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Calling this function is useful if the DSP unit relies on a history to process itself
(ie an echo filter).
If you disconnected the unit and reconnected it to a different part of the network
with a different sound, you would want to call this to reset the units state (ie
clear and reset the echo filter) so that you dont get left over artifacts from the
place it used to be connected.
C++ Syntax
FMOD_RESULT DSP::setActive(
bool active
);
C Syntax
FMOD_RESULT FMOD_DSP_SetActive(
FMOD_DSP *dsp,
FMOD_BOOL active
);
C# Syntax
RESULT DSP.setActive(
bool active
);
JavaScript Syntax
DSP.setActive(
active
);
Parameters
active
true = unit is activated, false = unit is deactivated.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This does not connect or disconnect a unit in any way, it just disables it so that it
is not processed.
If a unit is disabled, and has inputs, they will also cease to be processed.
To disable a unit but allow the inputs of the unit to continue being processed, use
DSP::setBypass instead.
See Also
DSP::getActive
DSP::setBypass
C++ Syntax
FMOD_RESULT DSP::setBypass(
bool bypass
);
C Syntax
FMOD_RESULT FMOD_DSP_SetBypass(
FMOD_DSP *dsp,
FMOD_BOOL bypass
);
C# Syntax
RESULT DSP.setBypass(
bool bypass
);
JavaScript Syntax
DSP.setBypass(
bypass
);
Parameters
bypass
Boolean to cause the read callback of the DSP unit to be bypassed or not.
Default = false.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a unit is bypassed, it will still process its inputs.
To disable the unit and all of its inputs, use DSP::setActive instead.
See Also
DSP::getBypass
DSP::setActive
C++ Syntax
FMOD_RESULT DSP::setChannelFormat(
FMOD_CHANNELMASK channelmask,
int numchannels,
FMOD_SPEAKERMODE source_speakermode
);
C Syntax
FMOD_RESULT FMOD_DSP_SetChannelFormat(
FMOD_DSP *dsp,
FMOD_CHANNELMASK channelmask,
int numchannels,
FMOD_SPEAKERMODE source_speakermode
);
C# Syntax
RESULT DSP.setChannelFormat(
CHANNELMASK channelmask,
int numchannels,
SPEAKERMODE source_speakermode
);
JavaScript Syntax
DSP.setChannelFormat(
channelmask,
numchannels,
source_speakermode
);
Parameters
channelmask
A series of bits specified by FMOD_CHANNELMASK to determine which
speakers are represented by the channels in the signal.
numchannels
The number of channels to be processed on this unit and sent to the outputs
connected to it. Maximum of FMOD_MAX_CHANNEL_WIDTH.
source_speakermode
The source speaker mode where the signal came from. See remarks.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Setting the number of channels on a unit will force a down or up mix to that
channel count before processing the DSP read callback. This channelcount is
then sent to the outputs of the unit.
It could also describe the signal as all monaural, for example if numchannels was
16 and the speakermode was FMOD_SPEAKERMODE_MONO.
See Also
FMOD_CHANNELMASK
DSP::getChannelFormat
FMOD_MAX_CHANNEL_WIDTH
C++ Syntax
FMOD_RESULT DSP::setMeteringEnabled(
bool inputEnabled,
bool outputEnabled
);
C Syntax
FMOD_RESULT FMOD_DSP_SetMeteringEnabled(
FMOD_DSP *dsp,
FMOD_BOOL inputEnabled,
FMOD_BOOL outputEnabled
);
C# Syntax
RESULT DSP.setMeteringEnabled(
bool inputEnabled,
bool outputEnabled
);
JavaScript Syntax
DSP.setMeteringEnabled(
inputEnabled,
outputEnabled
);
Parameters
inputEnabled
Enable metering for the input signal (pre-processing). Specify true to turn
on input level metering, false to turn it off.
outputEnabled
Enable metering for the output signal (post-processing). Specify true to turn
on output level metering, false to turn it off.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
FMOD_INIT_PROFILE_METER_ALL with System::init will automatically
turn on metering for all DSP units inside the FMOD mixer graph.
See Also
DSP::getMeteringEnabled
DSP::getMeteringInfo
System::init
C++ Syntax
FMOD_RESULT DSP::setParameterBool(
int index,
bool value
);
C Syntax
FMOD_RESULT FMOD_DSP_SetParameterBool(
FMOD_DSP *dsp,
int index,
FMOD_BOOL value
);
C# Syntax
RESULT DSP.setParameterBool(
int index,
bool value
);
JavaScript Syntax
DSP.setParameterBool(
index,
value
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
value
Boolean parameter value to be passed to the DSP unit. Should be TRUE or
FALSE.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The parameter properties (such as min/max values) can be retrieved with
DSP::getParameterInfo.
See Also
DSP::getParameterInfo
DSP::getNumParameters
DSP::getParameterBool
FMOD_DSP_OSCILLATOR
FMOD_DSP_LOWPASS
FMOD_DSP_ITLOWPASS
FMOD_DSP_HIGHPASS
FMOD_DSP_ECHO
FMOD_DSP_FLANGE
FMOD_DSP_DISTORTION
FMOD_DSP_NORMALIZE
FMOD_DSP_LIMITER
FMOD_DSP_PARAMEQ
FMOD_DSP_PITCHSHIFT
FMOD_DSP_CHORUS
FMOD_DSP_ITECHO
FMOD_DSP_COMPRESSOR
FMOD_DSP_SFXREVERB
FMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_DELAY
FMOD_DSP_TREMOLO
FMOD_DSP_SEND
FMOD_DSP_RETURN
FMOD_DSP_HIGHPASS_SIMPLE
FMOD_DSP_PAN
FMOD_DSP_THREE_EQ
FMOD_DSP_FFT
C++ Syntax
FMOD_RESULT DSP::setParameterData(
int index,
void *data,
unsigned int length
);
C Syntax
FMOD_RESULT FMOD_DSP_SetParameterData(
FMOD_DSP *dsp,
int index,
void *data,
unsigned int length
);
C# Syntax
RESULT DSP.setParameterData(
int index,
byte[] data
);
JavaScript Syntax
DSP.setParameterData(
index,
data,
length
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
data
Data block parameter. This will be raw binary data to be passed to the DSP
unit.
length
Length of data block in byte sbeing passed in.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The parameter properties (such as min/max values) can be retrieved with
DSP::getParameterInfo.
Certain data types are predefined by the system and can be specified via the
FMOD_DSP_PARAMETER_DESC_DATA, see
FMOD_DSP_PARAMETER_DATA_TYPE
See Also
DSP::getParameterInfo
DSP::getNumParameters
DSP::getParameterData
FMOD_DSP_PARAMETER_DATA_TYPE
FMOD_DSP_OSCILLATOR
FMOD_DSP_LOWPASS
FMOD_DSP_ITLOWPASS
FMOD_DSP_HIGHPASS
FMOD_DSP_ECHO
FMOD_DSP_FLANGE
FMOD_DSP_DISTORTION
FMOD_DSP_NORMALIZE
FMOD_DSP_LIMITER
FMOD_DSP_PARAMEQ
FMOD_DSP_PITCHSHIFT
FMOD_DSP_CHORUS
FMOD_DSP_ITECHO
FMOD_DSP_COMPRESSOR
FMOD_DSP_SFXREVERB
FMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_DELAY
FMOD_DSP_TREMOLO
FMOD_DSP_SEND
FMOD_DSP_RETURN
FMOD_DSP_HIGHPASS_SIMPLE
FMOD_DSP_PAN
FMOD_DSP_THREE_EQ
FMOD_DSP_FFT
C++ Syntax
FMOD_RESULT DSP::setParameterFloat(
int index,
float value
);
C Syntax
FMOD_RESULT FMOD_DSP_SetParameterFloat(
FMOD_DSP *dsp,
int index,
float value
);
C# Syntax
RESULT DSP.setParameterFloat(
int index,
float value
);
JavaScript Syntax
DSP.setParameterFloat(
index,
value
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
value
Floating point parameter value to be passed to the DSP unit.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The parameter properties (such as min/max values) can be retrieved with
DSP::getParameterInfo.
See Also
DSP::getParameterInfo
DSP::getNumParameters
DSP::getParameterFloat
FMOD_DSP_OSCILLATOR
FMOD_DSP_LOWPASS
FMOD_DSP_ITLOWPASS
FMOD_DSP_HIGHPASS
FMOD_DSP_ECHO
FMOD_DSP_FLANGE
FMOD_DSP_DISTORTION
FMOD_DSP_NORMALIZE
FMOD_DSP_LIMITER
FMOD_DSP_PARAMEQ
FMOD_DSP_PITCHSHIFT
FMOD_DSP_CHORUS
FMOD_DSP_ITECHO
FMOD_DSP_COMPRESSOR
FMOD_DSP_SFXREVERB
FMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_DELAY
FMOD_DSP_TREMOLO
FMOD_DSP_SEND
FMOD_DSP_RETURN
FMOD_DSP_HIGHPASS_SIMPLE
FMOD_DSP_PAN
FMOD_DSP_THREE_EQ
FMOD_DSP_FFT
C++ Syntax
FMOD_RESULT DSP::setParameterInt(
int index,
int value
);
C Syntax
FMOD_RESULT FMOD_DSP_SetParameterInt(
FMOD_DSP *dsp,
int index,
int value
);
C# Syntax
RESULT DSP.setParameterInt(
int index,
int value
);
JavaScript Syntax
DSP.setParameterInt(
index,
value
);
Parameters
index
Parameter index for this unit. Find the number of parameters with
DSP::getNumParameters.
value
Integer parameter value to be passed to the DSP unit.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The parameter properties (such as min/max values) can be retrieved with
DSP::getParameterInfo.
See Also
DSP::getParameterInfo
DSP::getNumParameters
DSP::getParameterInt
FMOD_DSP_OSCILLATOR
FMOD_DSP_LOWPASS
FMOD_DSP_ITLOWPASS
FMOD_DSP_HIGHPASS
FMOD_DSP_ECHO
FMOD_DSP_FLANGE
FMOD_DSP_DISTORTION
FMOD_DSP_NORMALIZE
FMOD_DSP_LIMITER
FMOD_DSP_PARAMEQ
FMOD_DSP_PITCHSHIFT
FMOD_DSP_CHORUS
FMOD_DSP_ITECHO
FMOD_DSP_COMPRESSOR
FMOD_DSP_SFXREVERB
FMOD_DSP_LOWPASS_SIMPLE
FMOD_DSP_DELAY
FMOD_DSP_TREMOLO
FMOD_DSP_SEND
FMOD_DSP_RETURN
FMOD_DSP_HIGHPASS_SIMPLE
FMOD_DSP_PAN
FMOD_DSP_THREE_EQ
FMOD_DSP_FFT
C++ Syntax
FMOD_RESULT DSP::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_DSP_SetUserData(
FMOD_DSP *dsp,
void *userdata
);
C# Syntax
RESULT DSP.setUserData(
IntPtr userdata
);
JavaScript Syntax
DSP.setUserData(
userdata
);
Parameters
userdata
Address of user data that the user wishes stored within the DSP object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
C++ Syntax
FMOD_RESULT DSP::setWetDryMix(
float prewet,
float postwet,
float dry
);
C Syntax
FMOD_RESULT FMOD_DSP_SetWetDryMix(
FMOD_DSP *dsp,
float prewet,
float postwet,
float dry
);
C# Syntax
RESULT DSP.setWetDryMix(
float prewet,
float postwet,
float dry
);
JavaScript Syntax
DSP.setWetDryMix(
prewet,
postwet,
dry
);
Parameters
prewet
Floating point value from 0 to 1, describing a linear scale of the 'wet' (pre-
processed signal) mix of the effect. Default = 1.0. Scale can be lower than 0
(negating) and higher than 1 (amplifying).
postwet
Floating point value from 0 to 1, describing a linear scale of the 'wet' (post-
processed signal) mix of the effect. Default = 1.0. Scale can be lower than 0
(negating) and higher than 1 (amplifying).
dry
Floating point value from 0 to 1, describing a linear scale of the 'dry' (pre-
processed signal) mix of the effect. Default = 0.0. Scale can be lower than 0
and higher than 1 (amplifying).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The dry signal path is silent by default, because dsp effects transform the input
and pass the newly processed result to the output. It does not add to the input.
See Also
DSP::getWetDryMix
C++ Syntax
FMOD_RESULT DSP::showConfigDialog(
void *hwnd,
bool show
);
C Syntax
FMOD_RESULT FMOD_DSP_ShowConfigDialog(
FMOD_DSP *dsp,
void *hwnd,
FMOD_BOOL show
);
C# Syntax
RESULT DSP.showConfigDialog(
IntPtr hwnd,
bool show
);
JavaScript Syntax
DSP.showConfigDialog(
hwnd,
show
);
Parameters
hwnd
Target HWND in windows to display configuration dialog.
show
true = show dialog box inside target hwnd. false = remove dialog from
target hwnd.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Dialog boxes are used by DSP plugins that prefer to use a graphical user
interface to modify their parameters rather than using the other method of
enumerating the parameters and using DSP::setParameterFloat /
DSP::setParameterInt / DSP::setParameterBool / DSP::setParameterData.
These are usually VST plugins. FMOD Studio plugins do not have configuration
dialog boxes. To find out what size window to create to store the configuration
screen, use DSP::getInfo where you can get the width and height.
See Also
DSP::getInfo
DSP::setParameterFloat
DSP::setParameterInt
DSP::setParameterBool
DSP::setParameterData
DSP::getParameterFloat
DSP::getParameterInt
DSP::getParameterBool
DSP::getParameterData
C++ Syntax
FMOD_RESULT DSPConnection::getInput(
FMOD::DSP **input
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_GetInput(
FMOD_DSPCONNECTION *dspconnection,
FMOD_DSP **input
);
C# Syntax
RESULT DSPConnection.getInput(
out DSP input
);
JavaScript Syntax
DSPConnection.getInput(
input // writes value to input.val
);
Parameters
input
Address of a pointer that receives the pointer to the DSP unit that is the
input of this connection.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A DSPConnection joins 2 DSP units together (think of it as the line between 2
circles).
Each DSPConnection has 1 input and 1 output.
C++ Syntax
FMOD_RESULT DSPConnection::getMix(
float *volume
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_GetMix(
FMOD_DSPCONNECTION *dspconnection,
float *volume
);
C# Syntax
RESULT DSPConnection.getMix(
out float volume
);
JavaScript Syntax
DSPConnection.getMix(
volume // writes value to volume.val
);
Parameters
volume
Address of a variable to receive the volume or mix level of the specified
input. 0.0 = silent, 1.0 = full volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
DSPConnection::setMix
DSP::getInput
DSP::getOutput
C++ Syntax
FMOD_RESULT DSPConnection::getMixMatrix(
float *matrix,
int *outchannels,
int *inchannels,
int inchannel_hop
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_GetMixMatrix(
FMOD_DSPCONNECTION *dspconnection,
float *matrix,
int *outchannels,
int *inchannels,
int inchannel_hop
);
C# Syntax
RESULT DSPConnection.getMixMatrix(
float[] matrix,
out int outchannels,
out int inchannels,
int inchannel_hop
);
JavaScript Syntax
DSPConnection.getMixMatrix(
matrix, // writes value to matrix.val
outchannels, // writes value to outchannels.val
inchannels, // writes value to inchannels.val
inchannel_hop
);
Parameters
matrix
Address of a variable to recieve an array of floating point matrix data,
where rows represent output speakers, and columns represent input
channels.
outchannels
Address of a variable to receive the number of output channels in the set
matrix.
inchannels
Address of a variable to receive the number of input channels in the set
matrix.
inchannel_hop
Number of floating point values available in the destination n memory for a
row, so that the destination memory can be skipped through correctly to
write the right values, if the intended matrix memory to be written to is
wider than the matrix stored in the DSPConnection.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
DSPConnection::setMixMatrix
C++ Syntax
FMOD_RESULT DSPConnection::getOutput(
FMOD::DSP **output
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_GetOutput(
FMOD_DSPCONNECTION *dspconnection,
FMOD_DSP **output
);
C# Syntax
RESULT DSPConnection.getOutput(
out DSP output
);
JavaScript Syntax
DSPConnection.getOutput(
output // writes value to output.val
);
Parameters
output
Address of a pointer that receives the pointer to the DSP unit that is the
output of this connection.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
A DSPConnection joins 2 DSP units together (think of it as the line between 2
circles). Each DSPConnection has 1 input and 1 output.
C++ Syntax
FMOD_RESULT DSPConnection::getType(
FMOD_DSPCONNECTION_TYPE *type
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_GetType(
FMOD_DSPCONNECTION *dspconnection,
FMOD_DSPCONNECTION_TYPE *type
);
C# Syntax
RESULT DSPConnection.getType(
out DSPCONNECTION_TYPE type
);
JavaScript Syntax
DSPConnection.getType(
type // writes value to type.val
);
Parameters
type
Address of the variable to receive the type of connection between 2 DSP
units. See FMOD_DSPCONNECTION_TYPE.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_DSPCONNECTION_TYPE
C++ Syntax
FMOD_RESULT DSPConnection::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_GetUserData(
FMOD_DSPCONNECTION *dspconnection,
void **userdata
);
C# Syntax
RESULT DSPConnection.getUserData(
out IntPtr userdata
);
JavaScript Syntax
DSPConnection.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of user data that the user wishes stored within the DSPConnection
object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
See Also
DSPConnection::getUserData
C++ Syntax
FMOD_RESULT DSPConnection::setMix(
float volume
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_SetMix(
FMOD_DSPCONNECTION *dspconnection,
float volume
);
C# Syntax
RESULT DSPConnection.setMix(
float volume
);
JavaScript Syntax
DSPConnection.setMix(
volume
);
Parameters
volume
Volume or mix level of the connection. 0.0 = silent, 1.0 = full volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
DSPConnection::getMix
DSP::getInput
DSP::getOutput
C++ Syntax
FMOD_RESULT DSPConnection::setMixMatrix(
float *matrix,
int outchannels,
int inchannels,
int inchannel_hop
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_SetMixMatrix(
FMOD_DSPCONNECTION *dspconnection,
float *matrix,
int outchannels,
int inchannels,
int inchannel_hop
);
C# Syntax
RESULT DSPConnection.setMixMatrix(
float[] matrix,
int outchannels,
int inchannels,
int inchannel_hop
);
JavaScript Syntax
DSPConnection.setMixMatrix(
matrix,
outchannels,
inchannels,
inchannel_hop
);
Parameters
matrix
Pointer to an array of floating point matrix data, where rows represent
output speakers, and columns represent input channels.
outchannels
Number of output channels in the matrix being specified.
inchannels
Number of input channels in the matrix being specified.
inchannel_hop
Number of floating point values stored in memory for a row, so that the
memory can be skipped through correctly to read the right values, if the
intended matrix memory to be read from is wider than the matrix stored in
the DSPConnection.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
DSPConnection::getMixMatrix
C++ Syntax
FMOD_RESULT DSPConnection::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_DSPConnection_SetUserData(
FMOD_DSPCONNECTION *dspconnection,
void *userdata
);
C# Syntax
RESULT DSPConnection.setUserData(
IntPtr userdata
);
JavaScript Syntax
DSPConnection.setUserData(
userdata
);
Parameters
userdata
Address of user data that the user wishes stored within the DSPConnection
object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
See Also
DSPConnection::getUserData
C++ Syntax
FMOD_RESULT Geometry::addPolygon(
float directocclusion,
float reverbocclusion,
bool doublesided,
int numvertices,
const FMOD_VECTOR *vertices,
int *polygonindex
);
C Syntax
FMOD_RESULT FMOD_Geometry_AddPolygon(
FMOD_GEOMETRY *geometry,
float directocclusion,
float reverbocclusion,
FMOD_BOOL doublesided,
int numvertices,
const FMOD_VECTOR *vertices,
int *polygonindex
);
C# Syntax
RESULT Geometry.addPolygon(
float directocclusion,
float reverbocclusion,
bool doublesided,
int numvertices,
VECTOR[] vertices,
out int polygonindex
);
JavaScript Syntax
Geometry.addPolygon(
);
Parameters
directocclusion
Occlusion value from 0.0 to 1.0 which affects volume or audible
frequencies. 0.0 = The polygon does not occlude volume or audible
frequencies (sound will be fully audible), 1.0 = The polygon fully occludes
(sound will be silent).
reverbocclusion
Occlusion value from 0.0 to 1.0 which affects the reverb mix. 0.0 = The
polygon does not occlude reverb (reverb reflections still travel through this
polygon), 1.0 = The polyfully fully occludes reverb (reverb reflections will
be silent through this polygon).
doublesided
Description of polygon if it is double sided or single sided. true = polygon
is double sided, false = polygon is single sided, and the winding of the
polygon (which determines the polygon's normal) determines which side of
the polygon will cause occlusion.
numvertices
Number of vertices in this polygon. This must be at least 3. Polygons (more
than 3 sides) are supported.
vertices
A pointer to an array of vertices located in object space, with the count
being the number of vertices described using the numvertices parameter.
polygonindex
Address of a variable to receieve the polygon index for this object. This
index can be used later with other per polygon based geometry functions.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note!
All vertices must lay in the same plane otherwise behaviour may be
unpredictable.
The polygon is assumed to be convex. A non convex polygon will produce
unpredictable behaviour.
Polygons with zero area will be ignored.
Vertices of an object are in object space, not world space, and so are relative to
the position, or center of the object. See Geometry::setPosition.
JavaScript only :
C++ Syntax
FMOD_RESULT Geometry::getActive(
bool *active
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetActive(
FMOD_GEOMETRY *geometry,
FMOD_BOOL *active
);
C# Syntax
RESULT Geometry.getActive(
out bool active
);
JavaScript Syntax
Geometry.getActive(
active // writes value to active.val
);
Parameters
active
Address of a variable to receive the active state of the object. true = active,
false = not active. Default = true.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::setActive
C++ Syntax
FMOD_RESULT Geometry::getMaxPolygons(
int *maxpolygons,
int *maxvertices
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetMaxPolygons(
FMOD_GEOMETRY *geometry,
int *maxpolygons,
int *maxvertices
);
C# Syntax
RESULT Geometry.getMaxPolygons(
out int maxpolygons,
out int maxvertices
);
JavaScript Syntax
Geometry.getMaxPolygons(
maxpolygons, // writes value to maxpolygons.val
maxvertices // writes value to maxvertices.val
);
Parameters
maxpolygons
Address of a variable to receieve the maximum possible number of
polygons in this object.
maxvertices
Address of a variable to receieve the maximum possible number of vertices
in this object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
System::createGeometry
System::loadGeometry
C++ Syntax
FMOD_RESULT Geometry::getNumPolygons(
int *numpolygons
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetNumPolygons(
FMOD_GEOMETRY *geometry,
int *numpolygons
);
C# Syntax
RESULT Geometry.getNumPolygons(
out int numpolygons
);
JavaScript Syntax
Geometry.getNumPolygons(
numpolygons // writes value to numpolygons.val
);
Parameters
numpolygons
Address of a variable to receive the number of polygons within this object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Polygons are added to a geometry object via Geometry::addPolygon.
See Also
Geometry::AddPolygon
C++ Syntax
FMOD_RESULT Geometry::getPolygonAttributes(
int index,
float *directocclusion,
float *reverbocclusion,
bool *doublesided
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetPolygonAttributes(
FMOD_GEOMETRY *geometry,
int index,
float *directocclusion,
float *reverbocclusion,
FMOD_BOOL *doublesided
);
C# Syntax
RESULT Geometry.getPolygonAttributes(
int index,
out float directocclusion,
out float reverbocclusion,
out bool doublesided
);
JavaScript Syntax
Geometry.getPolygonAttributes(
index,
directocclusion, // writes value to directocclusion.val
reverbocclusion, // writes value to reverbocclusion.val
doublesided // writes value to doublesided.val
);
Parameters
index
Polygon index inside the object.
directocclusion
Address of a variable to receieve the occlusion value from 0.0 to 1.0 which
affects volume or audible frequencies. 0.0 = The polygon does not occlude
volume or audible frequencies (sound will be fully audible), 1.0 = The
polygon fully occludes (sound will be silent).
reverbocclusion
Address of a variable to receieve the occlusion value from 0.0 to 1.0 which
affects the reverb mix. 0.0 = The polygon does not occlude reverb (reverb
reflections still travel through this polygon), 1.0 = The polyfully fully
occludes reverb (reverb reflections will be silent through this polygon).
doublesided
Address of a variable to receieve the description of polygon if it is double
sided or single sided. true = polygon is double sided, false = polygon is
single sided, and the winding of the polygon (which determines the
polygon's normal) determines which side of the polygon will cause
occlusion.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::getPolygonAttributes
Geometry::getNumPolygons
C++ Syntax
FMOD_RESULT Geometry::getPolygonNumVertices(
int index,
int *numvertices
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetPolygonNumVertices(
FMOD_GEOMETRY *geometry,
int index,
int *numvertices
);
C# Syntax
RESULT Geometry.getPolygonNumVertices(
int index,
out int numvertices
);
JavaScript Syntax
Geometry.getPolygonNumVertices(
index,
numvertices // writes value to numvertices.val
);
Parameters
index
Polygon index. This must be in the range of 0 to
Geometry::getNumPolygons minus 1.
numvertices
Address of a variable to receive the number of vertices for the selected
polygon.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::getNumPolygons
C++ Syntax
FMOD_RESULT Geometry::getPolygonVertex(
int index,
int vertexindex,
FMOD_VECTOR *vertex
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetPolygonVertex(
FMOD_GEOMETRY *geometry,
int index,
int vertexindex,
FMOD_VECTOR *vertex
);
C# Syntax
RESULT Geometry.getPolygonVertex(
int index,
int vertexindex,
out VECTOR vertex
);
JavaScript Syntax
Geometry.getPolygonVertex(
index,
vertexindex,
vertex // writes value to vertex.val
);
Parameters
index
Polygon index. This must be in the range of 0 to
Geometry::getNumPolygons minus 1.
vertexindex
Vertex index inside the polygon. This must be in the range of 0 to
Geometry::getPolygonNumVertices minus 1.
vertex
Address of an FMOD_VECTOR structure which will receive the new
vertex location in object space.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Vertices are relative to the position of the object. See Geometry::setPosition.
See Also
Geometry::getPolygonNumVertices
Geometry::setPosition
Geometry::getNumPolygons
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Geometry::getPosition(
FMOD_VECTOR *position
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetPosition(
FMOD_GEOMETRY *geometry,
FMOD_VECTOR *position
);
C# Syntax
RESULT Geometry.getPosition(
out VECTOR position
);
JavaScript Syntax
Geometry.getPosition(
position // writes value to position.val
);
Parameters
position
Address of a variable to receive the 3D position of the object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::setPosition
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Geometry::getRotation(
FMOD_VECTOR *forward,
FMOD_VECTOR *up
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetRotation(
FMOD_GEOMETRY *geometry,
FMOD_VECTOR *forward,
FMOD_VECTOR *up
);
C# Syntax
RESULT Geometry.getRotation(
out VECTOR forward,
out VECTOR up
);
JavaScript Syntax
Geometry.getRotation(
forward, // writes value to forward.val
up // writes value to up.val
);
Parameters
forward
Address of a variable that receives the forwards orientation of the geometry
object. Specify 0 or NULL to ignore.
up
Address of a variable that receives the upwards orientation of the geometry
object. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
See remarks in System::set3DListenerAttributes for more description on forward
and up vectors.
See Also
Geometry::setRotation
System::set3DListenerAttributes
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Geometry::getScale(
FMOD_VECTOR *scale
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetScale(
FMOD_GEOMETRY *geometry,
FMOD_VECTOR *scale
);
C# Syntax
RESULT Geometry.getScale(
out VECTOR scale
);
JavaScript Syntax
Geometry.getScale(
scale // writes value to scale.val
);
Parameters
scale
Address of a variable to receieve the scale vector of the object. Default =
1.0, 1.0, 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::setScale
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Geometry::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_Geometry_GetUserData(
FMOD_GEOMETRY *geometry,
void **userdata
);
C# Syntax
RESULT Geometry.getUserData(
out IntPtr userdata
);
JavaScript Syntax
Geometry.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of a pointer that receives the data specified with the
Geometry::setUserData function.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::setUserData
C++ Syntax
FMOD_RESULT Geometry::release();
C Syntax
FMOD_RESULT FMOD_Geometry_Release(FMOD_GEOMETRY *geometry);
C# Syntax
RESULT Geometry.release();
JavaScript Syntax
Geometry.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Geometry::save(
void *data,
int *datasize
);
C Syntax
FMOD_RESULT FMOD_Geometry_Save(
FMOD_GEOMETRY *geometry,
void *data,
int *datasize
);
C# Syntax
RESULT Geometry.save(
IntPtr data,
out int datasize
);
JavaScript Syntax
Geometry.save(
);
Parameters
data
Address of a variable to receive the serialized geometry object. Specify 0 or
NULL to have the datasize parameter return the size of the memory
required for this saved object.
datasize
Address of a variable to receive the size in bytes required to save this object
when 'data' parameter is 0 or NULL.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
To use this function you will normally need to call it twice. Once to get the size
of the data, then again to write the data to your pointer.
JavaScript only :
C++ Syntax
FMOD_RESULT Geometry::setActive(
bool active
);
C Syntax
FMOD_RESULT FMOD_Geometry_SetActive(
FMOD_GEOMETRY *geometry,
FMOD_BOOL active
);
C# Syntax
RESULT Geometry.setActive(
bool active
);
JavaScript Syntax
Geometry.setActive(
active
);
Parameters
active
true = active, false = not active. Default = true.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::getActive
C++ Syntax
FMOD_RESULT Geometry::setPolygonAttributes(
int index,
float directocclusion,
float reverbocclusion,
bool doublesided
);
C Syntax
FMOD_RESULT FMOD_Geometry_SetPolygonAttributes(
FMOD_GEOMETRY *geometry,
int index,
float directocclusion,
float reverbocclusion,
FMOD_BOOL doublesided
);
C# Syntax
RESULT Geometry.setPolygonAttributes(
int index,
float directocclusion,
float reverbocclusion,
bool doublesided
);
JavaScript Syntax
Geometry.setPolygonAttributes(
index,
directocclusion,
reverbocclusion,
doublesided
);
Parameters
index
Polygon index inside the object.
directocclusion
Occlusion value from 0.0 to 1.0 which affects volume or audible
frequencies. 0.0 = The polygon does not occlude volume or audible
frequencies (sound will be fully audible), 1.0 = The polygon fully occludes
(sound will be silent).
reverbocclusion
Occlusion value from 0.0 to 1.0 which affects the reverb mix. 0.0 = The
polygon does not occlude reverb (reverb reflections still travel through this
polygon), 1.0 = The polyfully fully occludes reverb (reverb reflections will
be silent through this polygon).
doublesided
Description of polygon if it is double sided or single sided. true = polygon
is double sided, false = polygon is single sided, and the winding of the
polygon (which determines the polygon's normal) determines which side of
the polygon will cause occlusion.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::getPolygonAttributes
Geometry::getNumPolygons
C++ Syntax
FMOD_RESULT Geometry::setPolygonVertex(
int index,
int vertexindex,
const FMOD_VECTOR *vertex
);
C Syntax
FMOD_RESULT FMOD_Geometry_SetPolygonVertex(
FMOD_GEOMETRY *geometry,
int index,
int vertexindex,
const FMOD_VECTOR *vertex
);
C# Syntax
RESULT Geometry.setPolygonVertex(
int index,
int vertexindex,
ref VECTOR vertex
);
JavaScript Syntax
Geometry.setPolygonVertex(
index,
vertexindex,
vertex
);
Parameters
index
Polygon index. This must be in the range of 0 to
Geometry::getNumPolygons minus 1.
vertexindex
Vertex index inside the polygon. This must be in the range of 0 to
Geometry::getPolygonNumVertices minus 1.
vertex
Address of an FMOD_VECTOR which holds the new vertex location.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note! There may be some significant overhead with this function as it may cause
some reconfiguration of internal data structures used to speed up sound-ray
testing.
You may get better results if you want to modify your object by using
Geometry::setPosition, Geometry::setScale and Geometry::setRotation.
See Also
Geometry::getPolygonNumVertices
Geometry::getPolygonNumVertices
Geometry::setPosition
Geometry::setScale
Geometry::setRotation
Geometry::getNumPolygons
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Geometry::setPosition(
const FMOD_VECTOR *position
);
C Syntax
FMOD_RESULT FMOD_Geometry_SetPosition(
FMOD_GEOMETRY *geometry,
const FMOD_VECTOR *position
);
C# Syntax
RESULT Geometry.setPosition(
ref VECTOR position
);
JavaScript Syntax
Geometry.setPosition(
position
);
Parameters
position
Pointer to a vector containing the 3D position of the object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::getPosition
Geometry::setRotation
Geometry::setScale
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Geometry::setRotation(
const FMOD_VECTOR *forward,
const FMOD_VECTOR *up
);
C Syntax
FMOD_RESULT FMOD_Geometry_SetRotation(
FMOD_GEOMETRY *geometry,
const FMOD_VECTOR *forward,
const FMOD_VECTOR *up
);
C# Syntax
RESULT Geometry.setRotation(
ref VECTOR forward,
ref VECTOR up
);
JavaScript Syntax
Geometry.setRotation(
forward,
up
);
Parameters
forward
The forwards orientation of the geometry object. This vector must be of
unit length and perpendicular to the up vector. You can specify 0 or NULL
to not update the forwards orientation of the geometry object.
up
The upwards orientation of the geometry object. This vector must be of unit
length and perpendicular to the forwards vector. You can specify 0 or
NULL to not update the upwards orientation of the geometry object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
See remarks in System::set3DListenerAttributes for more description on forward
and up vectors.
See Also
Geometry::getRotation
System::set3DListenerAttributes
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Geometry::setScale(
const FMOD_VECTOR *scale
);
C Syntax
FMOD_RESULT FMOD_Geometry_SetScale(
FMOD_GEOMETRY *geometry,
const FMOD_VECTOR *scale
);
C# Syntax
RESULT Geometry.setScale(
ref VECTOR scale
);
JavaScript Syntax
Geometry.setScale(
scale
);
Parameters
scale
The scale vector of the object. Default = 1.0, 1.0, 1.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Geometry::getScale
Geometry::setRotation
Geometry::setPosition
FMOD_VECTOR
C++ Syntax
FMOD_RESULT Geometry::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_Geometry_SetUserData(
FMOD_GEOMETRY *geometry,
void *userdata
);
C# Syntax
RESULT Geometry.setUserData(
IntPtr userdata
);
JavaScript Syntax
Geometry.setUserData(
userdata
);
Parameters
userdata
Address of user data that the user wishes stored within the Geometry object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
C++ Syntax
FMOD_RESULT Reverb3D::get3DAttributes(
FMOD_VECTOR *position,
float *mindistance,
float *maxdistance
);
C Syntax
FMOD_RESULT FMOD_Reverb3D_Get3DAttributes(
FMOD_REVERB3D *reverb3d,
FMOD_VECTOR *position,
float *mindistance,
float *maxdistance
);
C# Syntax
RESULT Reverb3D.get3DAttributes(
ref VECTOR position,
ref float mindistance,
ref float maxdistance
);
JavaScript Syntax
Reverb3D.get3DAttributes(
position, // writes value to position.val
mindistance, // writes value to mindistance.val
maxdistance // writes value to maxdistance.val
);
Parameters
position
Address of a variable that will receive the 3D position of the center of the
reverb in 3D space. Default = { 0,0,0 }.
mindistance
Address of a variable that will receive the distance from the centerpoint that
the reverb will have full effect at. Default = 0.0.
maxdistance
Address of a variable that will receive the distance from the centerpoint that
the reverb will not have any effect. Default = 0.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The 3D reverb object is a sphere having 3D attributes (position, minimum
distance, maximum distance) and reverb properties.
Please note that this only applies to software channels. When the listener is
within the sphere of effect of one or more 3D reverbs, the listener's 3D reverb
properties are a weighted combination of such 3D reverbs. When the listener is
outside all of the reverbs, the 3D reverb setting is set to the default ambient
reverb setting.
See Also
Reverb3D::set3DAttributes
System::createReverb3D
C++ Syntax
FMOD_RESULT Reverb3D::getActive(
bool *active
);
C Syntax
FMOD_RESULT FMOD_Reverb3D_GetActive(
FMOD_REVERB3D *reverb3d,
FMOD_BOOL *active
);
C# Syntax
RESULT Reverb3D.getActive(
out bool active
);
JavaScript Syntax
Reverb3D.getActive(
active // writes value to active.val
);
Parameters
active
Address of a variable to receive the current active state of the reverb object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Reverb3D::setActive
System::createReverb3D
C++ Syntax
FMOD_RESULT Reverb3D::getProperties(
FMOD_REVERB_PROPERTIES *properties
);
C Syntax
FMOD_RESULT FMOD_Reverb3D_GetProperties(
FMOD_REVERB3D *reverb3d,
FMOD_REVERB_PROPERTIES *properties
);
C# Syntax
RESULT Reverb3D.getProperties(
ref REVERB_PROPERTIES properties
);
JavaScript Syntax
Reverb3D.getProperties(
properties // writes value to properties.val
);
Parameters
properties
Address of a variable that receives the current reverb environment
description.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Reverb3D::setProperties
System::createReverb3D
C++ Syntax
FMOD_RESULT Reverb3D::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_Reverb3D_GetUserData(
FMOD_REVERB3D *reverb3d,
void **userdata
);
C# Syntax
RESULT Reverb3D.getUserData(
out IntPtr userdata
);
JavaScript Syntax
Reverb3D.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Address of a pointer that receives the data specified with the
Reverb::setUserData function.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Reverb3D::setUserData
C++ Syntax
FMOD_RESULT Reverb3D::release();
C Syntax
FMOD_RESULT FMOD_Reverb3D_Release(FMOD_REVERB3D *reverb3d);
C# Syntax
RESULT Reverb3D.release();
JavaScript Syntax
Reverb3D.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If no reverb objects are created, the ambient reverb will be the only audible
reverb. By default this ambient reverb setting is set to OFF.
See Also
System::createReverb3D
C++ Syntax
FMOD_RESULT Reverb3D::set3DAttributes(
const FMOD_VECTOR *position,
float mindistance,
float maxdistance
);
C Syntax
FMOD_RESULT FMOD_Reverb3D_Set3DAttributes(
FMOD_REVERB3D *reverb3d,
const FMOD_VECTOR *position,
float mindistance,
float maxdistance
);
C# Syntax
RESULT Reverb3D.set3DAttributes(
ref VECTOR position,
float mindistance,
float maxdistance
);
JavaScript Syntax
Reverb3D.set3DAttributes(
position,
mindistance,
maxdistance
);
Parameters
position
Pointer to a vector containing the 3D position of the center of the reverb in
3D space. Default = { 0,0,0 }.
mindistance
The distance from the centerpoint that the reverb will have full effect at.
Default = 0.0.
maxdistance
The distance from the centerpoint that the reverb will not have any effect.
Default = 0.0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The 3D reverb object is a sphere having 3D attributes (position, minimum
distance, maximum distance) and reverb properties.
When the listener is within the sphere of effect of one or more 3D reverbs, the
listener's 3D reverb properties are a weighted combination of such 3D reverbs.
When the listener is outside all of the reverbs, the 3D reverb setting is set to the
default ambient reverb setting.
See Also
Reverb3D::get3DAttributes
System::createReverb3D
C++ Syntax
FMOD_RESULT Reverb3D::setActive(
bool active
);
C Syntax
FMOD_RESULT FMOD_Reverb3D_SetActive(
FMOD_REVERB3D *reverb3d,
FMOD_BOOL active
);
C# Syntax
RESULT Reverb3D.setActive(
bool active
);
JavaScript Syntax
Reverb3D.setActive(
active
);
Parameters
active
true = active, false = not active. Default = true.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Reverb3D::setActive
System::createReverb3D
C++ Syntax
FMOD_RESULT Reverb3D::setProperties(
const FMOD_REVERB_PROPERTIES *properties
);
C Syntax
FMOD_RESULT FMOD_Reverb3D_SetProperties(
FMOD_REVERB3D *reverb3d,
const FMOD_REVERB_PROPERTIES *properties
);
C# Syntax
RESULT Reverb3D.setProperties(
ref REVERB_PROPERTIES properties
);
JavaScript Syntax
Reverb3D.setProperties(
properties
);
Parameters
properties
Address of an FMOD_REVERB_PROPERTIES structure which defines
the attributes for the reverb.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_REVERB_PROPERTIES
FMOD_REVERB_PRESETS
Reverb3D::getProperties
System::createReverb3D
C++ Syntax
FMOD_RESULT Reverb3D::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_Reverb3D_SetUserData(
FMOD_REVERB3D *reverb3d,
void *userdata
);
C# Syntax
RESULT Reverb3D.setUserData(
IntPtr userdata
);
JavaScript Syntax
Reverb3D.setUserData(
userdata
);
Parameters
userdata
Address of user data that the user wishes stored within the Reverb object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
JavaScript Syntax
FMOD.ErrorString(
error // FMOD_RESULT error code
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
JavaScript Syntax
FMOD.file_close(
handle, // (object) Handle returned by the FMOD.file_open
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
JavaScript Syntax
FMOD.file_open(
system, // FMOD::System object handle
filename, // (string) path and filename which matches the path/file
filesize_out, // (number) an integer with the size of the file is put i
handle_out // (object) an object with the file handle is put in hand
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
JavaScript Syntax
FMOD.file_read(
handle, // (object) Handle returned by the FMOD.file_open
buffer, // (number) A memory address that would come from an internal
sizebytes, // (number) Integer value with the number of bytes requested
bytesread_out // (number) An integer with the number of bytes actually read
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
'buffer' parameter is typically an object returned as the
1. buffer parameter of the FMOD_FILE_READ_CALLBACK
2. data parameter of the FMOD_CREATESOUNDEXINFO::pcmreadcallback,
3. buffer parameter of the FMOD_STUDIO_BANK_INFO::readcallback
JavaScript Syntax
FMOD.file_seek(
handle, // (object) Handle returned by the FMOD.file_open function
pos, // (number) offset in bytes to seek into the file, relatve to the
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Debug_Initialize(
FMOD_DEBUG_FLAGS flags,
FMOD_DEBUG_MODE mode,
FMOD_DEBUG_CALLBACK callback,
const char *filename
);
C Syntax
FMOD_RESULT FMOD_Debug_Initialize(
FMOD_DEBUG_FLAGS flags,
FMOD_DEBUG_MODE mode,
FMOD_DEBUG_CALLBACK callback,
const char *filename
);
C# Syntax
static RESULT Debug.Initialize(
DEBUG_FLAGS flags,
DEBUG_MODE mode,
DEBUG_CALLBACK callback,
string filename
);
JavaScript Syntax
FMOD.Debug_Initialize(
flags,
);
Parameters
flags
Mask of bits representing the desired log information. Note: LOG implies
WARN and WARN implies ERROR.
mode
callback
Callback to use when mode is set to callback, only required when using that
mode.
filename
Filename to use when mode is set to file, only required when using that mode.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
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.
See Also
FMOD_DEBUG_FLAGS
FMOD_DEBUG_MODE
FMOD_DEBUG_CALLBACK
C++ Syntax
FMOD_RESULT File_GetDiskBusy(
int *busy
);
C Syntax
FMOD_RESULT FMOD_File_GetDiskBusy(
int *busy
);
Parameters
busy
Address of an integer to receive the busy state of the disk at the current time.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Do not use this function to syncrhonize 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 call this function, internally FMOD might set it to busy. Use
File_SetDiskBusy for proper mutual exclusion as it uses semaphores.
See Also
File_SetDiskBusy
C++ Syntax
FMOD_RESULT File_SetDiskBusy(
int busy
);
C Syntax
FMOD_RESULT FMOD_File_SetDiskBusy(
int busy
);
Parameters
busy
1 = you are about to perform a disk access. 0 = you are finished with the disk.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use this function as a wrapper around your own file reading functions if you
want to do simulatenous file reading while FMOD is also reading. ie
FMOD_File_SetDiskBusy(1);
myfread(...);
FMOD_File_SetDiskBusy(0);
Warning! This is a critical section internally. If you do not match your busy =
true with a busy = false your program may hang!
If you forget to set diskbusy to false it will stop FMOD from reading from the
disk.
See Also
File_GetDiskBusy
C++ Syntax
FMOD_RESULT Memory_GetStats(
int *currentalloced,
int *maxalloced,
bool blocking
);
C Syntax
FMOD_RESULT FMOD_Memory_GetStats(
int *currentalloced,
int *maxalloced,
FMOD_BOOL blocking
);
C# Syntax
static RESULT Memory.GetStats(
out int currentalloced,
out int maxalloced,
bool blocking
);
JavaScript Syntax
FMOD.Memory_GetStats(
currentalloced,,
maxalloced,,
blocking,
);
Parameters
currentalloced
maxalloced
blocking
Boolean indicating whether to favour speed or accuracy. Specifying true for this
parameter will flush the DSP network to make sure all queued allocations
happen immediately, which can be costly.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This is useful for determining a fixed memory size to make FMOD work within
for fixed memory machines such as consoles.
C++ Syntax
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
);
C Syntax
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
);
C# Syntax
static RESULT Memory.Initialize(
IntPtr poolmem,
int poollen,
MEMORY_ALLOC_CALLBACK useralloc,
MEMORY_REALLOC_CALLBACK userrealloc,
MEMORY_FREE_CALLBACK userfree,
MEMORY_TYPE memtypeflags
);
JavaScript Syntax
FMOD.Memory_Initialize(
poolmem,,
poollen,,
useralloc,,
userrealloc,,
userfree,,
memtypeflags,
);
Parameters
poolmem
If you want a fixed block of memory for FMOD to use, pass it in here. Specify
the length in poollen. Specifying NULL doesn't use internal management and it
relies on callbacks.
poollen
Length in bytes of the pool of memory for FMOD to use specified in poolmem.
Specifying 0 turns off internal memory management and relies purely on
callbacks. Length must be a multiple of 512.
useralloc
Only supported if pool is NULL. Otherwise it overrides the FMOD internal calls
to alloc. Compatible with ansi malloc().
userrealloc
Only supported if pool is NULL. Otherwise it overrides the FMOD internal calls
to realloc. Compatible with ansi realloc().
userfree
Only supported if pool is NULL. Otherwise it overrides the FMOD internal calls
to free. Compatible with ansi free().
memtypeflags
This function is useful for systems that want FMOD to use their own memory
management or for fixed memory devices such as Xbox360 that don't want any
allocations occurring out of their control causing fragmentation or unpredictable
overflows in a tight memory space.
FMOD mainly does allocation when creating streams, music or samples and the
System::init stage. It will rarely allocate or deallocate memory during the course
of runtime processing.
To find out the required fixed size the user can 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.
FMOD behaves differently based on what you pass into this function in 3
different combinations. For example:
FMOD::Memory_Initialize(NULL, 0, NULL, NULL, NULL, FMOD_MEMORY_ALL
FMOD::Memory_Initialize(NULL, 0, myalloc, myrealloc, myfree, FMOD_MEMORY_ALL
FMOD::Memory_Initialize(ptr, len, NULL, NULL, NULL, FMOD_MEMORY_ALL
NOTE! 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
FMOD_MEMORY_ALLOC_CALLBACK
FMOD_MEMORY_REALLOC_CALLBACK
FMOD_MEMORY_FREE_CALLBACK
Memory_GetStats
C++ Syntax
FMOD_RESULT System_Create(
FMOD::System **system
);
C Syntax
FMOD_RESULT FMOD_System_Create(
FMOD_SYSTEM **system
);
C# Syntax
static RESULT Factory.System_Create(
out System system
);
JavaScript Syntax
FMOD.System_Create(
system,
);
Parameters
system
Address of a pointer that receives the new FMOD System object. HTML5 Note
- the object is written to system.val
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use System::release to free a system object.
JavaScript Syntax
FMOD.FS_createPreloadedFile(
foldername, // (string). Parent folder, ie '/'
filename, // (string). Filename to preload.
url, // (string). Path inside parent folder. ie the subdir
canread, // (boolean). Whether the file should have read permi
canwrite // (boolean). Whether the file should have write perm
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
JavaScript Syntax
FMOD.Memory_Free(
memory, // Memory object supplied by a previous FMOD function
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Note! Currently FMOD.ReadFile is the only function that returns an object with
memory allocated by FMOD.
JavaScript Syntax
FMOD.ReadFile(
system, // FMOD::System object handle
filename, // (string) Filename of the file that is to be loaded, th
output, // The variable with the allocated memory containing the
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The filename can be used to load a file that has been preloaded with
FMOD.FS_createPreloadedFile
Note! The memory for the file is allocated internally in FMOD from the JS heap,
so needs to be freed with FMOD.Memory_Free when not needed any more.
JavaScript Syntax
FMOD.setValue(
address, // Memory address returned by an FMOD function. See rem
value, // (number) A value which can be an integer or a real/fl
format // (string) A format 'string' which identifies which typ
);
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
See https://kripken.github.io/emscripten-
site/docs/api_reference/preamble.js.html#accessing-memory for docs on
setValue.
'address' is a memory address, and only FMOD functions will return a memory
address. Examples of this would be
1. buffer parameter of the FMOD_FILE_READ_CALLBACK
2. data parameter of the FMOD_CREATESOUNDEXINFO::pcmreadcallback,
3. buffer parameter of the FMOD_STUDIO_BANK_INFO::readcallback
'format' can be values like 'i8', 'i16', 'i32', 'i64', 'float', 'double' typically.
C/C++ Syntax
float F_CALLBACK FMOD_3D_ROLLOFF_CALLBACK(
FMOD_CHANNEL *channel,
float distance
);
Parameters
channel
distance
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CHANNELCONTROL_CALLBACK(
FMOD_CHANNELCONTROL *channel,
FMOD_CHANNELCONTROL_TYPE controltype,
FMOD_CHANNELCONTROL_CALLBACK_TYPE callbacktype,
void *commanddata1,
void *commanddata2
);
Parameters
channel
controltype
callbacktype
commanddata1
The first callback type specific data generated by the callback. See remarks for
meaning.
commanddata2
The second callback type specific data generated by the callback. See remarks
for meaning.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Casting the channel handle
The 'channel' argument can be used when calling functions that are common to
Channel and Channelgroup. It can be cast to FMOD::ChannelControl* for C++.
If a Channel or Channelgroup specific function is needed the 'controltype'
argument can be used. The 'controltype' argument is either:
FMOD_CHANNELCONTROL_CHANNEL
C++: The 'channel' argument can be cast FMOD::Channel*
C: The 'channel' argument can be cast to FMOD_CHANNEL*
FMOD_CHANNELCONTROL_CHANNELGROUP
C++: The 'channel' argument can be cast to FMOD::ChannelGroup*
C: The 'channel' argument can be cast to FMOD_CHANNELGROUP*
FMOD_CHANNELCONTROL_CALLBACK_END
commanddata1: Always 0.
commanddata2: Always 0.
FMOD_CHANNELCONTROL_CALLBACK_VIRTUALVOICE
commanddata1: (cast to int) 0 when voice is swapped from emulated to
real. 1 when voice is swapped from real to emulated.
commanddata2: Always 0.
FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT
commanddata1: (cast to int) The index of the sync point. Use
Sound::getSyncPointInfo to retrieve the sync point's attributes.
commanddata2: Always 0.
FMOD_CHANNELCONTROL_CALLBACK_OCCLUSION
commanddata1: (cast to float *) pointer to a floating point direct value
that can be read (dereferenced) and modified after the geometry engine has
calculated it for this channel.
commanddata2: (cast to float *) pointer to a floating point reverb value
that can be read (dereferenced) and modified after the geometry engine has
calculated it for this channel.
Note! Currently the user must call System::update for these callbacks to trigger!
See Also
Channel::setCallback
FMOD_CHANNELCONTROL_CALLBACK_TYPE
System::update
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_CLOSE_CALLBACK(
FMOD_CODEC_STATE *codec_state
);
Parameters
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin
specific variables and plugin writer user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_CODEC_STATE
FMOD_CODEC_DESCRIPTION
FMOD_CODEC_OPEN_CALLBACK
FMOD_CODEC_READ_CALLBACK
FMOD_CODEC_GETLENGTH_CALLBACK
FMOD_CODEC_SETPOSITION_CALLBACK
FMOD_CODEC_GETPOSITION_CALLBACK
FMOD_CODEC_SOUNDCREATE_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_GETLENGTH_CALLBACK(
FMOD_CODEC_STATE *codec_state,
unsigned int *length,
FMOD_TIMEUNIT lengthtype
);
Parameters
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin
specific variables and plugin writer user data.
length
Address of a variable that is to receive the length of the sound determined by the
format specified in the lengttype parameter.
lengthtype
Timeunit type of length to return. This will be one of the timeunits supplied by
the codec author in the FMOD_CODEC_DESCRIPTION structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_TIMEUNIT
FMOD_CODEC_STATE
FMOD_CODEC_DESCRIPTION
FMOD_CODEC_OPEN_CALLBACK
FMOD_CODEC_CLOSE_CALLBACK
FMOD_CODEC_READ_CALLBACK
FMOD_CODEC_SETPOSITION_CALLBACK
FMOD_CODEC_GETPOSITION_CALLBACK
FMOD_CODEC_SOUNDCREATE_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_GETPOSITION_CALLBACK(
FMOD_CODEC_STATE *codec_state,
unsigned int *position,
FMOD_TIMEUNIT postype
);
Parameters
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin
specific variables and plugin writer user data.
position
Address of a variable to receive the current position in the codec based on the
timeunit specified in the postype parameter.
postype
Timeunit type of the position parameter that is requested. This will be one of the
timeunits supplied by the codec author in the FMOD_CODEC_DESCRIPTION
structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
Channel::getPosition
FMOD_CODEC_STATE
FMOD_CODEC_DESCRIPTION
FMOD_CODEC_OPEN_CALLBACK
FMOD_CODEC_CLOSE_CALLBACK
FMOD_CODEC_READ_CALLBACK
FMOD_CODEC_GETLENGTH_CALLBACK
FMOD_CODEC_SETPOSITION_CALLBACK
FMOD_CODEC_SOUNDCREATE_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_METADATA_CALLBACK(
FMOD_CODEC_STATE *codec_state,
FMOD_TAGTYPE type,
char *name,
void *data,
unsigned int datalen,
FMOD_TAGDATATYPE datatype,
int unique
);
Parameters
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin
specific variables and plugin writer user data.
type
Source of tag being updated, ie id3v2 or oggvorbis tag for example. See
FMOD_TAGDATATYPE.
name
data
Contents of tag.
datalen
datatype
unique
If this is true, then the tag (determined by the name) being updated is the only
one of its type. If it is false then there are multiple versions of this tag with the
same name.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This callback is usually called from sounds that can udate their metadata / tag
info at runtime. Such a sound could be an internet SHOUTcast / Icecast stream
for example.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_OPEN_CALLBACK(
FMOD_CODEC_STATE *codec_state,
FMOD_MODE usermode,
FMOD_CREATESOUNDEXINFO *userexinfo
);
Parameters
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin
specific variables and plugin writer user data.
usermode
Mode that the user supplied via System::createSound. This is informational and
can be ignored, or used if it has relevance to your codec.
userexinfo
Extra info structure that the user supplied via System::createSound. This is
informational and can be ignored, or used if it has relevance to your codec.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The usermode and userexinfo parameters tell the codec what was passed in by
the user.
Generally these can be ignored, as the file format usually determines the format
and frequency of the sound.
If you have a flexible format codec (ie you don't mind what output format your
codec writes to), you might want to use the parameter that was passed in by the
user to specify the output sound format / frequency.
For example if you normally create a codec that is always 32bit floating point,
the user might supply 16bit integer to save memory, so you could use this
information to decode your data to this format instead of the original default
format.
Read and seek within the file using the 'fileread' and 'fileseek' members of the
FMOD_CODEC codec that is passed in.
Note: DO NOT USE YOUR OWN FILESYSTEM.
The reasons for this are:
The user may have set their own file system via user filesystem callbacks.
FMOD allows file reading via disk, memory and TCP/IP. If you use your
own file routines you will lose this ability.
Important! FMOD will ping all codecs trying to find the right one for the file
the user has passed in. Make sure the first line of your codec open is a FAST
format check. Ie it reads an identifying string, checks it and returns an error
FMOD_ERR_FORMAT if it is not found.
There may be a lot of codecs loaded into FMOD, so you don't want yours
slowing down the System::createSound call because it is inneficient in
determining if it is the right format or not.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_READ_CALLBACK(
FMOD_CODEC_STATE *codec_state,
void *buffer,
unsigned int samples_in,
unsigned int *samples_out
);
Parameters
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin
specific variables and plugin writer user data.
buffer
Buffer to read PCM data to. Note that the format of this data is the format
described in FMOD_CODEC_WAVEFORMAT.
samples_in
samples_out
Read and seek within the file using the 'fileread' and 'fileseek' members of the
FMOD_CODEC codec that is passed in.
Note: DO NOT USE YOUR OWN FILESYSTEM.
The reasons for this are:
The user may have set their own file system via user filesystem callbacks.
FMOD allows file reading via disk, memory and TCP/IP. If you use your
own file routines you will lose this ability.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_SETPOSITION_CALLBACK(
FMOD_CODEC_STATE *codec_state,
int subsound,
unsigned int position,
FMOD_TIMEUNIT postype
);
Parameters
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin
specific variables and plugin writer user data.
subsound
position
Position to seek to in the sound based on the timeunit specified in the postype
parameter.
postype
Timeunit type of the position parameter. This will be one of the timeunits
supplied by the codec author in the FMOD_CODEC_DESCRIPTION structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Read and seek within the file using the 'fileread' and 'fileseek' members of the
FMOD_CODEC codec that is passed in.
Note: DO NOT USE YOUR OWN FILESYSTEM.
The reasons for this are:
The user may have set their own file system via user filesystem callbacks.
FMOD allows file reading via disk, memory and TCP/IP. If you use your
own file routines you will lose this ability.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_SOUNDCREATE_CALLBACK(
FMOD_CODEC_STATE *codec_state,
int subsound,
FMOD_SOUND *sound
);
Parameters
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin
specific variables and plugin writer user data.
subsound
sound
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DEBUG_CALLBACK(
FMOD_DEBUG_FLAGS flags,
const char *file,
int line,
const char *func,
const char *message
);
Parameters
flags
file
line
func
message
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_CREATE_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
System::createDSP
System::createDSPByType
System::createDSPByPlugin
Sometimes a user will re-use a DSP unit instead of releasing it and creating a
new one, so it may be useful to implement FMOD_DSP_RESET_CALLBACK
to reset any variables or buffers when the user calls it.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_DIALOG_CALLBACK(
FMOD_DSP_STATE *dsp_state,
void *hwnd,
int show
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
hwnd
This is the target hwnd to display the dialog in. It must not pop up on this hwnd,
it must actually be drawn within it.
show
DSP::showConfigDialog.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_GETPARAM_BOOL_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
FMOD_BOOL *value,
char *valuestr
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
index
The index into the parameter list for the parameter the user wants to get.
value
valuestr
A pointer to a string to receive the value of the selected parameter, but in text
form. This might be useful to display words instead of numbers. For example
"ON" or "OFF" instead of 1.0 and 0.0. The length of the buffer being passed in is
always 16 bytes, so do not exceed this. Note: This pointer will be 0 / NULL if a
string is not required.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
DSP::getParameterBool.
FMOD_DSP_GETPARAM_BOOL_CALLBACK.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_GETPARAM_DATA_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
void **value,
unsigned int *length,
char *valuestr
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
index
The index into the parameter list for the parameter the user wants to get.
value
length
valuestr
A pointer to a string to receive the value of the selected parameter, but in text
form. This might be useful to display words instead of numbers. For example
"ON" or "OFF" instead of 1.0 and 0.0. The length of the buffer being passed in is
always 16 bytes, so do not exceed this. Note: This pointer will be 0 / NULL if a
string is not required.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
DSP::getParameterData.
FMOD_DSP_GETPARAM_DATA_CALLBACK.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_GETPARAM_FLOAT_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
float *value,
char *valuestr
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
index
The index into the parameter list for the parameter the user wants to get.
value
valuestr
A pointer to a string to receive the value of the selected parameter, but in text
form. This might be useful to display words instead of numbers. For example
"ON" or "OFF" instead of 1.0 and 0.0. The length of the buffer being passed in is
always 16 bytes, so do not exceed this. Note: This pointer will be 0 / NULL if a
string is not required.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
DSP::getParameterFloat.
FMOD_DSP_GETPARAM_FLOAT_CALLBACK.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_GETPARAM_INT_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
int *value,
char *valuestr
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
index
The index into the parameter list for the parameter the user wants to get.
value
valuestr
A pointer to a string to receive the value of the selected parameter, but in text
form. This might be useful to display words instead of numbers. For example
"ON" or "OFF" instead of 1.0 and 0.0. The length of the buffer being passed in is
always 16 bytes, so do not exceed this. Note: This pointer will be 0 / NULL if a
string is not required.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
DSP::getParameterInt.
FMOD_DSP_GETPARAM_INT_CALLBACK.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_PROCESS_CALLBACK(
FMOD_DSP_STATE *dsp_state,
unsigned int length,
const FMOD_DSP_BUFFER_ARRAY *inbufferarray,
FMOD_DSP_BUFFER_ARRAY *outbufferarray,
bool inputsidle,
FMOD_DSP_PROCESS_OPERATION op
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
length
The length of the incoming and outgoing buffer in samples. To get the length of
the buffer in bytes, the user must multiply this number by the number of
channels coming in (and out, they may be different) and then multiply by 4 for 1
float = 4 bytes.
inbufferarray
outbufferarray
inputsidle
This is true if no audio is being fed to this unit. Generally used when the
FMOD_DSP_PROCESS_OPERATION is set to
FMOD_DSP_PROCESS_QUERY, so the FMOD_DSP_PROCESS_PERFORM
step can be skipped. Code can then either skip processing, or return silence. If
the FMOD_DSP_PROCESS_OPERATION is set to set a countdown timer
based on the tail length of their effect and then call
FMOD_ERR_DSP_DONTPROCESS, or just immediately return
FMOD_ERR_DSP_DONTPROCESS if no further processing is required.
op
Either FMOD_DSP_PROCESS_QUERY or
FMOD_DSP_PROCESS_PERFORM. FMOD_DSP_PROCESS_QUERY is
only for the purpose of returning FMOD_OK or
FMOD_ERR_DSP_DONTPROCESS. Do not process data in this callback! If op
is FMOD_DSP_PROCESS_PERFORM then process the input (optionally) and
write to the output.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Return FMOD_ERR_DSP_SILENCE if the effect is generating silence, so
FMOD's mixer can optimize the signal path and not process it any more.
See Also
FMOD_DSP_PROCESS_OPERATION
FMOD_DSP_READ_CALLBACK
FMOD_DSP_SHOULDIPROCESS_CALLBACK
FMOD_DSP_DESCRIPTION
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_READ_CALLBACK(
FMOD_DSP_STATE *dsp_state,
float *inbuffer,
float *outbuffer,
unsigned int length,
int inchannels,
int *outchannels
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
inbuffer
outbuffer
Pointer to outgoing floating point -1.0 to +1.0 ranged data. The dsp writer must
write to this pointer else there will be silence.
length
The length of the incoming and outgoing buffer in samples. To get the length of
the buffer in bytes, the user must multiply this number by the number of
channels coming in (and out, they may be different) and then multiply by 4 for 1
float = 4 bytes.
inchannels
outchannels
None
This callback is called automatically and periodically when the DSP engine
updates.
For a read update to be called it would have to be enabled, and this is done with
DSP::setActive.
The range of -1 to 1 is a soft limit. In the case of the inbuffer it is not guaranteed
to be in that range, and in the case of the outbuffer FMOD will accept values
outside that range. However all values will be clamped to the range of -1 to 1 in
the final mix.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_RELEASE_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
DSP::release
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_RESET_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This callback is called on all plugins inside an event whenever the event is
started (for example by Studio::EventInstance::start).
It is also useful if (for example) an effect is still holding audio data for a sound
that has stopped, and is being relocated to a new sound. Resetting the unit would
clear any buffers and get it ready for new sound data.
Note that this callback should not change any public parameters that are exposed
via FMOD_DSP_DESCRIPTION.paramdesc, but should instead reset the
internal state to match the public parameter values.
Functions that the user would have to call for this callback to be called:
DSP::reset
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SETPARAM_BOOL_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
FMOD_BOOL value
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
index
The index into the parameter list for the parameter the user wants to set.
value
The value passed in by the user to set for the selected parameter.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
DSP::setParameterBool.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SETPARAM_DATA_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
void *value,
unsigned int length
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
index
The index into the parameter list for the parameter the user wants to set.
value
length
Functions that the user would have to call for this callback to be called.
DSP::setParameterData.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SETPARAM_FLOAT_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
float value
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
index
The index into the parameter list for the parameter the user wants to set.
value
The value passed in by the user to set for the selected parameter.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
DSP::setParameterFloat.
Range checking is not needed. FMOD will clamp the incoming value to the
specified min/max.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SETPARAM_INT_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
int value
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
index
The index into the parameter list for the parameter the user wants to set.
value
The value passed in by the user to set for the selected parameter.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
DSP::setParameterInt.
Range checking is not needed. FMOD will clamp the incoming value to the
specified min/max.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SETPOSITION_CALLBACK(
FMOD_DSP_STATE *dsp_state,
unsigned int position
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
position
Position in channel stream to set to. Units are PCM samples (ie
FMOD_TIMEUNIT_PCM).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Functions that the user would have to call for this callback to be called.
Channel::setPosition.
If a DSP unit is attached to a channel and the user calls Channel::setPosition then
this funciton will be called.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SHOULDIPROCESS_CALLBACK(
FMOD_DSP_STATE *dsp_state,
bool inputsidle,
unsigned int length,
FMOD_CHANNELMASK inmask,
int inchannels,
FMOD_SPEAKERMODE speakermode
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The handle to the user created DSP handle is stored within the
FMOD_DSP_STATE structure.
inputsidle
This is true if no audio is being fed to this unit. Code can then either set a
countdown timer based on the tail length of their effect and then call
FMOD_ERR_DSP_DONTPROCESS, or just immediately return
FMOD_ERR_DSP_DONTPROCESS if no further processing is required.
length
The length of the incoming and outgoing buffer in samples. To get the length of
the buffer in bytes, the user must multiply this number by the number of
channels coming in (and out, they may be different) and then multiply by 4 for 1
float = 4 bytes.
inmask
inchannels
The number of channels of PCM data in the coming input. A mono signal
coming in would be 1. A stereo signal coming in would be 2.
speakermode
A speakermode that corresponds to the channel count and channel mask. Default
is FMOD_SPEAKERMODE_DEFAULT. Where it would differ, is if the
channel count is lower than the specified speaker mode's channel count, ie 1
channel could be specified, and use FMOD_SPEAKERMODE_5POINT1 as the
speaker mode, and the mask could tell the callback that it is
FMOD_CHANNELMASK_LOW_FREQUENCY.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
An example of an effect that would continue processing silence would be an
echo or reverb effect that needs to play a tail sound until it fades out to silence.
At that point it could return FMOD_ERR_DSP_SILENCE as well.
NOTE: Effects that do not stop processing may keep the signal chain alive when
it is not desirable to do so. In the case of FMOD Studio it may result in events
that keep playing indefinitely.
The following code can be used for DSP effects that have no tail:
static FMOD_RESULT F_CALLBACK shouldIProcess(FMOD_DSP_STATE *dsp_state, bool in
{
if (inputsidle)
{
return FMOD_ERR_DSP_SILENCE;
}
return FMOD_OK;
}
See Also
FMOD_DSP_STATE
FMOD_DSP_READ_CALLBACK
FMOD_DSP_DESCRIPTION
FMOD_RESULT
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The instance pointer in the state for this callback will be 0 / null.
Only 'systemobject' and 'callbacks' are valid for use.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The callback is not associated with any DSP instance, so the instance member of
FMOD_DSP_STATE will be 0 / NULL. Functions that the user would have to
call for this callback to be called.
DSP::release
System::close
System::release.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SYSTEM_MIX_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int stage
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The instance pointer in the state for this callback will be 0 / null.
Only 'systemobject' and 'callbacks' are valid for use.
stage
0 = premix, or before the mixer has executed. 1 = postmix, or after the after the
mix has been executed. 2 = midmix, after clocks calculation before the main mix
has occurred.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The callback is not associated with any DSP instance, so the instance member of
FMOD_DSP_STATE will be 0 / NULL. The callback is triggered automatically
by the mixer and is not triggered by any API function. Remember to return
FMOD_OK at the bottom of the function, or an appropriate error code from
FMOD_RESULT.
See Also
FMOD_DSP_STATE
FMOD_DSP_DESCRIPTION
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_DSP_SYSTEM_REGISTER_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Parameters
dsp_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data. Do not cast this to
FMOD_DSP! The instance pointer in the state for this callback will be 0 / null.
Only 'systemobject' and 'callbacks' are valid for use.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The callback is not associated with any DSP instance, so the instance member of
FMOD_DSP_STATE will be 0 / NULL. Functions that the user would have to
call for this callback to be called.
System::loadPlugin
System::registerDSP
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_FILE_ASYNCCANCEL_CALLBACK(
FMOD_ASYNCREADINFO *info,
void *userdata
);
Parameters
info
userdata
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_FILE_ASYNCDONE_FUNC(
FMOD_ASYNCREADINFO *info,
FMOD_RESULT result
);
Parameters
info
result
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_FILE_ASYNCREAD_CALLBACK(
FMOD_ASYNCREADINFO *info,
void *userdata
);
Parameters
info
userdata
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_FILE_CLOSE_CALLBACK(
void *handle,
void *userdata
);
Parameters
handle
This is the handle returned from the open callback to use for your own file
routines.
userdata
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_FILE_OPEN_CALLBACK(
const char *name,
unsigned int *filesize,
void **handle,
void *userdata
);
Parameters
name
This is the filename passed in by the user. You may treat this as you like.
filesize
handle
This is to store a handle generated by the user. This will be the handle that gets
passed into the other callbacks. Optional but may be needed.
userdata
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_FILE_READ_CALLBACK(
void *handle,
void *buffer,
unsigned int sizebytes,
unsigned int *bytesread,
void *userdata
);
Parameters
handle
This is the handle you returned from the open callback to use for your own file
routines.
buffer
sizebytes
bytesread
userdata
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_FILE_SEEK_CALLBACK(
void *handle,
unsigned int pos,
void *userdata
);
Parameters
handle
This is the handle returned from the open callback to use for your own file
routines.
pos
userdata
C/C++ Syntax
void * F_CALLBACK FMOD_MEMORY_ALLOC_CALLBACK(
unsigned int size,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
Parameters
size
type
sourcestr
Only valid (not null) in logging versions of FMOD. Gives a string with the fmod
source code filename and line number in it, for better resource tracking.
Return Values
On success, a pointer to the newly allocated block of memory is returned.
On failure, NULL is returned.
Remarks
Returning an aligned pointer, of 16 byte alignment is recommended for speed
purposes.
See Also
Memory_Initialize
Memory_GetStats
FMOD_MEMORY_REALLOC_CALLBACK
FMOD_MEMORY_FREE_CALLBACK
FMOD_MEMORY_TYPE
C/C++ Syntax
void F_CALLBACK FMOD_MEMORY_FREE_CALLBACK(
void *ptr,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
Parameters
ptr
type
sourcestr
Only valid (not null) in logging versions of FMOD. Gives a string with the fmod
source code filename and line number in it, for better resource tracking.
Return Values
void
See Also
Memory_Initialize
Memory_GetStats
FMOD_MEMORY_ALLOC_CALLBACK
FMOD_MEMORY_REALLOC_CALLBACK
FMOD_MEMORY_TYPE
C/C++ Syntax
void * F_CALLBACK FMOD_MEMORY_REALLOC_CALLBACK(
void *ptr,
unsigned int size,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
Parameters
ptr
size
type
sourcestr
Only valid (not null) in logging versions of FMOD. Gives a string with the fmod
source code filename and line number in it, for better resource tracking.
Return Values
On success, a pointer to the newly re-allocated block of memory is returned.
On failure, NULL is returned.
Remarks
Returning an aligned pointer, of 16 byte alignment is recommended for speed
purposes.
See Also
Memory_Initialize
Memory_GetStats
FMOD_MEMORY_ALLOC_CALLBACK
FMOD_MEMORY_FREE_CALLBACK
FMOD_MEMORY_TYPE
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_CLOSE_CALLBACK(
FMOD_OUTPUT_STATE *output_state
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
System::release
System::close
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_GETDRIVERINFO_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
int id,
char *name,
int namelen,
FMOD_GUID *guid,
int *systemrate,
FMOD_SPEAKERMODE *speakermode,
int *speakermodechannels
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
id
name
namelen
guid
Pointer to a GUID structure for the user to fill in. A unique indentifier here can
be used to identify a driver rather than the string.
systemrate
speakermode
speakermodechannels
The speaker mode associated channels the output device prefers. Leave at 0 to
remain flexible. More relevant with FMOD_SPEAKERMODE_RAW. This will
be ignored with other speaker modes.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
System::getDriverInfo
System::getNumDrivers
FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_GETHANDLE_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
void **handle
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
handle
Address of a variable to receieve the current plugin's output 'handle'. This is only
if the plugin writer wants to allow the user access to the main handle behind the
plugin (for example the file handle in a file writer plugin). The pointer type must
be published to the user somehow, as is done in fmod.h.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
System::getOutputHandle
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
int *numdrivers
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
numdrivers
The internal FMOD output thread calls this function periodically to determine if
it should ask for a block of audio data or not.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_GETPOSITION_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
unsigned int *pcm
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
pcm
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
FMOD_OUTPUT_LOCK_CALLBACK
FMOD_OUTPUT_UNLOCK_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_INIT_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
int selecteddriver,
FMOD_INITFLAGS flags,
int *outputrate,
FMOD_SPEAKERMODE *speakermode,
int *speakermodechannels,
FMOD_SOUND_FORMAT *outputformat,
int dspbufferlength,
int dspnumbuffers,
void *extradriverdata
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
selecteddriver
This is the selected driver id that the user chose from calling System::setDriver.
flags
outputrate
Output rate selected by the user. If not possible, change the rate to the closest
match. FMOD will resample from the rate requested to your rate if they do not
match.
speakermode
Speaker mode selected by the user. If not possible, change the speaker mode to
the closest match. FMOD will upmix or downmix to the requested speaker mode
if they do not match.
speakermodechannels
Speaker mode channel count selected by the user. For example 1 = mono output.
2 = stereo output. Needed if supporting FMOD_SPEAKERMODE_RAW,
otherwise it is informational.
outputformat
Size of the buffer fmod will mix to in one mix update. This value is in PCM
samples.
dspnumbuffers
extradriverdata
Data passed in by the user specific to this driver. May be used for any purpose.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
System::init
System::setDriver
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_LOCK_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
unsigned int offset,
unsigned int length,
void **ptr1,
void **ptr2,
unsigned int *len1,
unsigned int *len2
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
offset
Offset in bytes to the position the caller wants to lock in the sample buffer.
length
ptr1
Address of a pointer that will point to the first part of the locked data.
ptr2
Address of a pointer that will point to the second part of the locked data. This
will be null if the data locked hasn't wrapped at the end of the buffer.
len1
len2
Length of data in bytes that was locked for ptr2. This will be 0 if the data locked
hasn't wrapped at the end of the buffer.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
FMOD_OUTPUT_UNLOCK_CALLBACK
FMOD_OUTPUT_GETPOSITION_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_MIXER_CALLBACK(
FMOD_OUTPUT_STATE *output_state
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Called repeatedly to give a thread for waiting on an audio hardware
synchronization primitive, used in conjunction with
FMOD_OUTPUT_READFROMMIXER.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
void **object3d
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
object3d
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_OBJECT3DFREE_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
void *object3d
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
object3d
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
int *maxhardwareobjects
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
maxhardwareobjects
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
void *object3d,
const FMOD_OUTPUT_OBJECT3DINFO *info
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
object3d
info
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_READFROMMIXER(
FMOD_OUTPUT_STATE *output_state,
void *buffer,
unsigned int length
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
buffer
Plugin-writer provided memory for the FMOD Studio mixer to write to.
length
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_START_CALLBACK(
FMOD_OUTPUT_STATE *output_state
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
FMOD_OUTPUT_STOP_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_STOP_CALLBACK(
FMOD_OUTPUT_STATE *output_state
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
FMOD_OUTPUT_START_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_UNLOCK_CALLBACK(
FMOD_OUTPUT_STATE *output_state,
void *ptr1,
void *ptr2,
unsigned int len1,
unsigned int len2
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
ptr1
ptr2
len1
len2
Length of data in bytes that was locked for ptr2. This will be 0 if the data locked
hasn't wrapped at the end of the buffer.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is normally called after data has been read/written to from
Sound::lock. This function will do any post processing nescessary and if needed,
send it to sound ram.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
FMOD_OUTPUT_LOCK_CALLBACK
FMOD_OUTPUT_GETPOSITION_CALLBACK
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_OUTPUT_UPDATE_CALLBACK(
FMOD_OUTPUT_STATE *output_state
);
Parameters
output_state
Pointer to the plugin state. The user can use this variable to access runtime
plugin specific variables and plugin writer user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Remember to return FMOD_OK at the bottom of the function, or an appropriate
error code from FMOD_RESULT.
See Also
FMOD_OUTPUT_DESCRIPTION
FMOD_OUTPUT_STATE
System::update
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_SOUND_NONBLOCK_CALLBACK(
FMOD_SOUND *sound,
FMOD_RESULT result
);
Parameters
sound
result
Note that for non blocking streams a seek could occur when restarting the sound
after the first playthrough. This will result in a callback being triggered again.
Since this callback can occur from the async thread, there are restrictions about
what functions can be called during the callback. All Sound functions are safe to
call, except for Sound::setSoundGroup and Sound::release. It is also safe to call
System::getUserData. The rest of the Low Level API and the Studio API is not
allowed. Calling a non-allowed function will return
FMOD_ERR_INVALID_THREAD.
See Also
System::createSound
FMOD_CREATESOUNDEXINFO
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_SOUND_PCMREAD_CALLBACK(
FMOD_SOUND *sound,
void *data,
unsigned int datalen
);
Parameters
sound
data
Pointer to raw PCM data that the user can either read or write to.
datalen
The format of the sound can be retrieved with Sound::getFormat from this
callback. This will allow the user to determine what type of pointer to use if they
are not sure what format the sound is.
If the callback is used for the purpose of 'piggybacking' normal FMOD sound
loads, then you do not have to do anything at all, and it can be treated as purely
informational. The return value is also ignored.
See Also
Sound::getFormat
FMOD_SOUND_PCMSETPOS_CALLBACK
System::createSound
System::createStream
FMOD_CREATESOUNDEXINFO
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_SOUND_PCMSETPOS_CALLBACK(
FMOD_SOUND *sound,
int subsound,
unsigned int position,
FMOD_TIMEUNIT postype
);
Parameters
sound
subsound
In a multi subsound type sound (ie fsb/dls), this will contain the index into the
list of sounds.
position
Position to seek to that has been requested. This value will be of format
FMOD_TIMEUNIT and must be parsed to determine what it is. Generally
FMOD_TIMEUNIT_PCM will be the most common format.
postype
Position type that the user wanted to seek with. If the sound is a user create
sound and the seek type is unsupported return FMOD_ERR_FORMAT.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
C++ Users. Cast FMOD_SOUND * to FMOD::Sound * inside the callback and use as
normal.
If the callback is used for the purpose of 'piggybacking' normal FMOD sound
loads, then you do not have to do anything at all, and it can be treated as purely
informational. The return value is also ignored.
See Also
FMOD_SOUND_PCMREAD_CALLBACK
System::createSound
System::createStream
FMOD_CREATESOUNDEXINFO
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_SYSTEM_CALLBACK(
FMOD_SYSTEM *system,
FMOD_SYSTEM_CALLBACK_TYPE type,
void *commanddata1,
void *commanddata2,
void *userdata
);
Parameters
system
type
commanddata1
The first callback type specific data generated by the callback. See remarks for
meaning.
commanddata2
The second callback type specific data generated by the callback. See remarks
for meaning.
userdata
The userdata assigned into the given system, or NULL if not set. See remarks for
more information.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
C++ Users. Cast FMOD_SYSTEM * to FMOD::System * inside the callback and use
as normal.
FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED
commanddata1: Always 0.
commanddata2: Always 0.
FMOD_SYSTEM_CALLBACK_MEMORYALLOCATIONFAILED
commanddata1: A string (char*) which represents the file and line number
of the allocation inside FMOD.
commanddata2: The size (int) of the requested allocation.
FMOD_SYSTEM_CALLBACK_THREADCREATED
commanddata1: The handle of the created thread. See notes below for
thread handle types
commanddata2: A string (char*) which represents the name of the thread.
FMOD_SYSTEM_CALLBACK_THREADDESTROYED
commanddata1: The handle of the destroyed thread. See notes below for
thread handle types
commanddata2: A string (char*) which represents the name of the thread.
FMOD_SYSTEM_CALLBACK_BADDSPCONNECTION
commanddata1: Pointer to a FMOD::DSP object that was the target of the
DSP connection.
commanddata2: Pointer to a FMOD::DSP object that was the source of the
DSP connection.
FMOD_SYSTEM_CALLBACK_PREMIX
commanddata1: 0.
commanddata2: 0.
FMOD_SYSTEM_CALLBACK_MIDMIX
commanddata1: 0.
commanddata2: 0.
FMOD_SYSTEM_CALLBACK_POSTMIX
commanddata1: 0.
commanddata2: 0.
FMOD_SYSTEM_CALLBACK_ERROR
commanddata1: Pointer to a FMOD_ERRORCALLBACK_INFO structure
with extra information about the error.
commanddata2: 0.
switch (type)
{
case FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED:
{
int numdrivers;
return FMOD_OK;
}
See Also
System::setCallback
System::setUserData
FMOD_SYSTEM_CALLBACK_TYPE
System::update
C/C++ Syntax
typedef struct {
FMOD_VECTOR position;
FMOD_VECTOR velocity;
FMOD_VECTOR forward;
FMOD_VECTOR up;
} FMOD_3D_ATTRIBUTES;
Members
position
velocity
forward
The forwards orientation of the object. This vector must be of unit length (1.0)
and perpendicular to the up vector.
up
The upwards orientation of the object. This vector must be of unit length (1.0)
and perpendicular to the forward vector.
Remarks
Attributes should use your chosen coordinate system, see 3D sounds for more
information.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD._3D_ATTRIBUTES()",
no 'new' keyword is required.
See Also
FMOD_VECTOR
FMOD_DSP_PARAMETER_3DATTRIBUTES
C/C++ Syntax
typedef struct {
int cbSize;
int maxMPEGCodecs;
int maxADPCMCodecs;
int maxXMACodecs;
int maxVorbisCodecs;
int maxAT9Codecs;
int maxFADPCMCodecs;
int maxPCMCodecs;
int ASIONumChannels;
char **ASIOChannelList;
FMOD_SPEAKER *ASIOSpeakerList;
float HRTFMinAngle;
float HRTFMaxAngle;
float HRTFFreq;
float vol0virtualvol;
unsigned int defaultDecodeBufferSize;
unsigned short profilePort;
unsigned int geometryMaxFadeTime;
float distanceFilterCenterFreq;
int reverb3Dinstance;
int DSPBufferPoolSize;
unsigned int stackSizeStream;
unsigned int stackSizeNonBlocking;
unsigned int stackSizeMixer;
FMOD_DSP_RESAMPLER resamplerMethod;
unsigned int commandQueueSize;
unsigned int randomSeed;
} FMOD_ADVANCEDSETTINGS;
JavaScript Syntax
struct FMOD_ADVANCEDSETTINGS
{
maxMPEGCodecs,
maxADPCMCodecs,
maxXMACodecs,
maxVorbisCodecs,
maxAT9Codecs,
maxFADPCMCodecs,
maxPCMCodecs,
ASIONumChannels,
HRTFMinAngle,
HRTFMaxAngle,
HRTFFreq,
vol0virtualvol,
defaultDecodeBufferSize,
profilePort,
geometryMaxFadeTime,
distanceFilterCenterFreq,
reverb3Dinstance,
DSPBufferPoolSize,
stackSizeStream,
stackSizeNonBlocking,
stackSizeMixer,
resamplerMethod,
commandQueueSize,
randomSeed,
};
Members
cbSize
maxMPEGCodecs
maxADPCMCodecs
maxXMACodecs
maxVorbisCodecs
maxAT9Codecs
maxFADPCMCodecs
maxPCMCodecs
[r/w] Optional. Specify 0 to ignore. For use with PS3 only. PCM codecs
consume 2,536 bytes per instance and this number will determine how many
streams and PCM voices can be played simultaneously. Default = 32.
ASIONumChannels
ASIOChannelList
ASIOSpeakerList
[r/w] Optional. Specify 0 to ignore. Pointer to a list of speakers that the ASIO
channels map to. This can be called after System::init to remap ASIO output.
HRTFMinAngle
HRTFMaxAngle
HRTFFreq
[r/w] Unsupported. Deprecated API feature.
vol0virtualvol
defaultDecodeBufferSize
[r/w] Optional. Specify 0 to ignore. For streams. This determines the default size
of the double buffer (in milliseconds) that a stream uses. Default = 400ms
profilePort
geometryMaxFadeTime
distanceFilterCenterFreq
reverb3Dinstance
DSPBufferPoolSize
[r/w] Optional. Specify 0 to ignore. Number of buffers in DSP buffer pool. Each
buffer will be DSPBlockSize * sizeof(float) * SpeakerModeChannelCount. ie
7.1 @ 1024 DSP block size = 8 * 1024 * 4 = 32kb. Default = 8.
stackSizeStream
[r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD Stream
thread in bytes. Useful for custom codecs that use excess stack. Default 49,152
(48kb)
stackSizeNonBlocking
[r/w] Optional. Specify 0 to ignore. Specify the stack size for the
FMOD_NONBLOCKING loading thread. Useful for custom codecs that use
excess stack. Default 65,536 (64kb)
stackSizeMixer
[r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD mixer
thread. Useful for custom dsps that use excess stack. Default 49,152 (48kb)
resamplerMethod
commandQueueSize
[r/w] Optional. Specify 0 to ignore. Specify the command queue size for thread
safe processing. Default 2048 (2kb)
randomSeed
[r/w] Optional. Specify 0 to ignore. Seed value that FMOD will use to initialize
its internal random number generators.
Remarks
maxMPEGCodecs / maxADPCMCodecs / maxXMACodecs will determine the
maximum cpu usage of playing realtime samples. Use this to lower potential
excess cpu usage and also control memory usage.
maxPCMCodecs is for use with PS3 only. It will determine the maximum
number of PCM voices that can be played at once. This includes streams of any
format and all sounds created without the
FMOD_CREATECOMPRESSEDSAMPLE flag.
Memory will be allocated for codecs 'up front' (during System::init) if these
values are specified as non zero. If any are zero, it allocates memory for the
codec whenever a file of the type in question is loaded. So if maxMPEGCodecs
is 0 for example, it will allocate memory for the mpeg codecs the first time an
mp3 is loaded or an mp3 based .FSB file is loaded.
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
Members marked with [r/w] are either read or write depending on if you are
using System::setAdvancedSettings (w) or System::getAdvancedSettings (r).
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.ADVANCEDSETTINGS()", no 'new' keyword is required.
See Also
System::setAdvancedSettings
System::getAdvancedSettings
System::init
FMOD_MODE
C/C++ Syntax
typedef struct {
void *handle;
unsigned int offset;
unsigned int sizebytes;
int priority;
void *userdata;
void *buffer;
unsigned int bytesread;
FMOD_FILE_ASYNCDONE_FUNC done;
} FMOD_ASYNCREADINFO;
JavaScript Syntax
struct FMOD_ASYNCREADINFO
{
handle,
offset,
sizebytes,
priority,
userdata,
buffer,
bytesread,
done,
};
Members
handle
[r] The file handle that was filled out in the open callback.
offset
[r] Seek position, make sure you read from this file offset.
sizebytes
priority
[r] 0 = low importance. 100 = extremely important (ie 'must read now or
stuttering may occur')
userdata
[r/w] User data pointer specific to this request. Initially 0, can be ignored or set
by the user. Not related to the file's main userdata member.
buffer
bytesread
[w] Fill this in before setting result code to tell FMOD how many bytes were
read.
done
[r] FMOD file system wake up function. Call this when user file read is finished.
Pass result of file read as a parameter.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
Set result in the 'done' function pointer to the result expected from a normal file
read callback.
If the read was successful, set it to FMOD_OK.
If it read some data but hit the end of the file, set it to FMOD_ERR_FILE_EOF.
If a bad error occurred, return FMOD_ERR_FILE_BAD
If a disk was ejected, return FMOD_ERR_FILE_DISKEJECTED.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.ASYNCREADINFO()",
no 'new' keyword is required.
See Also
FMOD_FILE_ASYNCREAD_CALLBACK
FMOD_FILE_ASYNCCANCEL_CALLBACK
FMOD_FILE_ASYNCDONE_FUNC
C/C++ Syntax
typedef struct {
const char *name;
unsigned int version;
int defaultasstream;
FMOD_TIMEUNIT timeunits;
FMOD_CODEC_OPEN_CALLBACK open;
FMOD_CODEC_CLOSE_CALLBACK close;
FMOD_CODEC_READ_CALLBACK read;
FMOD_CODEC_GETLENGTH_CALLBACK getlength;
FMOD_CODEC_SETPOSITION_CALLBACK setposition;
FMOD_CODEC_GETPOSITION_CALLBACK getposition;
FMOD_CODEC_SOUNDCREATE_CALLBACK soundcreate;
FMOD_CODEC_GETWAVEFORMAT_CALLBACK getwaveformat;
} FMOD_CODEC_DESCRIPTION;
JavaScript Syntax
struct FMOD_CODEC_DESCRIPTION
{
name,
version,
defaultasstream,
timeunits,
open,
close,
read,
getlength,
setposition,
getposition,
soundcreate,
getwaveformat,
};
Members
name
version
defaultasstream
[w] Tells FMOD to open the file as a stream when calling System::createSound,
and not a static sample. Should normally be 0 (FALSE), because generally the
user wants to decode the file into memory when using System::createSound.
Mainly used for formats that decode for a very long time, or could use large
amounts of memory when decoded. Usually sequenced formats such as
mod/s3m/xm/it/midi fall into this category. It is mainly to stop users that don't
know what they're doing from getting FMOD_ERR_MEMORY returned from
createSound when they should have in fact called System::createStream or used
FMOD_CREATESTREAM in System::createSound.
timeunits
[w] When setposition codec is called, only these time formats will be passed to
the codec. Use bitwise OR to accumulate different types.
open
[w] Open callback for the codec for when FMOD tries to open a sound using this
codec.
close
[w] Close callback for the codec for when FMOD tries to close a sound using
this codec.
read
[w] Read callback for the codec for when FMOD tries to read some data from
the file to the destination format (specified in the open callback).
getlength
[w] Callback to return the length of the song in whatever format required when
Sound::getLength is called.
setposition
[w] Seek callback for the codec for when FMOD tries to seek within the file
with Channel::setPosition.
getposition
[w] Tell callback for the codec for when FMOD tries to get the current position
within the with Channel::getPosition.
soundcreate
[w] Sound creation callback for the codec when FMOD finishes creating the
sound. (So the codec can set more parameters for the related created sound, ie
loop points/mode or 3D attributes etc).
getwaveformat
[w] Callback to tell FMOD about the waveformat of a particular subsound. This
is to save memory, rather than saving 1000 FMOD_CODEC_WAVEFORMAT
structures in the codec, the codec might have a more optimal way of storing this
information.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.CODEC_DESCRIPTION()", no 'new' keyword is required.
See Also
FMOD_CODEC_STATE
FMOD_CODEC_WAVEFORMAT
C/C++ Syntax
typedef struct {
int numsubsounds;
FMOD_CODEC_WAVEFORMAT *waveformat;
void *plugindata;
void *filehandle;
unsigned int filesize;
FMOD_FILE_READ_CALLBACK fileread;
FMOD_FILE_SEEK_CALLBACK fileseek;
FMOD_CODEC_METADATA_CALLBACK metadata;
int waveformatversion;
} FMOD_CODEC_STATE;
JavaScript Syntax
struct FMOD_CODEC_STATE
{
numsubsounds,
plugindata,
filehandle,
filesize,
fileread,
fileseek,
metadata,
waveformatversion,
};
Members
numsubsounds
waveformat
plugindata
[w] Plugin writer created data the codec author wants to attach to this object.
filehandle
[r] This will return an internal FMOD file handle to use with the callbacks
provided.
filesize
fileread
[r] This will return a callable FMOD file function to use from codec.
fileseek
[r] This will return a callable FMOD file function to use from codec.
metadata
[r] This will return a callable FMOD metadata function to use from codec.
waveformatversion
When a sound has 1 or more subsounds, the caller must play the individual
sounds specified by first obtaining the subsound with Sound::getSubSound.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.CODEC_STATE()", no
'new' keyword is required.
See Also
FMOD_CODEC_WAVEFORMAT
FMOD_FILE_READ_CALLBACK
FMOD_FILE_SEEK_CALLBACK
FMOD_CODEC_METADATA_CALLBACK
Sound::getSubSound
Sound::getNumSubSounds
FMOD_CODEC_WAVEFORMAT_VERSION
C/C++ Syntax
typedef struct {
const char* name;
FMOD_SOUND_FORMAT format;
int channels;
int frequency;
unsigned int lengthbytes;
unsigned int lengthpcm;
unsigned int pcmblocksize;
int loopstart;
int loopend;
FMOD_MODE mode;
FMOD_CHANNELMASK channelmask;
FMOD_CHANNELORDER channelorder;
float peakvolume;
} FMOD_CODEC_WAVEFORMAT;
JavaScript Syntax
struct FMOD_CODEC_WAVEFORMAT
{
name,
format,
channels,
frequency,
lengthbytes,
lengthpcm,
pcmblocksize,
loopstart,
loopend,
mode,
channelmask,
channelorder,
peakvolume,
};
Members
name
[w] Name of sound. Optional. If used, the codec must own the lifetime of the
string memory until the codec is destroyed.
format
channels
frequency
lengthbytes
lengthpcm
pcmblocksize
loopstart
loopend
mode
[w] Mode to determine whether the sound should by default load as looping, non
looping, 2d or 3d. Optional. Default = FMOD_DEFAULT.
channelmask
[w] Defined channel bitmask to describe which speakers the channels in the
codec map to, in order of channel count. See fmod_common.h. Optional. Leave
at 0 to map to the speaker layout defined in FMOD_SPEAKER.
channelorder
[w] Defined channel order type, to describe where each sound channel should
pan for the number of channels specified. See fmod_common.h. Optional. Leave
at 0 to play in default speaker order.
peakvolume
1.07 Note. 'blockalign' member which was in bytes has been removed.
'pcmblocksize' is now the replacement, and is measured in PCM samples only,
not bytes. This is purely to support buffering internal to FMOD for codecs that
are not sample accurate.
Note: When registering a codec, format, channels, frequency and lengthpcm
must be supplied, otherwise there will be an error.
This structure is optional if
FMOD_CODEC_GETWAVEFORMAT_CALLBACK is specified.
An array of these structures may be needed if
FMOD_CODEC_STATE::numsubsounds is larger than 1.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.CODEC_WAVEFORMAT()", no 'new' keyword is required.
See Also
FMOD_CODEC_STATE
FMOD_SOUND_FORMAT
FMOD_MODE
FMOD_CHANNELMASK
FMOD_CHANNELORDER
FMOD_CODEC_WAVEFORMAT_VERSION
C/C++ Syntax
typedef struct {
float real;
float imag;
} FMOD_COMPLEX;
JavaScript Syntax
struct FMOD_COMPLEX
{
real,
imag,
};
Members
real
Real component
imag
Imaginary component
Remarks
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.COMPLEX()", no 'new'
keyword is required.
See Also
FMOD_DSP_STATE_FUNCTIONS
FMOD_DSP_STATE_DFT_FUNCTIONS
See below on what members to fill for each of the above types of sound you
want to create.
C/C++ Syntax
typedef struct {
int cbsize;
unsigned int length;
unsigned int fileoffset;
int numchannels;
int defaultfrequency;
FMOD_SOUND_FORMAT format;
unsigned int decodebuffersize;
int initialsubsound;
int numsubsounds;
int *inclusionlist;
int inclusionlistnum;
FMOD_SOUND_PCMREAD_CALLBACK pcmreadcallback;
FMOD_SOUND_PCMSETPOS_CALLBACK pcmsetposcallback;
FMOD_SOUND_NONBLOCK_CALLBACK nonblockcallback;
const char *dlsname;
const char *encryptionkey;
int maxpolyphony;
void *userdata;
FMOD_SOUND_TYPE suggestedsoundtype;
FMOD_FILE_OPEN_CALLBACK fileuseropen;
FMOD_FILE_CLOSE_CALLBACK fileuserclose;
FMOD_FILE_READ_CALLBACK fileuserread;
FMOD_FILE_SEEK_CALLBACK fileuserseek;
FMOD_FILE_ASYNCREAD_CALLBACK fileuserasyncread;
FMOD_FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel;
void *fileuserdata;
int filebuffersize;
FMOD_CHANNELORDER channelorder;
FMOD_CHANNELMASK channelmask;
FMOD_SOUNDGROUP *initialsoundgroup;
unsigned int initialseekposition;
FMOD_TIMEUNIT initialseekpostype;
int ignoresetfilesystem;
unsigned int audioqueuepolicy;
unsigned int minmidigranularity;
int nonblockthreadid;
FMOD_GUID *fsbguid;
} FMOD_CREATESOUNDEXINFO;
JavaScript Syntax
struct FMOD_CREATESOUNDEXINFO
{
length,
fileoffset,
numchannels,
defaultfrequency,
format,
decodebuffersize,
initialsubsound,
numsubsounds,
inclusionlistnum,
pcmreadcallback,
pcmsetposcallback,
nonblockcallback,
dlsname,
encryptionkey,
maxpolyphony,
userdata,
suggestedsoundtype,
fileuseropen,
fileuserclose,
fileuserread,
fileuserseek,
fileuserasyncread,
fileuserasynccancel,
fileuserdata,
filebuffersize,
channelorder,
channelmask,
initialsoundgroup,
initialseekposition,
initialseekpostype,
ignoresetfilesystem,
audioqueuepolicy,
minmidigranularity,
nonblockthreadid,
};
Members
cbsize
[w] Size of this structure. This is used so the structure can be expanded in the
future and still work on older versions of FMOD Studio.
length
fileoffset
[w] Optional. Specify 0 to ignore. Offset from start of the file to start loading
from. This is useful for loading files from inside big data files.
numchannels
defaultfrequency
format
decodebuffersize
[w] Optional. Specify 0 to ignore. For streams. This determines the size of the
double buffer (in PCM samples) that a stream uses. Use this for user created
streams if you want to determine the size of the callback buffer passed to you.
Specify 0 to use FMOD's default size which is currently equivalent to 400ms of
the sound format created/loaded.
initialsubsound
numsubsounds
inclusionlist
inclusionlistnum
pcmreadcallback
pcmsetposcallback
[w] Optional. Specify 0 to ignore. Callback for when the user calls a seeking
function such as Channel::setTime or Channel::setPosition within a multi-sample
sound, and for when it is opened.
nonblockcallback
dlsname
[w] Optional. Specify 0 to ignore. Filename for a DLS sample set when loading
a MIDI file. If not specified, on Windows it will attempt to open
/windows/system32/drivers/gm.dls or /windows/system32/drivers/etc/gm.dls, on
Mac it will attempt to load
/System/Library/Components/CoreAudio.component/Contents/Resources/gs_instruments.dls,
otherwise the MIDI will fail to open. Current DLS support is for level 1 of the
specification.
encryptionkey
[w] Optional. Specify 0 to ignore. Key for encrypted FSB file. Without this key
an encrypted FSB file will not load.
maxpolyphony
[w] Optional. Specify 0 to ignore. For sequenced formats with dynamic channel
allocation such as .MID and .IT, this specifies the maximum voice count allowed
while playing. .IT defaults to 64. .MID defaults to 32.
userdata
[w] Optional. Specify 0 to ignore. This is user data to be attached to the sound
during creation. Access via Sound::getUserData. Note: This is not passed to
FMOD_FILE_OPEN_CALLBACK - use fileuserdata for that.
suggestedsoundtype
fileuseropen
fileuserclose
fileuserread
[w] Optional. Specify 0 to ignore. Callback for reading from this file.
fileuserseek
[w] Optional. Specify 0 to ignore. Callback for seeking within this file.
fileuserasyncread
[w] Optional. Specify 0 to ignore. Callback for seeking within this file.
fileuserasynccancel
[w] Optional. Specify 0 to ignore. Callback for seeking within this file.
fileuserdata
[w] Optional. Specify 0 to ignore. User data to be passed into the file callbacks.
filebuffersize
[w] Optional. Specify 0 to ignore. Buffer size for reading the file, -1 to disable
buffering, or 0 for system default.
channelorder
[w] Optional. Specify 0 to ignore. Use this to differ the way fmod maps
multichannel sounds to speakers. See FMOD_CHANNELORDER for more.
channelmask
[w] Optional. Specify 0 to ignore. Use this to specify which channels map to
which speakers. See FMOD_CHANNELMASK for more.
initialsoundgroup
initialseekposition
[w] Optional. Specify 0 to ignore. For streams. Specify an initial position to seek
the stream to.
initialseekpostype
[w] Optional. Specify 0 to ignore. For streams. Specify the time unit for the
position set in initialseekposition.
ignoresetfilesystem
[w] Optional. Specify 0 to ignore. Set to 1 to use fmod's built in file system.
Ignores setFileSystem callbacks and also FMOD_CREATESOUNEXINFO file
callbacks. Useful for specific cases where you don't want to use your own file
system but want to use fmod's file system (ie net streaming).
audioqueuepolicy
[w] Optional. Specify 0 to ignore. Allows you to set a minimum desired MIDI
mixer granularity. Values smaller than 512 give greater than default accuracy at
the cost of more CPU and vice versa. Specify 0 for default (512 samples).
nonblockthreadid
fsbguid
[r/w] Optional. Specify 0 to ignore. Allows you to provide the GUID lookup for
cached FSB header info. Once loaded the GUID will be written back to the
pointer. This is to avoid seeking and reading the FSB header.
Remarks
This structure is optional! Specify 0 or NULL in System::createSound if you
don't need it!
Loading a file from within another larger (possibly wad/pak) file, by giving the
loader an offset and length.
To specify 'piggyback' read and seek callbacks for capture of sound data as fmod
reads and decodes it. Useful for ripping decoded PCM data from sounds as they
are loaded / played.
Setting the 'decodebuffersize' is for cpu intensive codecs that may be causing
stuttering, not file intensive codecs (ie those from CD or netstreams) which are
normally altered with System::setStreamBufferSize. As an example of cpu
intensive codecs, an mp3 file will take more cpu to decode than a PCM wav file.
If you have a stuttering effect, then it is using more cpu than the decode buffer
playback rate can keep up with. Increasing the decode buffersize will most likely
solve this problem.
FSB codec. If inclusionlist and numsubsounds are used together, this will trigger
a special mode where subsounds are shuffled down to save memory. (useful for
large FSB files where you only want to load 1 sound). There will be no gaps, ie
no null subsounds. As an example, if there are 10,000 subsounds and there is an
inclusionlist with only 1 entry, and numsubsounds = 1, then subsound 0 will be
that entry, and there will only be the memory allocated for 1 subsound.
Previously there would still be 10,000 subsound pointers and other associated
codec entries allocated along with it multiplied by 10,000.
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.CREATESOUNDEXINFO()", no 'new' keyword is required.
See Also
System::createSound
System::setStreamBufferSize
FMOD_MODE
FMOD_SOUND_FORMAT
FMOD_SOUND_TYPE
FMOD_CHANNELMASK
FMOD_CHANNELORDER
FMOD_MAX_CHANNEL_WIDTH
C/C++ Syntax
typedef struct {
int numbuffers;
int *buffernumchannels;
FMOD_CHANNELMASK *bufferchannelmask;
float **buffers;
FMOD_SPEAKERMODE speakermode;
} FMOD_DSP_BUFFER_ARRAY;
JavaScript Syntax
struct FMOD_DSP_BUFFER_ARRAY
{
numbuffers,
speakermode,
};
Members
numbuffers
buffernumchannels
bufferchannelmask
buffers
speakermode
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_BUFFER_ARRAY()", no 'new' keyword is required.
See Also
FMOD_DSP_DESCRIPTION
C/C++ Syntax
typedef struct {
unsigned int pluginsdkversion;
char name[32];
unsigned int version;
int numinputbuffers;
int numoutputbuffers;
FMOD_DSP_CREATE_CALLBACK create;
FMOD_DSP_RELEASE_CALLBACK release;
FMOD_DSP_RESET_CALLBACK reset;
FMOD_DSP_READ_CALLBACK read;
FMOD_DSP_PROCESS_CALLBACK process;
FMOD_DSP_SETPOSITION_CALLBACK setposition;
int numparameters;
FMOD_DSP_PARAMETER_DESC **paramdesc;
FMOD_DSP_SETPARAM_FLOAT_CALLBACK setparameterfloat;
FMOD_DSP_SETPARAM_INT_CALLBACK setparameterint;
FMOD_DSP_SETPARAM_BOOL_CALLBACK setparameterbool;
FMOD_DSP_SETPARAM_DATA_CALLBACK setparameterdata;
FMOD_DSP_GETPARAM_FLOAT_CALLBACK getparameterfloat;
FMOD_DSP_GETPARAM_INT_CALLBACK getparameterint;
FMOD_DSP_GETPARAM_BOOL_CALLBACK getparameterbool;
FMOD_DSP_GETPARAM_DATA_CALLBACK getparameterdata;
FMOD_DSP_SHOULDIPROCESS_CALLBACK shouldiprocess;
void *userdata;
FMOD_DSP_SYSTEM_REGISTER_CALLBACK sys_register;
FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK sys_deregister;
FMOD_DSP_SYSTEM_MIX_CALLBACK sys_mix;
} FMOD_DSP_DESCRIPTION;
JavaScript Syntax
struct FMOD_DSP_DESCRIPTION
{
pluginsdkversion,
name,
version,
numinputbuffers,
numoutputbuffers,
create,
release,
reset,
read,
process,
setposition,
numparameters,
setparameterfloat,
setparameterint,
setparameterbool,
setparameterdata,
getparameterfloat,
getparameterint,
getparameterbool,
getparameterdata,
shouldiprocess,
userdata,
sys_register,
sys_deregister,
sys_mix,
};
Members
pluginsdkversion
[w] The plugin SDK version this plugin is built for. Set to this to
FMOD_PLUGIN_SDK_VERSION defined above.
name
[w] The identifier of the DSP. This will also be used as the name of DSP and
shouldn't change between versions.
version
numinputbuffers
[w] Number of input buffers to process. Use 0 for DSPs that only generate sound
and 1 for effects that process incoming sound.
numoutputbuffers
[w] Number of audio output buffers. Only one output buffer is currently
supported.
create
[w] Create callback. This is called when DSP unit is created. Can be null.
release
[w] Release callback. This is called just before the unit is freed so the user can
do any cleanup needed for the unit. Can be null.
reset
[w] Reset callback. This is called by the user to reset any history buffers that
may need resetting for a filter, when it is to be used or re-used for the first time
to its initial clean state. Use to avoid clicks or artifacts.
read
process
[w] Process callback. Can be specified instead of the read callback if any
channel format changes occur between input and output. This also replaces
shouldiprocess and should return an error if the effect is to be bypassed. Can be
null.
setposition
[w] Set position callback. This is called if the unit wants to update its position
info but not process data, or reset a cursor position internally if it is reading data
from a certain source. Can be null.
numparameters
[w] Number of parameters used in this filter. The user finds this with
DSP::getNumParameters
paramdesc
setparameterfloat
[w] This is called when the user calls DSP::setParameterFloat. Can be null.
setparameterint
[w] This is called when the user calls DSP::setParameterInt. Can be null.
setparameterbool
[w] This is called when the user calls DSP::setParameterBool. Can be null.
setparameterdata
[w] This is called when the user calls DSP::setParameterData. Can be null.
getparameterfloat
[w] This is called when the user calls DSP::getParameterFloat. Can be null.
getparameterint
[w] This is called when the user calls DSP::getParameterInt. Can be null.
getparameterbool
[w] This is called when the user calls DSP::getParameterBool. Can be null.
getparameterdata
[w] This is called when the user calls DSP::getParameterData. Can be null.
shouldiprocess
[w] This is called before processing. You can detect if inputs are idle and return
FMOD_OK to process, or any other error code to avoid processing the effect.
Use a count down timer to allow effect tails to process before idling!
userdata
[w] Optional. Specify 0 to ignore. This is user data to be attached to the DSP unit
during creation. Access via FMOD_DSP_STATE_FUNCTIONS::getuserdata.
sys_register
[w] Register callback. This is called when DSP unit is loaded/registered. Useful
for 'global'/per system object init for plugin. Can be null.
sys_deregister
sys_mix
[w] System mix stage callback. This is called when the mixer starts to execute or
is just finishing executing. Useful for 'global'/per system object once a mix
update calls for a plugin. Can be null.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.DSP_DESCRIPTION()",
no 'new' keyword is required.
See Also
System::createDSP
DSP::setParameterFloat
DSP::setParameterInt
DSP::setParameterBool
DSP::setParameterData
FMOD_DSP_STATE
FMOD_DSP_CREATE_CALLBACK
FMOD_DSP_RELEASE_CALLBACK
FMOD_DSP_RESET_CALLBACK
FMOD_DSP_READ_CALLBACK
FMOD_DSP_PROCESS_CALLBACK
FMOD_DSP_SETPOSITION_CALLBACK
FMOD_DSP_PARAMETER_DESC
FMOD_DSP_SETPARAM_FLOAT_CALLBACK
FMOD_DSP_SETPARAM_INT_CALLBACK
FMOD_DSP_SETPARAM_BOOL_CALLBACK
FMOD_DSP_SETPARAM_DATA_CALLBACK
FMOD_DSP_GETPARAM_FLOAT_CALLBACK
FMOD_DSP_GETPARAM_INT_CALLBACK
FMOD_DSP_GETPARAM_BOOL_CALLBACK
FMOD_DSP_GETPARAM_DATA_CALLBACK
FMOD_DSP_SHOULDIPROCESS_CALLBACK
FMOD_DSP_SYSTEM_REGISTER_CALLBACK
FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK
FMOD_DSP_SYSTEM_MIX_CALLBACK
C/C++ Syntax
typedef struct {
int numsamples;
float peaklevel[32];
float rmslevel[32];
short numchannels;
} FMOD_DSP_METERING_INFO;
JavaScript Syntax
struct FMOD_DSP_METERING_INFO
{
numsamples,
peaklevel,
rmslevel,
numchannels,
};
Members
numsamples
peaklevel
rmslevel
numchannels
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_METERING_INFO()", no 'new' keyword is required.
See Also
FMOD_SPEAKER
DSP::getMeteringInfo
C/C++ Syntax
typedef struct {
FMOD_3D_ATTRIBUTES relative;
FMOD_3D_ATTRIBUTES absolute;
} FMOD_DSP_PARAMETER_3DATTRIBUTES;
Members
relative
absolute
Attributes must use a coordinate system with the positive Y axis being up and
the positive X axis being right. FMOD will convert passed in coordinates to left-
handed for the plugin if the System was initialized with the
FMOD_INIT_3D_RIGHTHANDED flag.
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_3DATTRIBUTES()", no 'new' keyword is
required.
See Also
FMOD_DSP_PARAMETER_DATA_TYPE
FMOD_DSP_PARAMETER_DESC
C/C++ Syntax
typedef struct {
int numlisteners;
FMOD_3D_ATTRIBUTES relative[FMOD_MAX_LISTENERS];
float weight[FMOD_MAX_LISTENERS];
FMOD_3D_ATTRIBUTES absolute;
} FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI
{
numlisteners,
};
Members
numlisteners
relative
weight
[w] The weighting of the listeners where 0 means listener has no contribution
and 1 means full contribution.
absolute
Attributes must use a coordinate system with the positive Y axis being up and
the positive X axis being right. FMOD will convert passed in coordinates to left-
handed for the plugin if the System was initialized with the
FMOD_INIT_3D_RIGHTHANDED flag.
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_3DATTRIBUTES_MULTI()", no 'new' keyword
is required.
See Also
FMOD_DSP_PARAMETER_DATA_TYPE
FMOD_DSP_PARAMETER_DESC
C/C++ Syntax
typedef struct {
FMOD_DSP_PARAMETER_TYPE type;
char name[16];
char label[16];
const char *description;
FMOD_DSP_PARAMETER_DESC_FLOAT floatdesc;
FMOD_DSP_PARAMETER_DESC_INT intdesc;
FMOD_DSP_PARAMETER_DESC_BOOL booldesc;
FMOD_DSP_PARAMETER_DESC_DATA datadesc;
} FMOD_DSP_PARAMETER_DESC;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_DESC
{
type,
name,
label,
description,
};
Members
type
name
label
[w] Short string to be put next to value to denote the unit type (ie "hz").
description
[w] Description of the parameter to be displayed as a help item / tooltip for this
parameter.
floatdesc
[w] Struct containing information about the parameter in floating point format.
Use when type is FMOD_DSP_PARAMETER_TYPE_FLOAT.
intdesc
[w] Struct containing information about the parameter in integer format. Use
when type is FMOD_DSP_PARAMETER_TYPE_INT.
booldesc
[w] Struct containing information about the parameter in boolean format. Use
when type is FMOD_DSP_PARAMETER_TYPE_BOOL.
datadesc
[w] Struct containing information about the parameter in data format. Use when
type is FMOD_DSP_PARAMETER_TYPE_DATA.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_DESC()", no 'new' keyword is required.
See Also
System::createDSP
DSP::setParameterFloat
DSP::getParameterFloat
DSP::setParameterInt
DSP::getParameterInt
DSP::setParameterBool
DSP::getParameterBool
DSP::setParameterData
DSP::getParameterData
FMOD_DSP_PARAMETER_DESC_FLOAT
FMOD_DSP_PARAMETER_DESC_INT
FMOD_DSP_PARAMETER_DESC_BOOL
FMOD_DSP_PARAMETER_DESC_DATA
FMOD_DSP_PARAMETER_DATA_TYPE
C/C++ Syntax
typedef struct {
FMOD_BOOL defaultval;
const char* const* valuenames;
} FMOD_DSP_PARAMETER_DESC_BOOL;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_DESC_BOOL
{
defaultval,
};
Members
defaultval
valuenames
[w] Names for false and true, respectively. There should be two strings.
Optional.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_DESC_BOOL()", no 'new' keyword is required.
See Also
System::createDSP
DSP::setParameterBool
DSP::getParameterBool
FMOD_DSP_PARAMETER_DESC
C/C++ Syntax
typedef struct {
int datatype;
} FMOD_DSP_PARAMETER_DESC_DATA;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_DESC_DATA
{
datatype,
};
Members
datatype
[w] The type of data for this parameter. Use 0 or above for custom types or set to
one of the FMOD_DSP_PARAMETER_DATA_TYPE values.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_DESC_DATA()", no 'new' keyword is required.
See Also
System::createDSP
DSP::setParameterData
DSP::getParameterData
FMOD_DSP_PARAMETER_DATA_TYPE
FMOD_DSP_PARAMETER_DESC
C/C++ Syntax
typedef struct {
float min;
float max;
float defaultval;
FMOD_DSP_PARAMETER_FLOAT_MAPPING mapping;
} FMOD_DSP_PARAMETER_DESC_FLOAT;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_DESC_FLOAT
{
min,
max,
defaultval,
};
Members
min
max
defaultval
mapping
[w] How the values are distributed across dials and automation curves (e.g.
linearly, exponentially etc).
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_DESC_FLOAT()", no 'new' keyword is required.
See Also
System::createDSP
DSP::setParameterFloat
DSP::getParameterFloat
FMOD_DSP_PARAMETER_DESC
FMOD_DSP_PARAMETER_FLOAT_MAPPING
C/C++ Syntax
typedef struct {
int min;
int max;
int defaultval;
FMOD_BOOL goestoinf;
const char* const* valuenames;
} FMOD_DSP_PARAMETER_DESC_INT;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_DESC_INT
{
min,
max,
defaultval,
goestoinf,
};
Members
min
max
defaultval
goestoinf
valuenames
[w] Names for each value. There should be as many strings as there are possible
values (max - min + 1). Optional.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_DESC_INT()", no 'new' keyword is required.
See Also
System::createDSP
DSP::setParameterInt
DSP::getParameterInt
FMOD_DSP_PARAMETER_DESC
C/C++ Syntax
typedef struct {
int length;
int numchannels;
float *spectrum[32];
} FMOD_DSP_PARAMETER_FFT;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_FFT
{
length,
numchannels,
};
Members
length
[r] Number of entries in this spectrum window. Divide this by the output rate to
get the hz per entry.
numchannels
spectrum
Notes on the spectrum data member. Values inside the float buffer are typically
between 0 and 1.0.
Each top level array represents one PCM channel of data.
Address data as spectrum[channel][bin]. A bin is 1 fft window entry.
Only read/display half of the buffer typically for analysis as the 2nd half is
usually the same data reversed due to the nature of the way FFT works.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_FFT()", no 'new' keyword is required.
See Also
FMOD_DSP_PARAMETER_DATA_TYPE
FMOD_DSP_PARAMETER_DESC
FMOD_DSP_PARAMETER_DATA_TYPE_FFT
FMOD_DSP_TYPE
FMOD_DSP_FFT
C/C++ Syntax
typedef struct {
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE type;
FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR piecewiselinearmapping
} FMOD_DSP_PARAMETER_FLOAT_MAPPING;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_FLOAT_MAPPING
{
type,
};
Members
type
piecewiselinearmapping
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_FLOAT_MAPPING()", no 'new' keyword is
required.
See Also
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE
FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR
FMOD_DSP_PARAMETER_DESC_FLOAT
C/C++ Syntax
typedef struct {
int numpoints;
float *pointparamvalues;
float *pointpositions;
} FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR
{
numpoints,
};
Members
numpoints
[w] The number of pairs in the piecewise mapping (at least 2).
pointparamvalues
pointpositions
[w] The positions along the control's scale (e.g. dial angle) corresponding to each
parameter value. The range of this scale is arbitrary and all positions will be
relative to the minimum and maximum values (e.g. [0,1,3] is equivalent to
[1,2,4] and [2,4,8]). If this array is zero, pointparamvalues will be distributed
with equal spacing.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR()",
no 'new' keyword is required.
See Also
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE
FMOD_DSP_PARAMETER_FLOAT_MAPPING
C/C++ Syntax
typedef struct {
float linear_gain;
float linear_gain_additive;
} FMOD_DSP_PARAMETER_OVERALLGAIN;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_OVERALLGAIN
{
linear_gain,
linear_gain_additive,
};
Members
linear_gain
[r] The overall linear gain of the effect on the direct signal path
linear_gain_additive
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_OVERALLGAIN()", no 'new' keyword is
required.
See Also
FMOD_DSP_PARAMETER_DATA_TYPE
FMOD_DSP_PARAMETER_DESC
C/C++ Syntax
typedef struct {
FMOD_BOOL sidechainenable;
} FMOD_DSP_PARAMETER_SIDECHAIN;
JavaScript Syntax
struct FMOD_DSP_PARAMETER_SIDECHAIN
{
sidechainenable,
};
Members
sidechainenable
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_PARAMETER_SIDECHAIN()", no 'new' keyword is required.
See Also
FMOD_DSP_PARAMETER_DATA_TYPE
FMOD_DSP_PARAMETER_DESC
C/C++ Syntax
typedef struct {
void *instance;
void *plugindata;
FMOD_CHANNELMASK channelmask;
FMOD_SPEAKERMODE source_speakermode;
float *sidechaindata;
int sidechainchannels;
FMOD_DSP_STATE_FUNCTIONS *functions;
int systemobject;
} FMOD_DSP_STATE;
JavaScript Syntax
struct FMOD_DSP_STATE
{
plugindata,
channelmask,
source_speakermode,
sidechainchannels,
systemobject,
};
Members
instance
plugindata
[w] Plugin writer created data the output author wants to attach to this object.
channelmask
source_speakermode
[r] Specifies which speaker mode the signal originated for information purposes,
ie in case panning needs to be done differently.
sidechaindata
[r] The mixed result of all incoming sidechains is stored at this pointer address.
sidechainchannels
[r] The number of channels of pcm data stored within the sidechain buffer.
functions
[r] Struct containing functions to give plugin developers the ability to query
system state, access system level functionality and helpers.
systemobject
[r] FMOD::System object index, relating to the System object that created this
DSP.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
'systemobject' is an integer that relates to the System object that created the DSP
or registered the DSP plugin. If only 1 System object is created then it should be
0. A second object would be 1 and so on.
FMOD_DSP_STATE_FUNCTIONS::getsamplerate/getblocksize/getspeakermode
could return different results so it could be relevant to plugin developers to
monitor which object is being used.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.DSP_STATE()", no 'new'
keyword is required.
See Also
FMOD_DSP_DESCRIPTION
FMOD_DSP_STATE_FUNCTIONS
C/C++ Syntax
typedef struct {
FMOD_DSP_DFT_FFTREAL_FUNC fftreal;
FMOD_DSP_DFT_IFFTREAL_FUNC inversefftreal;
} FMOD_DSP_STATE_DFT_FUNCTIONS;
Members
fftreal
inversefftreal
Members marked with [w] mean read/write for the developer, read only for the
FMOD system.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_STATE_DFT_FUNCTIONS()", no 'new' keyword is required.
See Also
FMOD_DSP_STATE_FUNCTIONS
C/C++ Syntax
typedef struct {
FMOD_DSP_ALLOC_FUNC alloc;
FMOD_DSP_REALLOC_FUNC realloc;
FMOD_DSP_FREE_FUNC free;
FMOD_DSP_GETSAMPLERATE_FUNC getsamplerate;
FMOD_DSP_GETBLOCKSIZE_FUNC getblocksize;
FMOD_DSP_STATE_DFT_FUNCTIONS *dft;
FMOD_DSP_STATE_PAN_FUNCTIONS *pan;
FMOD_DSP_GETSPEAKERMODE_FUNC getspeakermode;
FMOD_DSP_GETCLOCK_FUNC getclock;
FMOD_DSP_GETLISTENERATTRIBUTES_FUNC getlistenerattributes;
FMOD_DSP_LOG_FUNC log;
FMOD_DSP_GETUSERDATA_FUNC getuserdata;
} FMOD_DSP_STATE_FUNCTIONS;
Members
alloc
realloc
free
getsamplerate
getblocksize
[r] Function to query the system block size, DSPs will be requested to process
blocks of varying length up to this size.
dft
pan
getspeakermode
[r] Function to query the system speaker modes. One is the mixer's default
speaker mode, the other is the output mode the system is downmixing or
upmixing to.
getclock
[r] Function to get the clock of the current DSP, as well as the subset of the input
buffer that contains the signal.
getlistenerattributes
[r] Callback for getting the absolute listener attributes set via the API (returned
as left-handed coordinates).
log
getuserdata
[r] Function to get the user data attached to this DSP. See
FMOD_DSP_DESCRIPTION::userdata.
Remarks
Members marked with [r] mean read only for the developer, read/write for the
FMOD system.
Members marked with [w] mean read/write for the developer, read only for the
FMOD system.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_STATE_FUNCTIONS()", no 'new' keyword is required.
See Also
FMOD_DSP_STATE
FMOD_DSP_STATE_DFT_FUNCTIONS
FMOD_DSP_STATE_PAN_FUNCTIONS
C/C++ Syntax
typedef struct {
FMOD_DSP_PAN_SUMMONOMATRIX_FUNC summonomatrix;
FMOD_DSP_PAN_SUMSTEREOMATRIX_FUNC sumstereomatrix;
FMOD_DSP_PAN_SUMSURROUNDMATRIX_FUNC sumsurroundmatrix;
FMOD_DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC summonotosurroundmatrix;
FMOD_DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC sumstereotosurroundmatrix
FMOD_DSP_PAN_GETROLLOFFGAIN_FUNC getrolloffgain;
} FMOD_DSP_STATE_PAN_FUNCTIONS;
Members
summonomatrix
[r] TBD.
sumstereomatrix
[r] TBD.
sumsurroundmatrix
[r] TBD.
summonotosurroundmatrix
[r] TBD.
sumstereotosurroundmatrix
[r] TBD.
getrolloffgain
[r] TBD.
Remarks
These are experimental, please contact [email protected] for more information.
Members marked with [r] mean read only for the developer, read/write for the
FMOD system.
Members marked with [w] mean read/write for the developer, read only for the
FMOD system.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.DSP_STATE_PAN_FUNCTIONS()", no 'new' keyword is required.
See Also
FMOD_DSP_STATE_FUNCTIONS
FMOD_DSP_PAN_SURROUND_FLAGS
C/C++ Syntax
typedef struct {
FMOD_RESULT result;
FMOD_ERRORCALLBACK_INSTANCETYPE instancetype;
void *instance;
const char *functionname;
const char *functionparams;
} FMOD_ERRORCALLBACK_INFO;
JavaScript Syntax
struct FMOD_ERRORCALLBACK_INFO
{
result,
instancetype,
instance,
functionname,
functionparams,
};
Members
result
instancetype
instance
Instance pointer
functionname
functionparams
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.ERRORCALLBACK_INFO()", no 'new' keyword is required.
See Also
FMOD_ERRORCALLBACK_INSTANCETYPE
C/C++ Syntax
typedef struct {
unsigned int Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} FMOD_GUID;
JavaScript Syntax
struct FMOD_GUID
{
Data1,
Data2,
Data3,
Data4,
};
Members
Data1
Data2
Data3
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.
Remarks
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.GUID()", no 'new'
keyword is required.
See Also
System::getDriverInfo
C/C++ Syntax
typedef struct {
unsigned int apiversion;
const char *name;
unsigned int version;
int polling;
FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK getnumdrivers;
FMOD_OUTPUT_GETDRIVERINFO_CALLBACK getdriverinfo;
FMOD_OUTPUT_INIT_CALLBACK init;
FMOD_OUTPUT_START_CALLBACK start;
FMOD_OUTPUT_STOP_CALLBACK stop;
FMOD_OUTPUT_CLOSE_CALLBACK close;
FMOD_OUTPUT_UPDATE_CALLBACK update;
FMOD_OUTPUT_GETHANDLE_CALLBACK gethandle;
FMOD_OUTPUT_GETPOSITION_CALLBACK getposition;
FMOD_OUTPUT_LOCK_CALLBACK lock;
FMOD_OUTPUT_UNLOCK_CALLBACK unlock;
FMOD_OUTPUT_MIXER_CALLBACK mixer;
FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK object3dgetinfo;
FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK object3dalloc;
FMOD_OUTPUT_OBJECT3DFREE_CALLBACK object3dfree;
FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK object3dupdate;
FMOD_OUTPUT_OPENPORT_CALLBACK openport;
FMOD_OUTPUT_CLOSEPORT_CALLBACK closeport;
} FMOD_OUTPUT_DESCRIPTION;
JavaScript Syntax
struct FMOD_OUTPUT_DESCRIPTION
{
apiversion,
name,
version,
polling,
getnumdrivers,
getdriverinfo,
init,
start,
stop,
close,
update,
gethandle,
getposition,
lock,
unlock,
mixer,
object3dgetinfo,
object3dalloc,
object3dfree,
object3dupdate,
openport,
closeport,
};
Members
apiversion
[w] The output plugin API version this plugin is built for. Set to this to
FMOD_OUTPUT_PLUGIN_VERSION.
name
version
polling
getnumdrivers
[w] Required user thread callback to provide the number of attached sound
devices. Called from System::getNumDrivers.
getdriverinfo
init
[w] Required user thread callback to allocate resources and provide information
about hardware capabilities. Called from System::init.
start
[w] Optional user thread callback just before mixing should begin, calls to
FMOD_OUTPUT_GETPOSITION_CALLBACK /
FMOD_OUTPUT_LOCK_CALLBACK /
FMOD_OUTPUT_UNLOCK_CALLBACK /
FMOD_OUTPUT_MIXER_CALLBACK will start, you may call
FMOD_OUTPUT_READFROMMIXER after this point. Called from
System::init.
stop
[w] Optional user thread callback just after mixing has finished, calls to
FMOD_OUTPUT_GETPOSITION_CALLBACK /
FMOD_OUTPUT_LOCK_CALLBACK /
FMOD_OUTPUT_UNLOCK_CALLBACK /
FMOD_OUTPUT_MIXER_CALLBACK have stopped, you may not call
FMOD_OUTPUT_READFROMMIXER after this point. Called from
System::close.
close
update
[w] Optional user thread callback once per frame to update internal state. Called
from System::update.
gethandle
[w] Optional user thread callback to provide a pointer to the internal device
object used to share with other audio systems. Called from
System::getOutputHandle.
getposition
[w] Required mixer thread callback (if 'polling' is TRUE) to provide the
hardware playback position in the output ring buffer. Called before a mix.
lock
[w] Required mixer thread callback (if 'polling' is TRUE) to provide a pointer
the mixer can write to for the next block of audio data. Called before a mix.
unlock
[w] Optional mixer thread callback (if 'polling' is TRUE) to signify the mixer has
finished writing to the pointer from FMOD_OUTPUT_LOCK_CALLBACK.
Called after a mix.
mixer
[w] Optional mixer thread callback (if 'polling' is FALSE) called repeatedly to
give a thread for waiting on an audio hardware synchronization primitive (see
remarks for details). Ensure you have a reasonable timeout (~200ms) on your
synchronization primitive and allow this callback to return once per wakeup to
avoid deadlocks.
object3dgetinfo
[w] Optional mixer thread callback to provide information about the capabilities
of 3D object hardware. Called during a mix.
object3dalloc
[w] Optional mixer thread callback to reserve a hardware resources for a single
3D object. Called during a mix.
object3dfree
object3dupdate
[w] Optional mixer thread callback once for every acquired 3D object every mix
to provide 3D information and buffered audio. Called during a mix.
openport
[w] Optional main thread callback to open an auxiliary output port on the device.
closeport
[w] Optional main thread callback to close an auxiliary output port on the
device.
Remarks
There are several methods for driving the FMOD mixer to service the audio
hardware.
Callbacks marked with 'user thread' will be called in response to the user of the
FMOD low level API, in the case of the Studio runtime API, the user is the
Studio Update thread.
Members marked with [r] mean read only for the developer, read/write for the
FMOD system.
Members marked with [w] mean read/write for the developer, read only for the
FMOD system.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.OUTPUT_DESCRIPTION()", no 'new' keyword is required.
See Also
FMOD_OUTPUT_STATE
FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK
FMOD_OUTPUT_GETDRIVERINFO_CALLBACK
FMOD_OUTPUT_INIT_CALLBACK
FMOD_OUTPUT_START_CALLBACK
FMOD_OUTPUT_STOP_CALLBACK
FMOD_OUTPUT_CLOSE_CALLBACK
FMOD_OUTPUT_UPDATE_CALLBACK
FMOD_OUTPUT_GETHANDLE_CALLBACK
FMOD_OUTPUT_GETPOSITION_CALLBACK
FMOD_OUTPUT_LOCK_CALLBACK
FMOD_OUTPUT_UNLOCK_CALLBACK
FMOD_OUTPUT_MIXER_CALLBACK
FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK
FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK
FMOD_OUTPUT_OBJECT3DFREE_CALLBACK
FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK
C/C++ Syntax
typedef struct {
float *buffer;
unsigned int bufferlength;
FMOD_VECTOR position;
float gain;
float spread;
float priority;
} FMOD_OUTPUT_OBJECT3DINFO;
JavaScript Syntax
struct FMOD_OUTPUT_OBJECT3DINFO
{
bufferlength,
gain,
spread,
priority,
};
Members
buffer
[r] Mono PCM floating point buffer. This buffer needs to be scaled by the gain
value to get distance attenuation.
bufferlength
position
gain
spread
[r] 0 - 360 degrees. 0 = point source, 360 = sound is spread around all speakers
priority
[r] 0.0 to 1.0 - 0 = most important, 1 = least important. Based on height and
distance (height is more important).
Remarks
FMOD does not attenuate the buffer, but provides a 'gain' parameter that the user
must use to scale the buffer by. Rather than pre-attenuating the buffer, the plugin
developer can access untouched data for other purposes, like reverb sending for
example. The 'gain' parameter is based on the user's 3D custom rolloff model.
Members marked with [r] mean read only for the developer, read/write for the
FMOD system. Members marked with [w] mean read/write for the developer,
read only for the FMOD system.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.OUTPUT_OBJECT3DINFO()", no 'new' keyword is required.
See Also
FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK
C/C++ Syntax
typedef struct {
void *plugindata;
FMOD_OUTPUT_READFROMMIXER_FUNC readfrommixer;
FMOD_OUTPUT_ALLOC_FUNC alloc;
FMOD_OUTPUT_FREE_FUNC free;
FMOD_OUTPUT_LOG_FUNC log;
FMOD_OUTPUT_COPYPORT_FUNC copyport;
FMOD_OUTPUT_REQUESTRESET_FUNC requestreset;
} FMOD_OUTPUT_STATE;
JavaScript Syntax
struct FMOD_OUTPUT_STATE
{
plugindata,
};
Members
plugindata
[w] Pointer used to store any plugin specific state so it's available in all
callbacks.
readfrommixer
[r] Function to execute the mixer producing a buffer of audio. Used to control
when the mix occurs manually as an alternative to
FMOD_OUTPUT_DESCRIPTION::polling == TRUE.
alloc
free
log
copyport
[r] Function to copy the output from the mixer for the given auxiliary port.
requestreset
[r] Function to request the output plugin be shutdown then restarted during the
next System::update.
Remarks
Members marked with [r] mean read only for the developer, read/write for the
FMOD system. Members marked with [w] mean read/write for the developer,
read only for the FMOD system.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.OUTPUT_STATE()", no
'new' keyword is required.
See Also
FMOD_OUTPUT_DESCRIPTION
C/C++ Syntax
typedef struct {
FMOD_PLUGINTYPE type;
void* description;
} FMOD_PLUGINLIST;
JavaScript Syntax
struct FMOD_PLUGINLIST
{
type,
description,
};
Members
type
description
This structure is returned from a plugin as a pointer to a list where the last entry
has FMOD_PLUGINTYPE_MAX and a null description pointer.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.PLUGINLIST()", no
'new' keyword is required.
See Also
System::getNumNestedPlugins
System::getNestedPlugin
C/C++ Syntax
typedef struct {
float DecayTime;
float EarlyDelay;
float LateDelay;
float HFReference;
float HFDecayRatio;
float Diffusion;
float Density;
float LowShelfFrequency;
float LowShelfGain;
float HighCut;
float EarlyLateMix;
float WetLevel;
} FMOD_REVERB_PROPERTIES;
JavaScript Syntax
struct FMOD_REVERB_PROPERTIES
{
DecayTime,
EarlyDelay,
LateDelay,
HFReference,
HFDecayRatio,
Diffusion,
Density,
LowShelfFrequency,
LowShelfGain,
HighCut,
EarlyLateMix,
WetLevel,
};
Members
DecayTime
EarlyDelay
LateDelay
[r/w] 0.0 100 11.0 Late reverberation delay time relative to initial reflection (ms)
HFReference
HFDecayRatio
[r/w] 10.0 100.0 50.0 High-frequency to mid-frequency decay time ratio (%)
Diffusion
[r/w] 0.0 100.0 100.0 Value that controls the echo density in the late
reverberation decay (%)
Density
[r/w] 0.0 100.0 100.0 Value that controls the modal density in the late
reverberation decay (%)
LowShelfFrequency
LowShelfGain
[r/w] -36.0 12.0 0.0 Relative room effect level at low frequencies (dB)
HighCut
[r/w] 20.0 20000.0 20000.0 Relative room effect level at high frequencies (Hz)
EarlyLateMix
[r/w] 0.0 100.0 50.0 Early reflections level relative to room effect (%)
WetLevel
[r/w] -80.0 20.0 -6.0 Room effect level at mid frequencies (dB)
Remarks
Note the default reverb properties are the same as the
FMOD_PRESET_GENERIC preset.
All members are read/write [r/w], written to by FMOD when queried with
System::getReverbProperties and read by FMOD when set with
System::setReverbProperties.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.REVERB_PROPERTIES()", no 'new' keyword is required.
See Also
System::setReverbProperties
System::getReverbProperties
FMOD_REVERB_PRESETS
C/C++ Syntax
typedef struct {
FMOD_TAGTYPE type;
FMOD_TAGDATATYPE datatype;
char *name;
void *data;
unsigned int datalen;
FMOD_BOOL updated;
} FMOD_TAG;
JavaScript Syntax
struct FMOD_TAG
{
type,
datatype,
data,
datalen,
updated,
};
Members
type
datatype
name
data
[r] Pointer to the tag data - its format is determined by the datatype member
datalen
updated
[r] True if this tag has been updated since last being accessed with
Sound::getTag
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.TAG()", no 'new'
keyword is required.
See Also
Sound::getTag
FMOD_TAGTYPE
FMOD_TAGDATATYPE
C/C++ Syntax
typedef struct {
float x;
float y;
float z;
} FMOD_VECTOR;
JavaScript Syntax
struct FMOD_VECTOR
{
x,
y,
z,
};
Members
x
X coordinate in 3D space.
Y coordinate in 3D space.
Z coordinate in 3D space.
Remarks
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.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use "FMOD.VECTOR()", no 'new'
keyword is required.
See Also
System::set3DListenerAttributes
System::get3DListenerAttributes
Channel::set3DAttributes
Channel::get3DAttributes
Channel::set3DCustomRolloff
Channel::get3DCustomRolloff
Sound::set3DCustomRolloff
Sound::get3DCustomRolloff
Geometry::addPolygon
Geometry::setPolygonVertex
Geometry::getPolygonVertex
Geometry::setRotation
Geometry::getRotation
Geometry::setPosition
Geometry::getPosition
Geometry::setScale
Geometry::getScale
FMOD_INITFLAGS
C/C++ Syntax
#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
#define FMOD_CHANNELMASK_LRC (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FR
#define FMOD_CHANNELMASK_QUAD (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_F
#define FMOD_CHANNELMASK_SURROUND (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMA
#define FMOD_CHANNELMASK_5POINT1 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMAS
#define FMOD_CHANNELMASK_5POINT1_REARS (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHAN
#define FMOD_CHANNELMASK_7POINT0 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMAS
#define FMOD_CHANNELMASK_7POINT1 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMAS
JavaScript Syntax
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
FMOD.CHANNELMASK_BACK_CENTER
FMOD.CHANNELMASK_MONO
FMOD.CHANNELMASK_STEREO
FMOD.CHANNELMASK_LRC
FMOD.CHANNELMASK_QUAD
FMOD.CHANNELMASK_SURROUND
FMOD.CHANNELMASK_5POINT1
FMOD.CHANNELMASK_5POINT1_REARS
FMOD.CHANNELMASK_7POINT0
FMOD.CHANNELMASK_7POINT1
Values
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
FMOD_CHANNELMASK_BACK_CENTER
FMOD_CHANNELMASK_MONO
FMOD_CHANNELMASK_STEREO
FMOD_CHANNELMASK_LRC
FMOD_CHANNELMASK_QUAD
FMOD_CHANNELMASK_SURROUND
FMOD_CHANNELMASK_5POINT1
FMOD_CHANNELMASK_5POINT1_REARS
FMOD_CHANNELMASK_7POINT0
FMOD_CHANNELMASK_7POINT1
See Also
DSP::setChannelFormat
DSP::getChannelFormat
FMOD_SPEAKERMODE
C/C++ Syntax
#define FMOD_CODEC_WAVEFORMAT_VERSION 3
JavaScript Syntax
FMOD.CODEC_WAVEFORMAT_VERSION
Values
FMOD_CODEC_WAVEFORMAT_VERSION
See Also
FMOD_CODEC_STATE
FMOD_CODEC_DESCRIPTION
FMOD_CODEC_OPEN_CALLBACK
C/C++ Syntax
#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_DISPLAY_TIMESTAMPS 0x00010000
#define FMOD_DEBUG_DISPLAY_LINENUMBERS 0x00020000
#define FMOD_DEBUG_DISPLAY_THREAD 0x00040000
JavaScript Syntax
FMOD.DEBUG_LEVEL_NONE
FMOD.DEBUG_LEVEL_ERROR
FMOD.DEBUG_LEVEL_WARNING
FMOD.DEBUG_LEVEL_LOG
FMOD.DEBUG_TYPE_MEMORY
FMOD.DEBUG_TYPE_FILE
FMOD.DEBUG_TYPE_CODEC
FMOD.DEBUG_TYPE_TRACE
FMOD.DEBUG_DISPLAY_TIMESTAMPS
FMOD.DEBUG_DISPLAY_LINENUMBERS
FMOD.DEBUG_DISPLAY_THREAD
Values
FMOD_DEBUG_LEVEL_NONE
FMOD_DEBUG_LEVEL_ERROR
FMOD_DEBUG_LEVEL_WARNING
FMOD_DEBUG_LEVEL_LOG
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_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
FMOD_Debug_Initialize
C/C++ Syntax
#define FMOD_DRIVER_STATE_CONNECTED 0x00000001
#define FMOD_DRIVER_STATE_DEFAULT 0x00000002
JavaScript Syntax
FMOD.DRIVER_STATE_CONNECTED
FMOD.DRIVER_STATE_DEFAULT
Values
FMOD_DRIVER_STATE_CONNECTED
FMOD_DRIVER_STATE_DEFAULT
DSP plugins should not copy more than this number of bytes into the buffer or
memory corruption will occur.
C/C++ Syntax
#define FMOD_DSP_GETPARAM_VALUESTR_LENGTH 32
JavaScript Syntax
FMOD.DSP_GETPARAM_VALUESTR_LENGTH
Values
FMOD_DSP_GETPARAM_VALUESTR_LENGTH
See Also
FMOD_DSP_GETPARAM_FLOAT_CALLBACK
FMOD_DSP_GETPARAM_INT_CALLBACK
FMOD_DSP_GETPARAM_BOOL_CALLBACK
FMOD_DSP_GETPARAM_DATA_CALLBACK
C/C++ Syntax
#define FMOD_INIT_NORMAL 0x00000000
#define FMOD_INIT_STREAM_FROM_UPDATE 0x00000001
#define FMOD_INIT_MIX_FROM_UPDATE 0x00000002
#define FMOD_INIT_3D_RIGHTHANDED 0x00000004
#define FMOD_INIT_CHANNEL_LOWPASS 0x00000100
#define FMOD_INIT_CHANNEL_DISTANCEFILTER 0x00000200
#define FMOD_INIT_PROFILE_ENABLE 0x00010000
#define FMOD_INIT_VOL0_BECOMES_VIRTUAL 0x00020000
#define FMOD_INIT_GEOMETRY_USECLOSEST 0x00040000
#define FMOD_INIT_PREFER_DOLBY_DOWNMIX 0x00080000
#define FMOD_INIT_THREAD_UNSAFE 0x00100000
#define FMOD_INIT_PROFILE_METER_ALL 0x00200000
#define FMOD_INIT_DISABLE_SRS_HIGHPASSFILTER 0x00400000
JavaScript Syntax
FMOD.INIT_NORMAL
FMOD.INIT_STREAM_FROM_UPDATE
FMOD.INIT_MIX_FROM_UPDATE
FMOD.INIT_3D_RIGHTHANDED
FMOD.INIT_CHANNEL_LOWPASS
FMOD.INIT_CHANNEL_DISTANCEFILTER
FMOD.INIT_PROFILE_ENABLE
FMOD.INIT_VOL0_BECOMES_VIRTUAL
FMOD.INIT_GEOMETRY_USECLOSEST
FMOD.INIT_PREFER_DOLBY_DOWNMIX
FMOD.INIT_THREAD_UNSAFE
FMOD.INIT_PROFILE_METER_ALL
Values
FMOD_INIT_NORMAL
Initialize normally
FMOD_INIT_STREAM_FROM_UPDATE
FMOD_INIT_MIX_FROM_UPDATE
FMOD_INIT_3D_RIGHTHANDED
FMOD_INIT_CHANNEL_LOWPASS
FMOD_INIT_CHANNEL_DISTANCEFILTER
All FMOD_3D based voices will add a software lowpass and highpass filter
effect into the DSP chain which will act as a distance-automated bandpass filter.
Use System::setAdvancedSettings to adjust the center frequency.
FMOD_INIT_PROFILE_ENABLE
Enable TCP/IP based host which allows FMOD Designer or FMOD Profiler to
connect to it, and view memory, CPU and the DSP network graph in real-time.
FMOD_INIT_VOL0_BECOMES_VIRTUAL
Any sounds that are 0 volume will go virtual and not be processed except for
having their positions updated virtually. Use System::setAdvancedSettings to
adjust what volume besides zero to switch to virtual at.
FMOD_INIT_GEOMETRY_USECLOSEST
With the geometry engine, only process the closest polygon rather than
accumulating all polygons the sound to listener line intersects.
FMOD_INIT_PREFER_DOLBY_DOWNMIX
FMOD_INIT_THREAD_UNSAFE
Disables thread safety for API calls. Only use this if FMOD low level is being
called from a single thread, and if Studio API is not being used!
FMOD_INIT_PROFILE_METER_ALL
Slower, but adds level metering for every single DSP unit in the graph. Use
DSP::setMeteringEnabled to turn meters off individually.
FMOD_INIT_DISABLE_SRS_HIGHPASSFILTER
C/C++ Syntax
#define FMOD_MAX_CHANNEL_WIDTH 32
JavaScript Syntax
FMOD.MAX_CHANNEL_WIDTH
Values
FMOD_MAX_CHANNEL_WIDTH
See Also
FMOD_CHANNELORDER
FMOD_CREATESOUNDEXINFO
System::setSoftwareFormat
System::getDefaultMixMatrix
ChannelControl::setMixMatrix
ChannelControl::getMixMatrix
FMOD::DSP::setChannelFormat
C/C++ Syntax
#define FMOD_MAX_LISTENERS 8
JavaScript Syntax
FMOD.MAX_LISTENERS
Values
FMOD_MAX_LISTENERS
See Also
System::set3DNumListeners
System::set3DListenerAttributes
System::get3DListenerAttributes
C/C++ Syntax
#define FMOD_MAX_SYSTEMS 8
Values
FMOD_MAX_SYSTEMS
See Also
System_Create
Remember this is a bitfield. You may get more than 1 bit set (ie physical +
persistent) so do not simply switch on the types! You must check each bit
individually or clear out the bits that you do not want within the callback.
Bits can be excluded if you want during Memory_Initialize so that you never get
them.
C/C++ Syntax
#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_XBOX360_PHYSICAL 0x00100000
#define FMOD_MEMORY_PERSISTENT 0x00200000
#define FMOD_MEMORY_SECONDARY 0x00400000
#define FMOD_MEMORY_ALL 0xFFFFFFFF
JavaScript Syntax
FMOD.MEMORY_NORMAL
FMOD.MEMORY_STREAM_FILE
FMOD.MEMORY_STREAM_DECODE
FMOD.MEMORY_SAMPLEDATA
FMOD.MEMORY_DSP_BUFFER
FMOD.MEMORY_PLUGIN
FMOD.MEMORY_XBOX360_PHYSICAL
FMOD.MEMORY_PERSISTENT
FMOD.MEMORY_SECONDARY
FMOD.MEMORY_ALL
Values
FMOD_MEMORY_NORMAL
Standard memory.
FMOD_MEMORY_STREAM_FILE
FMOD_MEMORY_STREAM_DECODE
FMOD_MEMORY_SAMPLEDATA
FMOD_MEMORY_DSP_BUFFER
DSP memory block allocated when more than 1 output exists on a DSP node.
FMOD_MEMORY_PLUGIN
FMOD_MEMORY_XBOX360_PHYSICAL
FMOD_MEMORY_PERSISTENT
FMOD_MEMORY_SECONDARY
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 sound 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.
C/C++ Syntax
#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_LOADSECONDARYRAM 0x20000000
#define FMOD_VIRTUAL_PLAYFROMSTART 0x80000000
JavaScript Syntax
FMOD.DEFAULT
FMOD.LOOP_OFF
FMOD.LOOP_NORMAL
FMOD.LOOP_BIDI
FMOD._2D
FMOD._3D
FMOD.CREATESTREAM
FMOD.CREATESAMPLE
FMOD.CREATECOMPRESSEDSAMPLE
FMOD.OPENUSER
FMOD.OPENMEMORY
FMOD.OPENMEMORY_POINT
FMOD.OPENRAW
FMOD.OPENONLY
FMOD.ACCURATETIME
FMOD.MPEGSEARCH
FMOD.NONBLOCKING
FMOD.UNIQUE
FMOD._3D_HEADRELATIVE
FMOD._3D_WORLDRELATIVE
FMOD._3D_INVERSEROLLOFF
FMOD._3D_LINEARROLLOFF
FMOD._3D_LINEARSQUAREROLLOFF
FMOD._3D_INVERSETAPEREDROLLOFF
FMOD._3D_CUSTOMROLLOFF
FMOD._3D_IGNOREGEOMETRY
FMOD.IGNORETAGS
FMOD.LOWMEM
FMOD.LOADSECONDARYRAM
FMOD.VIRTUAL_PLAYFROMSTART
Values
FMOD_DEFAULT
FMOD_LOOP_OFF
FMOD_LOOP_NORMAL
FMOD_LOOP_BIDI
For bidirectional looping sounds. (only works on software mixed static sounds).
FMOD_2D
FMOD_3D
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
FMOD_CREATECOMPRESSEDSAMPLE
FMOD_OPENUSER
FMOD_OPENMEMORY
FMOD_OPENMEMORY_POINT
FMOD_OPENRAW
Will ignore file format and treat as raw pcm. Use
FMOD_CREATESOUNDEXINFO to specify format. Requires at least
defaultfrequency, numchannels and format to be specified before it will open.
Must be little endian data.
FMOD_OPENONLY
Just open the file, dont prebuffer or read. Good for fast opens for info, or when
sound::readData is to be used.
FMOD_ACCURATETIME
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
FMOD_UNIQUE
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 will follow the inverse rolloff model where mindistance = full
volume, maxdistance = where sound stops attenuating, and rolloff is fixed
according to the global rolloff factor. (DEFAULT)
FMOD_3D_LINEARROLLOFF
This sound will follow a linear rolloff model where mindistance = full volume,
maxdistance = silence.
FMOD_3D_LINEARSQUAREROLLOFF
This sound will follow a linear-square rolloff model where mindistance = full
volume, maxdistance = silence.
FMOD_3D_INVERSETAPEREDROLLOFF
This sound will follow the inverse rolloff model at distances close to
mindistance and a linear-square rolloff close to maxdistance.
FMOD_3D_CUSTOMROLLOFF
FMOD_3D_IGNOREGEOMETRY
FMOD_IGNORETAGS
FMOD_LOWMEM
Removes some features from samples to give a lower memory overhead, like
Sound::getName. See remarks.
FMOD_LOADSECONDARYRAM
Load sound into the secondary RAM of supported platform. On PS3, sounds will
be loaded into RSX/VRAM.
FMOD_VIRTUAL_PLAYFROMSTART
For sounds 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 sound play from the start.
See Also
System::createSound
System::createStream
Sound::setMode
Sound::getMode
Channel::setMode
Channel::getMode
Sound::set3DCustomRolloff
Channel::set3DCustomRolloff
Sound::getOpenState
JavaScript Syntax
FMOD.PORT_INDEX_NONE
Values
FMOD_PORT_INDEX_NONE
C/C++ Syntax
#define FMOD_REVERB_MAXINSTANCES 4
JavaScript Syntax
FMOD.REVERB_MAXINSTANCES
Values
FMOD_REVERB_MAXINSTANCES
See Also
ChannelControl::setReverbProperties
ChannelControl::setReverbProperties
System::setReverbProperties
System::getReverbProperties
C/C++ Syntax
#define FMOD_PRESET_OFF { 1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20,
#define FMOD_PRESET_GENERIC { 1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14
#define FMOD_PRESET_PADDEDCELL { 170, 1, 2, 5000, 10, 100, 100, 250, 0,
#define FMOD_PRESET_ROOM { 400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050
#define FMOD_PRESET_BATHROOM { 1500, 7, 11, 5000, 54, 100, 60, 250, 0,
#define FMOD_PRESET_LIVINGROOM { 500, 3, 4, 5000, 10, 100, 100, 250, 0,
#define FMOD_PRESET_STONEROOM { 2300, 12, 17, 5000, 64, 100, 100, 250, 0,
#define FMOD_PRESET_AUDITORIUM { 4300, 20, 30, 5000, 59, 100, 100, 250, 0,
#define FMOD_PRESET_CONCERTHALL { 3900, 20, 29, 5000, 70, 100, 100, 250, 0
#define FMOD_PRESET_CAVE { 2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000
#define FMOD_PRESET_ARENA { 7200, 20, 30, 5000, 33, 100, 100, 250, 0, 450
#define FMOD_PRESET_HANGAR { 10000, 20, 30, 5000, 23, 100, 100, 250, 0, 34
#define FMOD_PRESET_CARPETTEDHALLWAY { 300, 2, 30, 5000, 10, 100, 100, 2
#define FMOD_PRESET_HALLWAY { 1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7
#define FMOD_PRESET_STONECORRIDOR { 270, 13, 20, 5000, 79, 100, 100, 250,
#define FMOD_PRESET_ALLEY { 1500, 7, 11, 5000, 86, 100, 100, 250, 0, 830
#define FMOD_PRESET_FOREST { 1500, 162, 88, 5000, 54, 79, 100, 250, 0, 7
#define FMOD_PRESET_CITY { 1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050
#define FMOD_PRESET_MOUNTAINS { 1500, 300, 100, 5000, 21, 27, 100, 250, 0,
#define FMOD_PRESET_QUARRY { 1500, 61, 25, 5000, 83, 100, 100, 250, 0, 34
#define FMOD_PRESET_PLAIN { 1500, 179, 100, 5000, 50, 21, 100, 250, 0, 167
#define FMOD_PRESET_PARKINGLOT { 1700, 8, 12, 5000, 100, 100, 100, 250, 0,
#define FMOD_PRESET_SEWERPIPE { 2800, 14, 21, 5000, 14, 80, 60, 250, 0,
#define FMOD_PRESET_UNDERWATER { 1500, 7, 11, 5000, 10, 100, 100, 250, 0,
Values
FMOD_PRESET_OFF
Off / disabled
FMOD_PRESET_GENERIC
Generic / default
FMOD_PRESET_PADDEDCELL
Padded cell
FMOD_PRESET_ROOM
Room
FMOD_PRESET_BATHROOM
Bathroom
FMOD_PRESET_LIVINGROOM
Living room
FMOD_PRESET_STONEROOM
Stone room
FMOD_PRESET_AUDITORIUM
Auditorium
FMOD_PRESET_CONCERTHALL
Convert hall
FMOD_PRESET_CAVE
Cave
FMOD_PRESET_ARENA
Arena
FMOD_PRESET_HANGAR
Hangar
FMOD_PRESET_CARPETTEDHALLWAY
Carpeted hallway
FMOD_PRESET_HALLWAY
Hallway
FMOD_PRESET_STONECORRIDOR
Stone corridor
FMOD_PRESET_ALLEY
Alley
FMOD_PRESET_FOREST
Forest
FMOD_PRESET_CITY
City
FMOD_PRESET_MOUNTAINS
Mountains
FMOD_PRESET_QUARRY
Quarry
FMOD_PRESET_PLAIN
Plain
FMOD_PRESET_PARKINGLOT
Parking lot
FMOD_PRESET_SEWERPIPE
Sewer pipe
FMOD_PRESET_UNDERWATER
Underwater
See Also
System::setReverbProperties
System::getReverbProperties
Each callback has commanddata parameters passed as void* unique to the type
of callback.
See reference to FMOD_SYSTEM_CALLBACK to determine what they might
mean for each type of callback.
C/C++ Syntax
#define FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED 0x00000001
#define FMOD_SYSTEM_CALLBACK_DEVICELOST 0x00000002
#define FMOD_SYSTEM_CALLBACK_MEMORYALLOCATIONFAILED 0x00000004
#define FMOD_SYSTEM_CALLBACK_THREADCREATED 0x00000008
#define FMOD_SYSTEM_CALLBACK_BADDSPCONNECTION 0x00000010
#define FMOD_SYSTEM_CALLBACK_PREMIX 0x00000020
#define FMOD_SYSTEM_CALLBACK_POSTMIX 0x00000040
#define FMOD_SYSTEM_CALLBACK_ERROR 0x00000080
#define FMOD_SYSTEM_CALLBACK_MIDMIX 0x00000100
#define FMOD_SYSTEM_CALLBACK_THREADDESTROYED 0x00000200
#define FMOD_SYSTEM_CALLBACK_PREUPDATE 0x00000400
#define FMOD_SYSTEM_CALLBACK_POSTUPDATE 0x00000800
#define FMOD_SYSTEM_CALLBACK_RECORDLISTCHANGED 0x00001000
#define FMOD_SYSTEM_CALLBACK_ALL 0xFFFFFFFF
JavaScript Syntax
FMOD.SYSTEM_CALLBACK_DEVICELISTCHANGED
FMOD.SYSTEM_CALLBACK_DEVICELOST
FMOD.SYSTEM_CALLBACK_MEMORYALLOCATIONFAILED
FMOD.SYSTEM_CALLBACK_THREADCREATED
FMOD.SYSTEM_CALLBACK_BADDSPCONNECTION
FMOD.SYSTEM_CALLBACK_PREMIX
FMOD.SYSTEM_CALLBACK_POSTMIX
FMOD.SYSTEM_CALLBACK_ERROR
FMOD.SYSTEM_CALLBACK_MIDMIX
FMOD.SYSTEM_CALLBACK_THREADDESTROYED
FMOD.SYSTEM_CALLBACK_PREUPDATE
FMOD.SYSTEM_CALLBACK_POSTUPDATE
FMOD.SYSTEM_CALLBACK_RECORDLISTCHANGED
FMOD.SYSTEM_CALLBACK_ALL
Values
FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED
Called from System::update when the enumerated list of devices has changed.
FMOD_SYSTEM_CALLBACK_DEVICELOST
Called from System::update when an output device has been lost due to control
panel parameter changes and FMOD cannot automatically recover.
FMOD_SYSTEM_CALLBACK_MEMORYALLOCATIONFAILED
FMOD_SYSTEM_CALLBACK_THREADCREATED
FMOD_SYSTEM_CALLBACK_BADDSPCONNECTION
Called when a bad connection was made with DSP::addInput. Usually called
from mixer thread because that is where the connections are made.
FMOD_SYSTEM_CALLBACK_PREMIX
FMOD_SYSTEM_CALLBACK_POSTMIX
FMOD_SYSTEM_CALLBACK_ERROR
Called when each API function returns an error code, including delayed async
functions.
FMOD_SYSTEM_CALLBACK_MIDMIX
Called each tick in mix update after clocks have been updated before the main
mix occurs.
FMOD_SYSTEM_CALLBACK_THREADDESTROYED
FMOD_SYSTEM_CALLBACK_PREUPDATE
FMOD_SYSTEM_CALLBACK_POSTUPDATE
FMOD_SYSTEM_CALLBACK_RECORDLISTCHANGED
Called from System::update when the enumerated list of recording devices has
changed.
FMOD_SYSTEM_CALLBACK_ALL
C/C++ Syntax
#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
JavaScript Syntax
FMOD.TIMEUNIT_MS
FMOD.TIMEUNIT_PCM
FMOD.TIMEUNIT_PCMBYTES
FMOD.TIMEUNIT_RAWBYTES
FMOD.TIMEUNIT_PCMFRACTION
FMOD.TIMEUNIT_MODORDER
FMOD.TIMEUNIT_MODROW
FMOD.TIMEUNIT_MODPATTERN
FMOD.TIMEUNIT_BUFFERED
Values
FMOD_TIMEUNIT_MS
Milliseconds.
FMOD_TIMEUNIT_PCM
FMOD_TIMEUNIT_PCMBYTES
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
FMOD_TIMEUNIT_MODROW
FMOD_TIMEUNIT_MODPATTERN
C/C++ Syntax
typedef enum {
FMOD_CHANNELCONTROL_CALLBACK_END,
FMOD_CHANNELCONTROL_CALLBACK_VIRTUALVOICE,
FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT,
FMOD_CHANNELCONTROL_CALLBACK_OCCLUSION,
FMOD_CHANNELCONTROL_CALLBACK_MAX
} FMOD_CHANNELCONTROL_CALLBACK_TYPE;
JavaScript Syntax
FMOD.CHANNELCONTROL_CALLBACK_END
FMOD.CHANNELCONTROL_CALLBACK_VIRTUALVOICE
FMOD.CHANNELCONTROL_CALLBACK_SYNCPOINT
FMOD.CHANNELCONTROL_CALLBACK_OCCLUSION
FMOD.CHANNELCONTROL_CALLBACK_MAX
FMOD.CHANNELCONTROL_CALLBACK_FORCEINT
Values
FMOD_CHANNELCONTROL_CALLBACK_END
FMOD_CHANNELCONTROL_CALLBACK_VIRTUALVOICE
FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT
FMOD_CHANNELCONTROL_CALLBACK_OCCLUSION
Called when the channel has its geometry occlusion value calculated. Can be
used to clamp or change the value.
FMOD_CHANNELCONTROL_CALLBACK_MAX
Note! Currently the user must call System::update for these callbacks to trigger!
See Also
Channel::setCallback
ChannelGroup::setCallback
FMOD_CHANNELCONTROL_CALLBACK
System::update
C/C++ Syntax
typedef enum {
FMOD_CHANNELCONTROL_DSP_HEAD,
FMOD_CHANNELCONTROL_DSP_FADER,
FMOD_CHANNELCONTROL_DSP_TAIL
} FMOD_CHANNELCONTROL_DSP_INDEX;
JavaScript Syntax
FMOD.CHANNELCONTROL_DSP_HEAD
FMOD.CHANNELCONTROL_DSP_FADER
FMOD.CHANNELCONTROL_DSP_TAIL
FMOD.CHANNELCONTROL_DSP_FORCEINT
Values
FMOD_CHANNELCONTROL_DSP_HEAD
FMOD_CHANNELCONTROL_DSP_FADER
FMOD_CHANNELCONTROL_DSP_TAIL
C/C++ Syntax
typedef enum {
FMOD_CHANNELCONTROL_CHANNEL,
FMOD_CHANNELCONTROL_CHANNELGROUP
} FMOD_CHANNELCONTROL_TYPE;
JavaScript Syntax
FMOD.CHANNELCONTROL_CHANNEL
FMOD.CHANNELCONTROL_CHANNELGROUP
FMOD.CHANNELCONTROL_FORCEINT
Values
FMOD_CHANNELCONTROL_CHANNEL
FMOD_CHANNELCONTROL_CHANNELGROUP
Remarks
Cast the FMOD_CHANNELCONTROL to an
FMOD_CHANNEL/FMOD::Channel, or
FMOD_CHANNELGROUP/FMOD::ChannelGroup if specific functionality is
needed for either class. Otherwise use as
FMOD_CHANNELCONTROL/FMOD::ChannelControl and use that API.
See Also
Channel::setCallback
ChannelGroup::setCallback
This is for sounds that are not 'default'. For example you might have a sound that
is 6 channels but actually made up of 3 stereo pairs, that should all be located in
front left, front right only.
C/C++ Syntax
typedef enum {
FMOD_CHANNELORDER_DEFAULT,
FMOD_CHANNELORDER_WAVEFORMAT,
FMOD_CHANNELORDER_PROTOOLS,
FMOD_CHANNELORDER_ALLMONO,
FMOD_CHANNELORDER_ALLSTEREO,
FMOD_CHANNELORDER_ALSA,
FMOD_CHANNELORDER_MAX
} FMOD_CHANNELORDER;
JavaScript Syntax
FMOD.CHANNELORDER_DEFAULT
FMOD.CHANNELORDER_WAVEFORMAT
FMOD.CHANNELORDER_PROTOOLS
FMOD.CHANNELORDER_ALLMONO
FMOD.CHANNELORDER_ALLSTEREO
FMOD.CHANNELORDER_ALSA
FMOD.CHANNELORDER_MAX
FMOD.CHANNELORDER_FORCEINT
Values
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
FMOD_CHANNELORDER_ALLMONO
Mono, Mono, Mono, Mono, Mono, Mono, ... (each channel all the way up to
FMOD_MAX_CHANNEL_WIDTH channels are treated as if they were mono)
FMOD_CHANNELORDER_ALLSTEREO
Left, Right, Left, Right, Left, Right, ... (each pair of channels is treated as stereo
all the way up to FMOD_MAX_CHANNEL_WIDTH channels)
FMOD_CHANNELORDER_ALSA
Left, Right, Surround Left, Surround Right, Center, LFE (as per Linux ALSA
channel order)
FMOD_CHANNELORDER_MAX
C/C++ Syntax
typedef enum {
FMOD_DEBUG_MODE_TTY,
FMOD_DEBUG_MODE_FILE,
FMOD_DEBUG_MODE_CALLBACK
} FMOD_DEBUG_MODE;
JavaScript Syntax
FMOD.DEBUG_MODE_TTY
FMOD.DEBUG_MODE_FILE
FMOD.DEBUG_MODE_CALLBACK
FMOD.DEBUG_MODE_FORCEINT
Values
FMOD_DEBUG_MODE_TTY
Default log location per platform, i.e. Visual Studio output window, stderr,
LogCat, etc
FMOD_DEBUG_MODE_FILE
FMOD_DEBUG_MODE_CALLBACK
C/C++ Syntax
typedef enum {
FMOD_DSPCONNECTION_TYPE_STANDARD,
FMOD_DSPCONNECTION_TYPE_SIDECHAIN,
FMOD_DSPCONNECTION_TYPE_SEND,
FMOD_DSPCONNECTION_TYPE_SEND_SIDECHAIN,
FMOD_DSPCONNECTION_TYPE_MAX
} FMOD_DSPCONNECTION_TYPE;
JavaScript Syntax
FMOD.DSPCONNECTION_TYPE_STANDARD
FMOD.DSPCONNECTION_TYPE_SIDECHAIN
FMOD.DSPCONNECTION_TYPE_SEND
FMOD.DSPCONNECTION_TYPE_SEND_SIDECHAIN
FMOD.DSPCONNECTION_TYPE_MAX
FMOD.DSPCONNECTION_TYPE_FORCEINT
Values
FMOD_DSPCONNECTION_TYPE_STANDARD
Default connection type. Audio is mixed from the input to the output DSP's
audible buffer.
FMOD_DSPCONNECTION_TYPE_SIDECHAIN
Sidechain connection type. Audio is mixed from the input to the output DSP's
sidechain buffer.
FMOD_DSPCONNECTION_TYPE_SEND
Send connection type. Audio is mixed from the input to the output DSP's audible
buffer, but the input is NOT executed, only copied from. A standard connection
or sidechain needs to make an input execute to generate data.
FMOD_DSPCONNECTION_TYPE_SEND_SIDECHAIN
Send sidechain connection type. Audio is mixed from the input to the output
DSP's sidechain buffer, but the input is NOT executed, only copied from. A
standard connection or sidechain needs to make an input execute to generate
data.
FMOD_DSPCONNECTION_TYPE_MAX
FMOD_DSP_CONNECTION_TYPE_SIDECHAIN
----------------------------------
Sidechain DSPConnection type. Audio is mixed from the input to the output
DSP's sidechain buffer, meaning it will NOT be part of the audible signal. A
sidechain connection will execute its input DSP if it has not been executed
before.
The purpose of the seperate sidechain buffer in a DSP, is so that the DSP effect
can privately access for analysis purposes. An example of use in this case, could
be a compressor which analyzes the signal, to control its own effect parameters
(ie a compression level or gain).
For the effect developer, to accept sidechain data, the sidechain data will appear
in the FMOD_DSP_STATE struct which is passed into the read callback of a
DSP unit.
FMOD_DSP_STATE::sidechaindata and FMOD_DSP::sidechainchannels will
hold the mixed result of any sidechain data flowing into it.
FMOD_DSP_CONNECTION_TYPE_SEND
-----------------------------
Send DSPConnection type. Audio is mixed from the input to the output DSP's
audible buffer, meaning it will be part of the audible signal. A send connection
will NOT execute its input DSP if it has not been executed before.
A send connection will only read what exists at the input's buffer at the time of
executing the output DSP unit (which can be considered the 'return')
FMOD_DSP_CONNECTION_TYPE_SEND_SIDECHAIN
---------------------------------------
Send sidechain DSPConnection type. Audio is mixed from the input to the
output DSP's sidechain buffer, meaning it will NOT be part of the audible signal.
A send sidechain connection will NOT execute its input DSP if it has not been
executed before.
A send sidechain connection will only read what exists at the input's buffer at the
time of executing the output DSP unit (which can be considered the 'sidechain
return').
For the effect developer, to accept sidechain data, the sidechain data will appear
in the FMOD_DSP_STATE struct which is passed into the read callback of a
DSP unit.
FMOD_DSP_STATE::sidechaindata and FMOD_DSP::sidechainchannels will
hold the mixed result of any sidechain data flowing into it.
See Also
DSP::addInput
DSPConnection::getType
C/C++ Syntax
typedef enum {
FMOD_DSP_CHANNELMIX_OUTPUTGROUPING,
FMOD_DSP_CHANNELMIX_GAIN_CH0,
FMOD_DSP_CHANNELMIX_GAIN_CH1,
FMOD_DSP_CHANNELMIX_GAIN_CH2,
FMOD_DSP_CHANNELMIX_GAIN_CH3,
FMOD_DSP_CHANNELMIX_GAIN_CH4,
FMOD_DSP_CHANNELMIX_GAIN_CH5,
FMOD_DSP_CHANNELMIX_GAIN_CH6,
FMOD_DSP_CHANNELMIX_GAIN_CH7,
FMOD_DSP_CHANNELMIX_GAIN_CH8,
FMOD_DSP_CHANNELMIX_GAIN_CH9,
FMOD_DSP_CHANNELMIX_GAIN_CH10,
FMOD_DSP_CHANNELMIX_GAIN_CH11,
FMOD_DSP_CHANNELMIX_GAIN_CH12,
FMOD_DSP_CHANNELMIX_GAIN_CH13,
FMOD_DSP_CHANNELMIX_GAIN_CH14,
FMOD_DSP_CHANNELMIX_GAIN_CH15,
FMOD_DSP_CHANNELMIX_GAIN_CH16,
FMOD_DSP_CHANNELMIX_GAIN_CH17,
FMOD_DSP_CHANNELMIX_GAIN_CH18,
FMOD_DSP_CHANNELMIX_GAIN_CH19,
FMOD_DSP_CHANNELMIX_GAIN_CH20,
FMOD_DSP_CHANNELMIX_GAIN_CH21,
FMOD_DSP_CHANNELMIX_GAIN_CH22,
FMOD_DSP_CHANNELMIX_GAIN_CH23,
FMOD_DSP_CHANNELMIX_GAIN_CH24,
FMOD_DSP_CHANNELMIX_GAIN_CH25,
FMOD_DSP_CHANNELMIX_GAIN_CH26,
FMOD_DSP_CHANNELMIX_GAIN_CH27,
FMOD_DSP_CHANNELMIX_GAIN_CH28,
FMOD_DSP_CHANNELMIX_GAIN_CH29,
FMOD_DSP_CHANNELMIX_GAIN_CH30,
FMOD_DSP_CHANNELMIX_GAIN_CH31
} FMOD_DSP_CHANNELMIX;
JavaScript Syntax
FMOD.DSP_CHANNELMIX_OUTPUTGROUPING
FMOD.DSP_CHANNELMIX_GAIN_CH0
FMOD.DSP_CHANNELMIX_GAIN_CH1
FMOD.DSP_CHANNELMIX_GAIN_CH2
FMOD.DSP_CHANNELMIX_GAIN_CH3
FMOD.DSP_CHANNELMIX_GAIN_CH4
FMOD.DSP_CHANNELMIX_GAIN_CH5
FMOD.DSP_CHANNELMIX_GAIN_CH6
FMOD.DSP_CHANNELMIX_GAIN_CH7
FMOD.DSP_CHANNELMIX_GAIN_CH8
FMOD.DSP_CHANNELMIX_GAIN_CH9
FMOD.DSP_CHANNELMIX_GAIN_CH10
FMOD.DSP_CHANNELMIX_GAIN_CH11
FMOD.DSP_CHANNELMIX_GAIN_CH12
FMOD.DSP_CHANNELMIX_GAIN_CH13
FMOD.DSP_CHANNELMIX_GAIN_CH14
FMOD.DSP_CHANNELMIX_GAIN_CH15
FMOD.DSP_CHANNELMIX_GAIN_CH16
FMOD.DSP_CHANNELMIX_GAIN_CH17
FMOD.DSP_CHANNELMIX_GAIN_CH18
FMOD.DSP_CHANNELMIX_GAIN_CH19
FMOD.DSP_CHANNELMIX_GAIN_CH20
FMOD.DSP_CHANNELMIX_GAIN_CH21
FMOD.DSP_CHANNELMIX_GAIN_CH22
FMOD.DSP_CHANNELMIX_GAIN_CH23
FMOD.DSP_CHANNELMIX_GAIN_CH24
FMOD.DSP_CHANNELMIX_GAIN_CH25
FMOD.DSP_CHANNELMIX_GAIN_CH26
FMOD.DSP_CHANNELMIX_GAIN_CH27
FMOD.DSP_CHANNELMIX_GAIN_CH28
FMOD.DSP_CHANNELMIX_GAIN_CH29
FMOD.DSP_CHANNELMIX_GAIN_CH30
FMOD.DSP_CHANNELMIX_GAIN_CH31
Values
FMOD_DSP_CHANNELMIX_OUTPUTGROUPING
FMOD_DSP_CHANNELMIX_GAIN_CH0
FMOD_DSP_CHANNELMIX_GAIN_CH1
FMOD_DSP_CHANNELMIX_GAIN_CH2
FMOD_DSP_CHANNELMIX_GAIN_CH3
FMOD_DSP_CHANNELMIX_GAIN_CH4
FMOD_DSP_CHANNELMIX_GAIN_CH5
FMOD_DSP_CHANNELMIX_GAIN_CH6
FMOD_DSP_CHANNELMIX_GAIN_CH7
FMOD_DSP_CHANNELMIX_GAIN_CH9
FMOD_DSP_CHANNELMIX_GAIN_CH10
FMOD_DSP_CHANNELMIX_GAIN_CH11
FMOD_DSP_CHANNELMIX_GAIN_CH12
FMOD_DSP_CHANNELMIX_GAIN_CH13
FMOD_DSP_CHANNELMIX_GAIN_CH14
FMOD_DSP_CHANNELMIX_GAIN_CH15
FMOD_DSP_CHANNELMIX_GAIN_CH16
FMOD_DSP_CHANNELMIX_GAIN_CH17
FMOD_DSP_CHANNELMIX_GAIN_CH18
(Type:float) - Channel #18 gain in dB. -80.0 to 10.0. Default = 0.
FMOD_DSP_CHANNELMIX_GAIN_CH19
FMOD_DSP_CHANNELMIX_GAIN_CH20
FMOD_DSP_CHANNELMIX_GAIN_CH21
FMOD_DSP_CHANNELMIX_GAIN_CH22
FMOD_DSP_CHANNELMIX_GAIN_CH23
FMOD_DSP_CHANNELMIX_GAIN_CH24
FMOD_DSP_CHANNELMIX_GAIN_CH25
FMOD_DSP_CHANNELMIX_GAIN_CH26
FMOD_DSP_CHANNELMIX_GAIN_CH27
FMOD_DSP_CHANNELMIX_GAIN_CH28
FMOD_DSP_CHANNELMIX_GAIN_CH30
FMOD_DSP_CHANNELMIX_GAIN_CH31
C/C++ Syntax
typedef enum {
FMOD_DSP_CHANNELMIX_OUTPUT_DEFAULT,
FMOD_DSP_CHANNELMIX_OUTPUT_ALLMONO,
FMOD_DSP_CHANNELMIX_OUTPUT_ALLSTEREO,
FMOD_DSP_CHANNELMIX_OUTPUT_ALLQUAD,
FMOD_DSP_CHANNELMIX_OUTPUT_ALL5POINT1,
FMOD_DSP_CHANNELMIX_OUTPUT_ALL7POINT1,
FMOD_DSP_CHANNELMIX_OUTPUT_ALLLFE
} FMOD_DSP_CHANNELMIX_OUTPUT;
JavaScript Syntax
FMOD.DSP_CHANNELMIX_OUTPUT_DEFAULT
FMOD.DSP_CHANNELMIX_OUTPUT_ALLMONO
FMOD.DSP_CHANNELMIX_OUTPUT_ALLSTEREO
FMOD.DSP_CHANNELMIX_OUTPUT_ALLQUAD
FMOD.DSP_CHANNELMIX_OUTPUT_ALL5POINT1
FMOD.DSP_CHANNELMIX_OUTPUT_ALL7POINT1
FMOD.DSP_CHANNELMIX_OUTPUT_ALLLFE
Values
FMOD_DSP_CHANNELMIX_OUTPUT_DEFAULT
FMOD_DSP_CHANNELMIX_OUTPUT_ALLMONO
Output channel count = 1. Mapping: Mono, Mono, Mono, Mono, Mono, Mono,
... (each channel all the way up to FMOD_MAX_CHANNEL_WIDTH channels
are treated as if they were mono)
FMOD_DSP_CHANNELMIX_OUTPUT_ALLSTEREO
Output channel count = 2. Mapping: Left, Right, Left, Right, Left, Right, ...
(each pair of channels is treated as stereo all the way up to
FMOD_MAX_CHANNEL_WIDTH channels)
FMOD_DSP_CHANNELMIX_OUTPUT_ALLQUAD
FMOD_DSP_CHANNELMIX_OUTPUT_ALL5POINT1
FMOD_DSP_CHANNELMIX_OUTPUT_ALL7POINT1
FMOD_DSP_CHANNELMIX_OUTPUT_ALLLFE
C/C++ Syntax
typedef enum {
FMOD_DSP_CHORUS_MIX,
FMOD_DSP_CHORUS_RATE,
FMOD_DSP_CHORUS_DEPTH
} FMOD_DSP_CHORUS;
JavaScript Syntax
FMOD.DSP_CHORUS_MIX
FMOD.DSP_CHORUS_RATE
FMOD.DSP_CHORUS_DEPTH
Values
FMOD_DSP_CHORUS_MIX
FMOD_DSP_CHORUS_RATE
(Type:float) - Chorus modulation rate in Hz. 0.0 to 20.0. Default = 0.8 Hz.
FMOD_DSP_CHORUS_DEPTH
C/C++ Syntax
typedef enum {
FMOD_DSP_COMPRESSOR_THRESHOLD,
FMOD_DSP_COMPRESSOR_RATIO,
FMOD_DSP_COMPRESSOR_ATTACK,
FMOD_DSP_COMPRESSOR_RELEASE,
FMOD_DSP_COMPRESSOR_GAINMAKEUP,
FMOD_DSP_COMPRESSOR_USESIDECHAIN,
FMOD_DSP_COMPRESSOR_LINKED
} FMOD_DSP_COMPRESSOR;
JavaScript Syntax
FMOD.DSP_COMPRESSOR_THRESHOLD
FMOD.DSP_COMPRESSOR_RATIO
FMOD.DSP_COMPRESSOR_ATTACK
FMOD.DSP_COMPRESSOR_RELEASE
FMOD.DSP_COMPRESSOR_GAINMAKEUP
FMOD.DSP_COMPRESSOR_USESIDECHAIN
FMOD.DSP_COMPRESSOR_LINKED
Values
FMOD_DSP_COMPRESSOR_THRESHOLD
(Type:float) - Threshold level (dB) in the range from -80 through 0. Default = 0.
FMOD_DSP_COMPRESSOR_RATIO
FMOD_DSP_COMPRESSOR_ATTACK
(Type:float) - Attack time (milliseconds), in the range from 0.1 through 1000.
Default value is 20.
FMOD_DSP_COMPRESSOR_RELEASE
FMOD_DSP_COMPRESSOR_GAINMAKEUP
(Type:float) - Make-up gain (dB) applied after limiting, in the range from 0
through 30. Default = 0.
FMOD_DSP_COMPRESSOR_USESIDECHAIN
FMOD_DSP_COMPRESSOR_LINKED
C/C++ Syntax
typedef enum {
FMOD_DSP_CONVOLUTION_REVERB_PARAM_IR,
FMOD_DSP_CONVOLUTION_REVERB_PARAM_WET,
FMOD_DSP_CONVOLUTION_REVERB_PARAM_DRY,
FMOD_DSP_CONVOLUTION_REVERB_PARAM_LINKED
} FMOD_DSP_CONVOLUTION_REVERB;
JavaScript Syntax
FMOD.DSP_CONVOLUTION_REVERB_PARAM_IR
FMOD.DSP_CONVOLUTION_REVERB_PARAM_WET
FMOD.DSP_CONVOLUTION_REVERB_PARAM_DRY
FMOD.DSP_CONVOLUTION_REVERB_PARAM_LINKED
Values
FMOD_DSP_CONVOLUTION_REVERB_PARAM_IR
(Type:data) - [w] Array of signed 16-bit (short) PCM data to be used as reverb
IR. First member of the array should be a 16 bit value (short) which specifies the
number of channels. Array looks like [index 0=numchannels][index 1+ = raw 16
bit PCM data]. Data is copied internally so source can be freed.
FMOD_DSP_CONVOLUTION_REVERB_PARAM_WET
(Type:float) - [r/w] Volume of echo signal to pass to output in dB. -80.0 to 10.0.
Default = 0.
FMOD_DSP_CONVOLUTION_REVERB_PARAM_DRY
FMOD_DSP_CONVOLUTION_REVERB_PARAM_LINKED
C/C++ Syntax
typedef enum {
FMOD_DSP_DELAY_CH0,
FMOD_DSP_DELAY_CH1,
FMOD_DSP_DELAY_CH2,
FMOD_DSP_DELAY_CH3,
FMOD_DSP_DELAY_CH4,
FMOD_DSP_DELAY_CH5,
FMOD_DSP_DELAY_CH6,
FMOD_DSP_DELAY_CH7,
FMOD_DSP_DELAY_CH8,
FMOD_DSP_DELAY_CH9,
FMOD_DSP_DELAY_CH10,
FMOD_DSP_DELAY_CH11,
FMOD_DSP_DELAY_CH12,
FMOD_DSP_DELAY_CH13,
FMOD_DSP_DELAY_CH14,
FMOD_DSP_DELAY_CH15,
FMOD_DSP_DELAY_MAXDELAY
} FMOD_DSP_DELAY;
JavaScript Syntax
FMOD.DSP_DELAY_CH0
FMOD.DSP_DELAY_CH1
FMOD.DSP_DELAY_CH2
FMOD.DSP_DELAY_CH3
FMOD.DSP_DELAY_CH4
FMOD.DSP_DELAY_CH5
FMOD.DSP_DELAY_CH6
FMOD.DSP_DELAY_CH7
FMOD.DSP_DELAY_CH8
FMOD.DSP_DELAY_CH9
FMOD.DSP_DELAY_CH10
FMOD.DSP_DELAY_CH11
FMOD.DSP_DELAY_CH12
FMOD.DSP_DELAY_CH13
FMOD.DSP_DELAY_CH14
FMOD.DSP_DELAY_CH15
FMOD.DSP_DELAY_MAXDELAY
Values
FMOD_DSP_DELAY_CH0
FMOD_DSP_DELAY_CH1
FMOD_DSP_DELAY_CH2
FMOD_DSP_DELAY_CH3
FMOD_DSP_DELAY_CH4
FMOD_DSP_DELAY_CH5
FMOD_DSP_DELAY_CH6
FMOD_DSP_DELAY_CH7
FMOD_DSP_DELAY_CH8
FMOD_DSP_DELAY_CH9
(Type:float) - Channel #9 Delay in ms. 0 to 10000. Default = 0.
FMOD_DSP_DELAY_CH10
FMOD_DSP_DELAY_CH11
FMOD_DSP_DELAY_CH12
FMOD_DSP_DELAY_CH13
FMOD_DSP_DELAY_CH14
FMOD_DSP_DELAY_CH15
FMOD_DSP_DELAY_MAXDELAY
C/C++ Syntax
typedef enum {
FMOD_DSP_DISTORTION_LEVEL
} FMOD_DSP_DISTORTION;
JavaScript Syntax
FMOD.DSP_DISTORTION_LEVEL
Values
FMOD_DSP_DISTORTION_LEVEL
C/C++ Syntax
typedef enum {
FMOD_DSP_ECHO_DELAY,
FMOD_DSP_ECHO_FEEDBACK,
FMOD_DSP_ECHO_DRYLEVEL,
FMOD_DSP_ECHO_WETLEVEL
} FMOD_DSP_ECHO;
JavaScript Syntax
FMOD.DSP_ECHO_DELAY
FMOD.DSP_ECHO_FEEDBACK
FMOD.DSP_ECHO_DRYLEVEL
FMOD.DSP_ECHO_WETLEVEL
Values
FMOD_DSP_ECHO_DELAY
FMOD_DSP_ECHO_FEEDBACK
(Type:float) - Echo decay per delay. 0 to 100. 100.0 = No decay, 0.0 = total
decay (ie simple 1 line delay). Default = 50.0.
FMOD_DSP_ECHO_DRYLEVEL
FMOD_DSP_ECHO_WETLEVEL
C/C++ Syntax
typedef enum {
FMOD_DSP_ENVELOPEFOLLOWER_ATTACK,
FMOD_DSP_ENVELOPEFOLLOWER_RELEASE,
FMOD_DSP_ENVELOPEFOLLOWER_ENVELOPE,
FMOD_DSP_ENVELOPEFOLLOWER_USESIDECHAIN
} FMOD_DSP_ENVELOPEFOLLOWER;
JavaScript Syntax
FMOD.DSP_ENVELOPEFOLLOWER_ATTACK
FMOD.DSP_ENVELOPEFOLLOWER_RELEASE
FMOD.DSP_ENVELOPEFOLLOWER_ENVELOPE
FMOD.DSP_ENVELOPEFOLLOWER_USESIDECHAIN
Values
FMOD_DSP_ENVELOPEFOLLOWER_ATTACK
(Type:float) [r/w] - Attack time (milliseconds), in the range from 0.1 through
1000. Default = 20.
FMOD_DSP_ENVELOPEFOLLOWER_RELEASE
FMOD_DSP_ENVELOPEFOLLOWER_ENVELOPE
FMOD_DSP_ENVELOPEFOLLOWER_USESIDECHAIN
C/C++ Syntax
typedef enum {
FMOD_DSP_FADER_GAIN
} FMOD_DSP_FADER;
Values
FMOD_DSP_FADER_GAIN
C/C++ Syntax
typedef enum {
FMOD_DSP_FFT_WINDOWSIZE,
FMOD_DSP_FFT_WINDOWTYPE,
FMOD_DSP_FFT_SPECTRUMDATA,
FMOD_DSP_FFT_DOMINANT_FREQ
} FMOD_DSP_FFT;
JavaScript Syntax
FMOD.DSP_FFT_WINDOWSIZE
FMOD.DSP_FFT_WINDOWTYPE
FMOD.DSP_FFT_SPECTRUMDATA
FMOD.DSP_FFT_DOMINANT_FREQ
Values
FMOD_DSP_FFT_WINDOWSIZE
(Type:int) - [r/w] Must be a power of 2 between 128 and 16384. 128, 256, 512,
1024, 2048, 4096, 8192, 16384 are accepted. Default = 2048.
FMOD_DSP_FFT_WINDOWTYPE
FMOD_DSP_FFT_SPECTRUMDATA
(Type:data) - [r] Returns the current spectrum values between 0 and 1 for each
'fft bin'. Cast data to FMOD_DSP_PARAMETER_DATA_TYPE_FFT. Divide
the niquist rate by the window size to get the hz value per entry.
FMOD_DSP_FFT_DOMINANT_FREQ
C/C++ Syntax
typedef enum {
FMOD_DSP_FFT_WINDOW_RECT,
FMOD_DSP_FFT_WINDOW_TRIANGLE,
FMOD_DSP_FFT_WINDOW_HAMMING,
FMOD_DSP_FFT_WINDOW_HANNING,
FMOD_DSP_FFT_WINDOW_BLACKMAN,
FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS
} FMOD_DSP_FFT_WINDOW;
JavaScript Syntax
FMOD.DSP_FFT_WINDOW_RECT
FMOD.DSP_FFT_WINDOW_TRIANGLE
FMOD.DSP_FFT_WINDOW_HAMMING
FMOD.DSP_FFT_WINDOW_HANNING
FMOD.DSP_FFT_WINDOW_BLACKMAN
FMOD.DSP_FFT_WINDOW_BLACKMANHARRIS
Values
FMOD_DSP_FFT_WINDOW_RECT
w[n] = 1.0
FMOD_DSP_FFT_WINDOW_TRIANGLE
w[n] = TRI(2n/N)
FMOD_DSP_FFT_WINDOW_HAMMING
FMOD_DSP_FFT_WINDOW_HANNING
FMOD_DSP_FFT_WINDOW_BLACKMAN
FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS
FMOD_DSP_FFT_WINDOW_RECT.
FMOD_DSP_FFT_WINDOW_TRIANGLE.
FMOD_DSP_FFT_WINDOW_HAMMING.
FMOD_DSP_FFT_WINDOW_HANNING.
FMOD_DSP_FFT_WINDOW_BLACKMAN.
FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS.
See Also
FMOD_DSP_FFT
C/C++ Syntax
typedef enum {
FMOD_DSP_FLANGE_MIX,
FMOD_DSP_FLANGE_DEPTH,
FMOD_DSP_FLANGE_RATE
} FMOD_DSP_FLANGE;
JavaScript Syntax
FMOD.DSP_FLANGE_MIX
FMOD.DSP_FLANGE_DEPTH
FMOD.DSP_FLANGE_RATE
Values
FMOD_DSP_FLANGE_MIX
FMOD_DSP_FLANGE_DEPTH
FMOD_DSP_FLANGE_RATE
Flange depth is a percentage of a 10ms shift from the original signal. Anything
above 10ms is not considered flange because to the ear it begins to 'echo' so
10ms is the highest value possible.
See Also
DSP::setParameterFloat
DSP::getParameterFloat
FMOD_DSP_TYPE
C/C++ Syntax
typedef enum {
FMOD_DSP_HIGHPASS_CUTOFF,
FMOD_DSP_HIGHPASS_RESONANCE
} FMOD_DSP_HIGHPASS;
JavaScript Syntax
FMOD.DSP_HIGHPASS_CUTOFF
FMOD.DSP_HIGHPASS_RESONANCE
Values
FMOD_DSP_HIGHPASS_CUTOFF
FMOD_DSP_HIGHPASS_RESONANCE
C/C++ Syntax
typedef enum {
FMOD_DSP_HIGHPASS_SIMPLE_CUTOFF
} FMOD_DSP_HIGHPASS_SIMPLE;
JavaScript Syntax
FMOD.DSP_HIGHPASS_SIMPLE_CUTOFF
Values
FMOD_DSP_HIGHPASS_SIMPLE_CUTOFF
The emphasis is on speed rather than accuracy, so this should not be used for
task requiring critical filtering.
See Also
DSP::setParameterFloat
DSP::getParameterFloat
FMOD_DSP_TYPE
C/C++ Syntax
typedef enum {
FMOD_DSP_ITECHO_WETDRYMIX,
FMOD_DSP_ITECHO_FEEDBACK,
FMOD_DSP_ITECHO_LEFTDELAY,
FMOD_DSP_ITECHO_RIGHTDELAY,
FMOD_DSP_ITECHO_PANDELAY
} FMOD_DSP_ITECHO;
JavaScript Syntax
FMOD.DSP_ITECHO_WETDRYMIX
FMOD.DSP_ITECHO_FEEDBACK
FMOD.DSP_ITECHO_LEFTDELAY
FMOD.DSP_ITECHO_RIGHTDELAY
FMOD.DSP_ITECHO_PANDELAY
Values
FMOD_DSP_ITECHO_WETDRYMIX
FMOD_DSP_ITECHO_FEEDBACK
(Type:float) - Percentage of output fed back into input, in the range from 0.0
through 100.0. Default = 50.
FMOD_DSP_ITECHO_LEFTDELAY
(Type:float) - Delay for left channel, in milliseconds, in the range from 1.0
through 2000.0. Default = 500 ms.
FMOD_DSP_ITECHO_RIGHTDELAY
(Type:float) - Delay for right channel, in milliseconds, in the range from 1.0
through 2000.0. Default = 500 ms.
FMOD_DSP_ITECHO_PANDELAY
(Type:float) - Value that specifies whether to swap left and right delays with each
successive echo. Ranges from 0.0 (equivalent to FALSE) to 1.0 (equivalent to
TRUE), meaning no swap. Default = 0. CURRENTLY NOT SUPPORTED.
Remarks
Note. Every time the delay is changed, the plugin re-allocates the echo buffer.
This means the echo will dissapear at that time while it refills its new buffer.
Larger echo delays result in larger amounts of memory allocated.
As this is a stereo filter made mainly for IT playback, it is targeted for stereo
signals.
With mono signals only the FMOD_DSP_ITECHO_LEFTDELAY is used.
For multichannel signals (>2) there will be no echo on those channels.
See Also
DSP::setParameterFloat
DSP::getParameterFloat
FMOD_DSP_TYPE
C/C++ Syntax
typedef enum {
FMOD_DSP_ITLOWPASS_CUTOFF,
FMOD_DSP_ITLOWPASS_RESONANCE
} FMOD_DSP_ITLOWPASS;
JavaScript Syntax
FMOD.DSP_ITLOWPASS_CUTOFF
FMOD.DSP_ITLOWPASS_RESONANCE
Values
FMOD_DSP_ITLOWPASS_CUTOFF
FMOD_DSP_ITLOWPASS_RESONANCE
C/C++ Syntax
typedef enum {
FMOD_DSP_LIMITER_RELEASETIME,
FMOD_DSP_LIMITER_CEILING,
FMOD_DSP_LIMITER_MAXIMIZERGAIN,
FMOD_DSP_LIMITER_MODE
} FMOD_DSP_LIMITER;
JavaScript Syntax
FMOD.DSP_LIMITER_RELEASETIME
FMOD.DSP_LIMITER_CEILING
FMOD.DSP_LIMITER_MAXIMIZERGAIN
FMOD.DSP_LIMITER_MODE
Values
FMOD_DSP_LIMITER_RELEASETIME
(Type:float) - Time to ramp the silence to full in ms. 1.0 to 1000.0. Default =
10.0.
FMOD_DSP_LIMITER_CEILING
(Type:float) - Maximum level of the output signal in dB. -12.0 to 0.0. Default =
0.0.
FMOD_DSP_LIMITER_MAXIMIZERGAIN
FMOD_DSP_LIMITER_MODE
C/C++ Syntax
typedef enum {
FMOD_DSP_LOWPASS_CUTOFF,
FMOD_DSP_LOWPASS_RESONANCE
} FMOD_DSP_LOWPASS;
JavaScript Syntax
FMOD.DSP_LOWPASS_CUTOFF
FMOD.DSP_LOWPASS_RESONANCE
Values
FMOD_DSP_LOWPASS_CUTOFF
FMOD_DSP_LOWPASS_RESONANCE
C/C++ Syntax
typedef enum {
FMOD_DSP_LOWPASS_SIMPLE_CUTOFF
} FMOD_DSP_LOWPASS_SIMPLE;
JavaScript Syntax
FMOD.DSP_LOWPASS_SIMPLE_CUTOFF
Values
FMOD_DSP_LOWPASS_SIMPLE_CUTOFF
This is a very simple low pass filter, based on two single-pole RC time-constant
modules.
The emphasis is on speed rather than accuracy, so this should not be used for
task requiring critical filtering.
See Also
DSP::setParameterFloat
DSP::getParameterFloat
FMOD_DSP_TYPE
C/C++ Syntax
typedef enum {
FMOD_DSP_MULTIBAND_EQ_A_FILTER,
FMOD_DSP_MULTIBAND_EQ_A_FREQUENCY,
FMOD_DSP_MULTIBAND_EQ_A_Q,
FMOD_DSP_MULTIBAND_EQ_A_GAIN,
FMOD_DSP_MULTIBAND_EQ_B_FILTER,
FMOD_DSP_MULTIBAND_EQ_B_FREQUENCY,
FMOD_DSP_MULTIBAND_EQ_B_Q,
FMOD_DSP_MULTIBAND_EQ_B_GAIN,
FMOD_DSP_MULTIBAND_EQ_C_FILTER,
FMOD_DSP_MULTIBAND_EQ_C_FREQUENCY,
FMOD_DSP_MULTIBAND_EQ_C_Q,
FMOD_DSP_MULTIBAND_EQ_C_GAIN,
FMOD_DSP_MULTIBAND_EQ_D_FILTER,
FMOD_DSP_MULTIBAND_EQ_D_FREQUENCY,
FMOD_DSP_MULTIBAND_EQ_D_Q,
FMOD_DSP_MULTIBAND_EQ_D_GAIN,
FMOD_DSP_MULTIBAND_EQ_E_FILTER,
FMOD_DSP_MULTIBAND_EQ_E_FREQUENCY,
FMOD_DSP_MULTIBAND_EQ_E_Q,
FMOD_DSP_MULTIBAND_EQ_E_GAIN
} FMOD_DSP_MULTIBAND_EQ;
JavaScript Syntax
FMOD.DSP_MULTIBAND_EQ_A_FILTER
FMOD.DSP_MULTIBAND_EQ_A_FREQUENCY
FMOD.DSP_MULTIBAND_EQ_A_Q
FMOD.DSP_MULTIBAND_EQ_A_GAIN
FMOD.DSP_MULTIBAND_EQ_B_FILTER
FMOD.DSP_MULTIBAND_EQ_B_FREQUENCY
FMOD.DSP_MULTIBAND_EQ_B_Q
FMOD.DSP_MULTIBAND_EQ_B_GAIN
FMOD.DSP_MULTIBAND_EQ_C_FILTER
FMOD.DSP_MULTIBAND_EQ_C_FREQUENCY
FMOD.DSP_MULTIBAND_EQ_C_Q
FMOD.DSP_MULTIBAND_EQ_C_GAIN
FMOD.DSP_MULTIBAND_EQ_D_FILTER
FMOD.DSP_MULTIBAND_EQ_D_FREQUENCY
FMOD.DSP_MULTIBAND_EQ_D_Q
FMOD.DSP_MULTIBAND_EQ_D_GAIN
FMOD.DSP_MULTIBAND_EQ_E_FILTER
FMOD.DSP_MULTIBAND_EQ_E_FREQUENCY
FMOD.DSP_MULTIBAND_EQ_E_Q
FMOD.DSP_MULTIBAND_EQ_E_GAIN
Values
FMOD_DSP_MULTIBAND_EQ_A_FILTER
FMOD_DSP_MULTIBAND_EQ_A_FREQUENCY
FMOD_DSP_MULTIBAND_EQ_A_Q
FMOD_DSP_MULTIBAND_EQ_A_GAIN
FMOD_DSP_MULTIBAND_EQ_B_FILTER
FMOD_DSP_MULTIBAND_EQ_B_FREQUENCY
FMOD_DSP_MULTIBAND_EQ_B_Q
FMOD_DSP_MULTIBAND_EQ_B_GAIN
(Type:float) - Band B: See Band A
FMOD_DSP_MULTIBAND_EQ_C_FILTER
FMOD_DSP_MULTIBAND_EQ_C_FREQUENCY
FMOD_DSP_MULTIBAND_EQ_C_Q
FMOD_DSP_MULTIBAND_EQ_C_GAIN
FMOD_DSP_MULTIBAND_EQ_D_FILTER
FMOD_DSP_MULTIBAND_EQ_D_FREQUENCY
FMOD_DSP_MULTIBAND_EQ_D_Q
FMOD_DSP_MULTIBAND_EQ_D_GAIN
FMOD_DSP_MULTIBAND_EQ_E_FILTER
FMOD_DSP_MULTIBAND_EQ_E_Q
FMOD_DSP_MULTIBAND_EQ_E_GAIN
C/C++ Syntax
typedef enum {
FMOD_DSP_MULTIBAND_EQ_FILTER_DISABLED,
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_12DB,
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_24DB,
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_48DB,
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_12DB,
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_24DB,
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_48DB,
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWSHELF,
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHSHELF,
FMOD_DSP_MULTIBAND_EQ_FILTER_PEAKING,
FMOD_DSP_MULTIBAND_EQ_FILTER_BANDPASS,
FMOD_DSP_MULTIBAND_EQ_FILTER_NOTCH,
FMOD_DSP_MULTIBAND_EQ_FILTER_ALLPASS
} FMOD_DSP_MULTIBAND_EQ_FILTER_TYPE;
JavaScript Syntax
FMOD.DSP_MULTIBAND_EQ_FILTER_DISABLED
FMOD.DSP_MULTIBAND_EQ_FILTER_LOWPASS_12DB
FMOD.DSP_MULTIBAND_EQ_FILTER_LOWPASS_24DB
FMOD.DSP_MULTIBAND_EQ_FILTER_LOWPASS_48DB
FMOD.DSP_MULTIBAND_EQ_FILTER_HIGHPASS_12DB
FMOD.DSP_MULTIBAND_EQ_FILTER_HIGHPASS_24DB
FMOD.DSP_MULTIBAND_EQ_FILTER_HIGHPASS_48DB
FMOD.DSP_MULTIBAND_EQ_FILTER_LOWSHELF
FMOD.DSP_MULTIBAND_EQ_FILTER_HIGHSHELF
FMOD.DSP_MULTIBAND_EQ_FILTER_PEAKING
FMOD.DSP_MULTIBAND_EQ_FILTER_BANDPASS
FMOD.DSP_MULTIBAND_EQ_FILTER_NOTCH
FMOD.DSP_MULTIBAND_EQ_FILTER_ALLPASS
Values
FMOD_DSP_MULTIBAND_EQ_FILTER_DISABLED
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_12DB
Resonant low-pass filter, attenuates frequencies (12dB per octave) above a given
point (with specificed resonance) while allowing the rest to pass.
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_24DB
Resonant low-pass filter, attenuates frequencies (24dB per octave) above a given
point (with specificed resonance) while allowing the rest to pass.
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_48DB
Resonant low-pass filter, attenuates frequencies (48dB per octave) above a given
point (with specificed resonance) while allowing the rest to pass.
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_12DB
Resonant low-pass filter, attenuates frequencies (12dB per octave) below a given
point (with specificed resonance) while allowing the rest to pass.
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_24DB
Resonant low-pass filter, attenuates frequencies (24dB per octave) below a given
point (with specificed resonance) while allowing the rest to pass.
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_48DB
Resonant low-pass filter, attenuates frequencies (48dB per octave) below a given
point (with specificed resonance) while allowing the rest to pass.
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWSHELF
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHSHELF
FMOD_DSP_MULTIBAND_EQ_FILTER_PEAKING
FMOD_DSP_MULTIBAND_EQ_FILTER_BANDPASS
FMOD_DSP_MULTIBAND_EQ_FILTER_NOTCH
FMOD_DSP_MULTIBAND_EQ_FILTER_ALLPASS
All-pass filter, allows all frequencies to pass, but changes the phase response at a
given point (with specified sharpness).
See Also
FMOD_DSP_MULTIBAND_EQ
C/C++ Syntax
typedef enum {
FMOD_DSP_NORMALIZE_FADETIME,
FMOD_DSP_NORMALIZE_THRESHHOLD,
FMOD_DSP_NORMALIZE_MAXAMP
} FMOD_DSP_NORMALIZE;
JavaScript Syntax
FMOD.DSP_NORMALIZE_FADETIME
FMOD.DSP_NORMALIZE_THRESHHOLD
FMOD.DSP_NORMALIZE_MAXAMP
Values
FMOD_DSP_NORMALIZE_FADETIME
(Type:float) - Time to ramp the silence to full in ms. 0.0 to 20000.0. Default =
5000.0.
FMOD_DSP_NORMALIZE_THRESHHOLD
(Type:float) - Lower volume range threshold to ignore. 0.0 to 1.0. Default = 0.1.
Raise higher to stop amplification of very quiet signals.
FMOD_DSP_NORMALIZE_MAXAMP
C/C++ Syntax
typedef enum {
FMOD_DSP_OBJECTPAN_3D_POSITION,
FMOD_DSP_OBJECTPAN_3D_ROLLOFF,
FMOD_DSP_OBJECTPAN_3D_MIN_DISTANCE,
FMOD_DSP_OBJECTPAN_3D_MAX_DISTANCE,
FMOD_DSP_OBJECTPAN_3D_EXTENT_MODE,
FMOD_DSP_OBJECTPAN_3D_SOUND_SIZE,
FMOD_DSP_OBJECTPAN_3D_MIN_EXTENT,
FMOD_DSP_OBJECTPAN_OVERALL_GAIN,
FMOD_DSP_OBJECTPAN_OUTPUTGAIN
} FMOD_DSP_OBJECTPAN;
JavaScript Syntax
FMOD.DSP_OBJECTPAN_3D_POSITION
FMOD.DSP_OBJECTPAN_3D_ROLLOFF
FMOD.DSP_OBJECTPAN_3D_MIN_DISTANCE
FMOD.DSP_OBJECTPAN_3D_MAX_DISTANCE
FMOD.DSP_OBJECTPAN_3D_EXTENT_MODE
FMOD.DSP_OBJECTPAN_3D_SOUND_SIZE
FMOD.DSP_OBJECTPAN_3D_MIN_EXTENT
FMOD.DSP_OBJECTPAN_OVERALL_GAIN
FMOD.DSP_OBJECTPAN_OUTPUTGAIN
Values
FMOD_DSP_OBJECTPAN_3D_POSITION
FMOD_DSP_OBJECTPAN_3D_ROLLOFF
(Type:int) - 3D Rolloff.
FMOD_DSP_PAN_3D_ROLLOFF_LINEARSQUARED to
FMOD_DSP_PAN_3D_ROLLOFF_CUSTOM. Default =
FMOD_DSP_PAN_3D_ROLLOFF_LINEARSQUARED.
FMOD_DSP_OBJECTPAN_3D_MIN_DISTANCE
FMOD_DSP_OBJECTPAN_3D_MAX_DISTANCE
FMOD_DSP_OBJECTPAN_3D_EXTENT_MODE
FMOD_DSP_OBJECTPAN_3D_SOUND_SIZE
FMOD_DSP_OBJECTPAN_3D_MIN_EXTENT
FMOD_DSP_OBJECTPAN_OVERALL_GAIN
(Type:data) - Overall gain. For information only, not set by user. Data of type
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN to provide to
FMOD, to allow FMOD to know the DSP is scaling the signal for virtualization
purposes.
FMOD_DSP_OBJECTPAN_OUTPUTGAIN
(Type:float) - Output gain level. 0.0 to 1.0 linear scale. For the user to scale the
output of the object panner's signal.
See Also
DSP::setParameterFloat
DSP::getParameterFloat
DSP::setParameterInt
DSP::getParameterInt
DSP::setParameterData
DSP::getParameterData
FMOD_DSP_TYPE
C/C++ Syntax
typedef enum {
FMOD_DSP_OSCILLATOR_TYPE,
FMOD_DSP_OSCILLATOR_RATE
} FMOD_DSP_OSCILLATOR;
JavaScript Syntax
FMOD.DSP_OSCILLATOR_TYPE
FMOD.DSP_OSCILLATOR_RATE
Values
FMOD_DSP_OSCILLATOR_TYPE
FMOD_DSP_OSCILLATOR_RATE
C/C++ Syntax
typedef enum {
FMOD_DSP_PAN_MODE,
FMOD_DSP_PAN_2D_STEREO_POSITION,
FMOD_DSP_PAN_2D_DIRECTION,
FMOD_DSP_PAN_2D_EXTENT,
FMOD_DSP_PAN_2D_ROTATION,
FMOD_DSP_PAN_2D_LFE_LEVEL,
FMOD_DSP_PAN_2D_STEREO_MODE,
FMOD_DSP_PAN_2D_STEREO_SEPARATION,
FMOD_DSP_PAN_2D_STEREO_AXIS,
FMOD_DSP_PAN_ENABLED_SPEAKERS,
FMOD_DSP_PAN_3D_POSITION,
FMOD_DSP_PAN_3D_ROLLOFF,
FMOD_DSP_PAN_3D_MIN_DISTANCE,
FMOD_DSP_PAN_3D_MAX_DISTANCE,
FMOD_DSP_PAN_3D_EXTENT_MODE,
FMOD_DSP_PAN_3D_SOUND_SIZE,
FMOD_DSP_PAN_3D_MIN_EXTENT,
FMOD_DSP_PAN_3D_PAN_BLEND,
FMOD_DSP_PAN_LFE_UPMIX_ENABLED,
FMOD_DSP_PAN_OVERALL_GAIN,
FMOD_DSP_PAN_SURROUND_SPEAKER_MODE,
FMOD_DSP_PAN_2D_HEIGHT_BLEND
} FMOD_DSP_PAN;
JavaScript Syntax
FMOD.DSP_PAN_MODE
FMOD.DSP_PAN_2D_STEREO_POSITION
FMOD.DSP_PAN_2D_DIRECTION
FMOD.DSP_PAN_2D_EXTENT
FMOD.DSP_PAN_2D_ROTATION
FMOD.DSP_PAN_2D_LFE_LEVEL
FMOD.DSP_PAN_2D_STEREO_MODE
FMOD.DSP_PAN_2D_STEREO_SEPARATION
FMOD.DSP_PAN_2D_STEREO_AXIS
FMOD.DSP_PAN_ENABLED_SPEAKERS
FMOD.DSP_PAN_3D_POSITION
FMOD.DSP_PAN_3D_ROLLOFF
FMOD.DSP_PAN_3D_MIN_DISTANCE
FMOD.DSP_PAN_3D_MAX_DISTANCE
FMOD.DSP_PAN_3D_EXTENT_MODE
FMOD.DSP_PAN_3D_SOUND_SIZE
FMOD.DSP_PAN_3D_MIN_EXTENT
FMOD.DSP_PAN_3D_PAN_BLEND
FMOD.DSP_PAN_LFE_UPMIX_ENABLED
FMOD.DSP_PAN_OVERALL_GAIN
FMOD.DSP_PAN_SURROUND_SPEAKER_MODE
Values
FMOD_DSP_PAN_MODE
FMOD_DSP_PAN_2D_STEREO_POSITION
FMOD_DSP_PAN_2D_DIRECTION
FMOD_DSP_PAN_2D_EXTENT
FMOD_DSP_PAN_2D_ROTATION
FMOD_DSP_PAN_2D_LFE_LEVEL
(Type:float) - 2D Surround pan LFE level. 2D LFE level in dB. -80.0 (db) to
20.0 (db). Default = 0.0.
FMOD_DSP_PAN_2D_STEREO_MODE
FMOD_DSP_PAN_2D_STEREO_SEPARATION
FMOD_DSP_PAN_2D_STEREO_AXIS
FMOD_DSP_PAN_ENABLED_SPEAKERS
FMOD_DSP_PAN_3D_POSITION
FMOD_DSP_PAN_3D_ROLLOFF
(Type:int) - 3D Rolloff.
FMOD_DSP_PAN_3D_ROLLOFF_LINEARSQUARED to
FMOD_DSP_PAN_3D_ROLLOFF_CUSTOM. Default =
FMOD_DSP_PAN_3D_ROLLOFF_LINEARSQUARED.
FMOD_DSP_PAN_3D_MIN_DISTANCE
FMOD_DSP_PAN_3D_MAX_DISTANCE
(Type:float) - 3D Max Distance. 0.0 to 1e+18f. Default = 20.0.
FMOD_DSP_PAN_3D_EXTENT_MODE
FMOD_DSP_PAN_3D_SOUND_SIZE
FMOD_DSP_PAN_3D_MIN_EXTENT
FMOD_DSP_PAN_3D_PAN_BLEND
(Type:float) - 3D Pan Blend. 0.0 (fully 2D) to 1.0 (fully 3D). Default = 0.0.
FMOD_DSP_PAN_LFE_UPMIX_ENABLED
FMOD_DSP_PAN_OVERALL_GAIN
(Type:data) - Overall gain. For information only, not set by user. Data of type
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN to provide to
FMOD, to allow FMOD to know the DSP is scaling the signal for virtualization
purposes.
FMOD_DSP_PAN_SURROUND_SPEAKER_MODE
(Type:int) - Surround speaker mode. Target speaker mode for surround panning.
Default = FMOD_SPEAKERMODE_DEFAULT.
FMOD_DSP_PAN_2D_HEIGHT_BLEND
C/C++ Syntax
typedef enum {
FMOD_DSP_PAN_2D_STEREO_MODE_DISTRIBUTED,
FMOD_DSP_PAN_2D_STEREO_MODE_DISCRETE
} FMOD_DSP_PAN_2D_STEREO_MODE_TYPE;
JavaScript Syntax
FMOD.DSP_PAN_2D_STEREO_MODE_DISTRIBUTED
FMOD.DSP_PAN_2D_STEREO_MODE_DISCRETE
Values
FMOD_DSP_PAN_2D_STEREO_MODE_DISTRIBUTED
The parts of a stereo sound are spread around desination speakers based on
FMOD_DSP_PAN_2D_EXTENT / FMOD_DSP_PAN_2D_DIRECTION
FMOD_DSP_PAN_2D_STEREO_MODE_DISCRETE
The L/R parts of a stereo sound are rotated around a circle based on
FMOD_DSP_PAN_2D_STEREO_AXIS /
FMOD_DSP_PAN_2D_STEREO_SEPARATION.
See Also
FMOD_DSP_PAN
C/C++ Syntax
typedef enum {
FMOD_DSP_PAN_3D_EXTENT_MODE_AUTO,
FMOD_DSP_PAN_3D_EXTENT_MODE_USER,
FMOD_DSP_PAN_3D_EXTENT_MODE_OFF
} FMOD_DSP_PAN_3D_EXTENT_MODE_TYPE;
JavaScript Syntax
FMOD.DSP_PAN_3D_EXTENT_MODE_AUTO
FMOD.DSP_PAN_3D_EXTENT_MODE_USER
FMOD.DSP_PAN_3D_EXTENT_MODE_OFF
Values
FMOD_DSP_PAN_3D_EXTENT_MODE_AUTO
FMOD_DSP_PAN_3D_EXTENT_MODE_USER
FMOD_DSP_PAN_3D_EXTENT_MODE_OFF
See Also
FMOD_DSP_PAN
C/C++ Syntax
typedef enum {
FMOD_DSP_PAN_3D_ROLLOFF_LINEARSQUARED,
FMOD_DSP_PAN_3D_ROLLOFF_LINEAR,
FMOD_DSP_PAN_3D_ROLLOFF_INVERSE,
FMOD_DSP_PAN_3D_ROLLOFF_INVERSETAPERED,
FMOD_DSP_PAN_3D_ROLLOFF_CUSTOM
} FMOD_DSP_PAN_3D_ROLLOFF_TYPE;
JavaScript Syntax
FMOD.DSP_PAN_3D_ROLLOFF_LINEARSQUARED
FMOD.DSP_PAN_3D_ROLLOFF_LINEAR
FMOD.DSP_PAN_3D_ROLLOFF_INVERSE
FMOD.DSP_PAN_3D_ROLLOFF_INVERSETAPERED
FMOD.DSP_PAN_3D_ROLLOFF_CUSTOM
Values
FMOD_DSP_PAN_3D_ROLLOFF_LINEARSQUARED
FMOD_DSP_PAN_3D_ROLLOFF_LINEAR
FMOD_DSP_PAN_3D_ROLLOFF_INVERSE
FMOD_DSP_PAN_3D_ROLLOFF_INVERSETAPERED
FMOD_DSP_PAN_3D_ROLLOFF_CUSTOM
See Also
FMOD_DSP_PAN
C/C++ Syntax
typedef enum {
FMOD_DSP_PAN_MODE_MONO,
FMOD_DSP_PAN_MODE_STEREO,
FMOD_DSP_PAN_MODE_SURROUND
} FMOD_DSP_PAN_MODE_TYPE;
JavaScript Syntax
FMOD.DSP_PAN_MODE_MONO
FMOD.DSP_PAN_MODE_STEREO
FMOD.DSP_PAN_MODE_SURROUND
Values
FMOD_DSP_PAN_MODE_MONO
FMOD_DSP_PAN_MODE_STEREO
FMOD_DSP_PAN_MODE_SURROUND
See Also
FMOD_DSP_PAN
C/C++ Syntax
typedef enum {
FMOD_DSP_PAN_SURROUND_DEFAULT,
FMOD_DSP_PAN_SURROUND_ROTATION_NOT_BIASED
} FMOD_DSP_PAN_SURROUND_FLAGS;
JavaScript Syntax
FMOD.DSP_PAN_SURROUND_DEFAULT
FMOD.DSP_PAN_SURROUND_ROTATION_NOT_BIASED
FMOD.DSP_PAN_SURROUND_FLAGS_FORCEINT
Values
FMOD_DSP_PAN_SURROUND_DEFAULT
FMOD_DSP_PAN_SURROUND_ROTATION_NOT_BIASED
Remarks
This functionality is experimental, please contact [email protected] for more
information.
See Also
FMOD_DSP_STATE_PAN_FUNCTIONS
C/C++ Syntax
typedef enum {
FMOD_DSP_PARAMEQ_CENTER,
FMOD_DSP_PARAMEQ_BANDWIDTH,
FMOD_DSP_PARAMEQ_GAIN
} FMOD_DSP_PARAMEQ;
JavaScript Syntax
FMOD.DSP_PARAMEQ_CENTER
FMOD.DSP_PARAMEQ_BANDWIDTH
FMOD.DSP_PARAMEQ_GAIN
Values
FMOD_DSP_PARAMEQ_CENTER
FMOD_DSP_PARAMEQ_BANDWIDTH
(Type:float) - Octave range around the center frequency to filter. 0.2 to 5.0.
Default = 1.0.
FMOD_DSP_PARAMEQ_GAIN
When a frequency has its gain set to 1.0, the sound will be unaffected and
represents the original signal exactly.
See Also
DSP::setParameterFloat
DSP::getParameterFloat
FMOD_DSP_TYPE
C/C++ Syntax
typedef enum {
FMOD_DSP_PARAMETER_DATA_TYPE_USER,
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN,
FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES,
FMOD_DSP_PARAMETER_DATA_TYPE_SIDECHAIN,
FMOD_DSP_PARAMETER_DATA_TYPE_FFT,
FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI
} FMOD_DSP_PARAMETER_DATA_TYPE;
JavaScript Syntax
FMOD.DSP_PARAMETER_DATA_TYPE_USER
FMOD.DSP_PARAMETER_DATA_TYPE_OVERALLGAIN
FMOD.DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES
FMOD.DSP_PARAMETER_DATA_TYPE_SIDECHAIN
FMOD.DSP_PARAMETER_DATA_TYPE_FFT
FMOD.DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI
Values
FMOD_DSP_PARAMETER_DATA_TYPE_USER
The default data type. All user data types should be 0 or above.
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN
FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES
FMOD_DSP_PARAMETER_DATA_TYPE_SIDECHAIN
FMOD_DSP_PARAMETER_DATA_TYPE_FFT
FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI
C/C++ Syntax
typedef enum {
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_LINEAR,
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO,
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR
} FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE;
JavaScript Syntax
FMOD.DSP_PARAMETER_FLOAT_MAPPING_TYPE_LINEAR
FMOD.DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO
FMOD.DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR
FMOD.DSP_PARAMETER_FLOAT_MAPPING_TYPE_FORCEINT
Values
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_LINEAR
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR
C/C++ Syntax
typedef enum {
FMOD_DSP_PARAMETER_TYPE_FLOAT,
FMOD_DSP_PARAMETER_TYPE_INT,
FMOD_DSP_PARAMETER_TYPE_BOOL,
FMOD_DSP_PARAMETER_TYPE_DATA,
FMOD_DSP_PARAMETER_TYPE_MAX
} FMOD_DSP_PARAMETER_TYPE;
JavaScript Syntax
FMOD.DSP_PARAMETER_TYPE_FLOAT
FMOD.DSP_PARAMETER_TYPE_INT
FMOD.DSP_PARAMETER_TYPE_BOOL
FMOD.DSP_PARAMETER_TYPE_DATA
FMOD.DSP_PARAMETER_TYPE_MAX
FMOD.DSP_PARAMETER_TYPE_FORCEINT
Values
FMOD_DSP_PARAMETER_TYPE_FLOAT
FMOD_DSP_PARAMETER_TYPE_INT
FMOD_DSP_PARAMETER_TYPE_BOOL
FMOD_DSP_PARAMETER_TYPE_DATA
FMOD_DSP_PARAMETER_TYPE_MAX
C/C++ Syntax
typedef enum {
FMOD_DSP_PITCHSHIFT_PITCH,
FMOD_DSP_PITCHSHIFT_FFTSIZE,
FMOD_DSP_PITCHSHIFT_OVERLAP,
FMOD_DSP_PITCHSHIFT_MAXCHANNELS
} FMOD_DSP_PITCHSHIFT;
JavaScript Syntax
FMOD.DSP_PITCHSHIFT_PITCH
FMOD.DSP_PITCHSHIFT_FFTSIZE
FMOD.DSP_PITCHSHIFT_OVERLAP
FMOD.DSP_PITCHSHIFT_MAXCHANNELS
Values
FMOD_DSP_PITCHSHIFT_PITCH
(Type:float) - Pitch value. 0.5 to 2.0. Default = 1.0. 0.5 = one octave down, 2.0 =
one octave up. 1.0 does not change the pitch.
FMOD_DSP_PITCHSHIFT_FFTSIZE
(Type:float) - FFT window size. 256, 512, 1024, 2048, 4096. Default = 1024.
Increase this to reduce 'smearing'. This effect is a warbling sound similar to
when an mp3 is encoded at very low bitrates.
FMOD_DSP_PITCHSHIFT_OVERLAP
(Type:float) - Removed. Do not use. FMOD now uses 4 overlaps and cannot be
changed.
FMOD_DSP_PITCHSHIFT_MAXCHANNELS
C/C++ Syntax
typedef enum {
FMOD_DSP_PROCESS_PERFORM,
FMOD_DSP_PROCESS_QUERY
} FMOD_DSP_PROCESS_OPERATION;
JavaScript Syntax
FMOD.DSP_PROCESS_PERFORM
FMOD.DSP_PROCESS_QUERY
Values
FMOD_DSP_PROCESS_PERFORM
FMOD_DSP_PROCESS_QUERY
The DSP is being queried for the expected output format and whether it needs to
process audio or should be bypassed. The function should return FMOD_OK, or
FMOD_ERR_DSP_DONTPROCESS or FMOD_ERR_DSP_SILENCE if audio
can pass through unprocessed. See remarks for more. If audio is to be processed,
'outbufferarray' must be filled with the expected output format, channel count
and mask.
Remarks
A process callback will be called twice per mix for a DSP unit. Once with the
FMOD_DSP_PROCESS_QUERY command, then conditionally,
FMOD_DSP_PROCESS_PERFORM.
FMOD_DSP_PROCESS_QUERY is to be handled only by filling out the
outputarray information, and returning a relevant return code.
It should not really do any logic besides checking and returning one of the
following codes:
- FMOD_OK - Meaning yes, it should execute the dsp process function with
FMOD_DSP_PROCESS_PERFORM
- FMOD_ERR_DSP_DONTPROCESS - Meaning no, it should skip the process
function and not call it with FMOD_DSP_PROCESS_PERFORM.
- FMOD_ERR_DSP_SILENCE - Meaning no, it should skip the process
function and not call it with FMOD_DSP_PROCESS_PERFORM, AND, tell the
signal chain to follow that it is now idle, so that no more processing happens
down the chain.
If audio is to be processed, 'outbufferarray' must be filled with the expected
output format, channel count and mask. Mask can be 0.
C/C++ Syntax
typedef enum {
FMOD_DSP_RESAMPLER_DEFAULT,
FMOD_DSP_RESAMPLER_NOINTERP,
FMOD_DSP_RESAMPLER_LINEAR,
FMOD_DSP_RESAMPLER_CUBIC,
FMOD_DSP_RESAMPLER_SPLINE,
FMOD_DSP_RESAMPLER_MAX
} FMOD_DSP_RESAMPLER;
JavaScript Syntax
FMOD.DSP_RESAMPLER_DEFAULT
FMOD.DSP_RESAMPLER_NOINTERP
FMOD.DSP_RESAMPLER_LINEAR
FMOD.DSP_RESAMPLER_CUBIC
FMOD.DSP_RESAMPLER_SPLINE
FMOD.DSP_RESAMPLER_MAX
FMOD.DSP_RESAMPLER_FORCEINT
Values
FMOD_DSP_RESAMPLER_DEFAULT
FMOD_DSP_RESAMPLER_NOINTERP
FMOD_DSP_RESAMPLER_LINEAR
Linear interpolation (default method). Fast and good quality, causes very slight
lowpass effect on low frequency sounds.
FMOD_DSP_RESAMPLER_CUBIC
FMOD_DSP_RESAMPLER_SPLINE
FMOD_DSP_RESAMPLER_MAX
C/C++ Syntax
typedef enum {
FMOD_DSP_RETURN_ID,
FMOD_DSP_RETURN_INPUT_SPEAKER_MODE
} FMOD_DSP_RETURN;
JavaScript Syntax
FMOD.DSP_RETURN_ID
FMOD.DSP_RETURN_INPUT_SPEAKER_MODE
Values
FMOD_DSP_RETURN_ID
FMOD_DSP_RETURN_INPUT_SPEAKER_MODE
C/C++ Syntax
typedef enum {
FMOD_DSP_SEND_RETURNID,
FMOD_DSP_SEND_LEVEL
} FMOD_DSP_SEND;
JavaScript Syntax
FMOD.DSP_SEND_RETURNID
FMOD.DSP_SEND_LEVEL
Values
FMOD_DSP_SEND_RETURNID
(Type:int) - ID of the Return DSP this send is connected to (integer values only).
-1 indicates no connected Return DSP. Default = -1.
FMOD_DSP_SEND_LEVEL
C/C++ Syntax
typedef enum {
FMOD_DSP_SFXREVERB_DECAYTIME,
FMOD_DSP_SFXREVERB_EARLYDELAY,
FMOD_DSP_SFXREVERB_LATEDELAY,
FMOD_DSP_SFXREVERB_HFREFERENCE,
FMOD_DSP_SFXREVERB_HFDECAYRATIO,
FMOD_DSP_SFXREVERB_DIFFUSION,
FMOD_DSP_SFXREVERB_DENSITY,
FMOD_DSP_SFXREVERB_LOWSHELFFREQUENCY,
FMOD_DSP_SFXREVERB_LOWSHELFGAIN,
FMOD_DSP_SFXREVERB_HIGHCUT,
FMOD_DSP_SFXREVERB_EARLYLATEMIX,
FMOD_DSP_SFXREVERB_WETLEVEL,
FMOD_DSP_SFXREVERB_DRYLEVEL
} FMOD_DSP_SFXREVERB;
JavaScript Syntax
FMOD.DSP_SFXREVERB_DECAYTIME
FMOD.DSP_SFXREVERB_EARLYDELAY
FMOD.DSP_SFXREVERB_LATEDELAY
FMOD.DSP_SFXREVERB_HFREFERENCE
FMOD.DSP_SFXREVERB_HFDECAYRATIO
FMOD.DSP_SFXREVERB_DIFFUSION
FMOD.DSP_SFXREVERB_DENSITY
FMOD.DSP_SFXREVERB_LOWSHELFFREQUENCY
FMOD.DSP_SFXREVERB_LOWSHELFGAIN
FMOD.DSP_SFXREVERB_HIGHCUT
FMOD.DSP_SFXREVERB_EARLYLATEMIX
FMOD.DSP_SFXREVERB_WETLEVEL
FMOD.DSP_SFXREVERB_DRYLEVEL
Values
FMOD_DSP_SFXREVERB_DECAYTIME
FMOD_DSP_SFXREVERB_EARLYDELAY
FMOD_DSP_SFXREVERB_LATEDELAY
FMOD_DSP_SFXREVERB_HFREFERENCE
FMOD_DSP_SFXREVERB_HFDECAYRATIO
FMOD_DSP_SFXREVERB_DIFFUSION
FMOD_DSP_SFXREVERB_DENSITY
FMOD_DSP_SFXREVERB_LOWSHELFFREQUENCY
(Type:float) - Low Shelf Frequency : Transition frequency of low-shelf filter in
Hz. Ranges from 20.0 to 1000.0. Default is 250.
FMOD_DSP_SFXREVERB_LOWSHELFGAIN
(Type:float) - Low Shelf Gain : Gain of low-shelf filter in dB. Ranges from -36.0
to 12.0. Default is 0.
FMOD_DSP_SFXREVERB_HIGHCUT
(Type:float) - High Cut : Cutoff frequency of low-pass filter in Hz. Ranges from
20.0 to 20000.0. Default is 20000.
FMOD_DSP_SFXREVERB_EARLYLATEMIX
FMOD_DSP_SFXREVERB_WETLEVEL
(Type:float) - Wet Level : Reverb signal level in dB. Ranges from -80.0 to 20.0.
Default is -6.
FMOD_DSP_SFXREVERB_DRYLEVEL
(Type:float) - Dry Level : Dry signal level in dB. Ranges from -80.0 to 20.0.
Default is 0.
Remarks
This is a high quality I3DL2 based reverb.
On top of the I3DL2 property set, "Dry Level" is also included to allow the dry
mix to be changed.
C/C++ Syntax
typedef enum {
FMOD_DSP_THREE_EQ_LOWGAIN,
FMOD_DSP_THREE_EQ_MIDGAIN,
FMOD_DSP_THREE_EQ_HIGHGAIN,
FMOD_DSP_THREE_EQ_LOWCROSSOVER,
FMOD_DSP_THREE_EQ_HIGHCROSSOVER,
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE
} FMOD_DSP_THREE_EQ;
JavaScript Syntax
FMOD.DSP_THREE_EQ_LOWGAIN
FMOD.DSP_THREE_EQ_MIDGAIN
FMOD.DSP_THREE_EQ_HIGHGAIN
FMOD.DSP_THREE_EQ_LOWCROSSOVER
FMOD.DSP_THREE_EQ_HIGHCROSSOVER
FMOD.DSP_THREE_EQ_CROSSOVERSLOPE
Values
FMOD_DSP_THREE_EQ_LOWGAIN
FMOD_DSP_THREE_EQ_MIDGAIN
FMOD_DSP_THREE_EQ_HIGHGAIN
FMOD_DSP_THREE_EQ_LOWCROSSOVER
FMOD_DSP_THREE_EQ_HIGHCROSSOVER
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE
C/C++ Syntax
typedef enum {
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_12DB,
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_24DB,
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_48DB
} FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_TYPE;
JavaScript Syntax
FMOD.DSP_THREE_EQ_CROSSOVERSLOPE_12DB
FMOD.DSP_THREE_EQ_CROSSOVERSLOPE_24DB
FMOD.DSP_THREE_EQ_CROSSOVERSLOPE_48DB
Values
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_12DB
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_24DB
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_48DB
See Also
FMOD_DSP_THREE_EQ
C/C++ Syntax
typedef enum {
FMOD_DSP_TRANSCEIVER_TRANSMIT,
FMOD_DSP_TRANSCEIVER_GAIN,
FMOD_DSP_TRANSCEIVER_CHANNEL,
FMOD_DSP_TRANSCEIVER_TRANSMITSPEAKERMODE
} FMOD_DSP_TRANSCEIVER;
JavaScript Syntax
FMOD.DSP_TRANSCEIVER_TRANSMIT
FMOD.DSP_TRANSCEIVER_GAIN
FMOD.DSP_TRANSCEIVER_CHANNEL
FMOD.DSP_TRANSCEIVER_TRANSMITSPEAKERMODE
Values
FMOD_DSP_TRANSCEIVER_TRANSMIT
FMOD_DSP_TRANSCEIVER_GAIN
FMOD_DSP_TRANSCEIVER_CHANNEL
FMOD_DSP_TRANSCEIVER_TRANSMITSPEAKERMODE
C/C++ Syntax
typedef enum {
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_AUTO,
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_MONO,
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_STEREO,
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_SURROUND
} FMOD_DSP_TRANSCEIVER_SPEAKERMODE;
JavaScript Syntax
FMOD.DSP_TRANSCEIVER_SPEAKERMODE_AUTO
FMOD.DSP_TRANSCEIVER_SPEAKERMODE_MONO
FMOD.DSP_TRANSCEIVER_SPEAKERMODE_STEREO
FMOD.DSP_TRANSCEIVER_SPEAKERMODE_SURROUND
Values
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_AUTO
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_MONO
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_STEREO
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_SURROUND
Only relevant for transmitter dsps, as they control the format of the transceiver
channel's buffer.
If the system's speaker mode is stereo or mono, it will not create a 3rd buffer, it
will just use the mono/stereo speaker mode buffer.
See Also
DSP::setParameterInt
DSP::getParameterInt
FMOD_DSP_TYPE
C/C++ Syntax
typedef enum {
FMOD_DSP_TREMOLO_FREQUENCY,
FMOD_DSP_TREMOLO_DEPTH,
FMOD_DSP_TREMOLO_SHAPE,
FMOD_DSP_TREMOLO_SKEW,
FMOD_DSP_TREMOLO_DUTY,
FMOD_DSP_TREMOLO_SQUARE,
FMOD_DSP_TREMOLO_PHASE,
FMOD_DSP_TREMOLO_SPREAD
} FMOD_DSP_TREMOLO;
JavaScript Syntax
FMOD.DSP_TREMOLO_FREQUENCY
FMOD.DSP_TREMOLO_DEPTH
FMOD.DSP_TREMOLO_SHAPE
FMOD.DSP_TREMOLO_SKEW
FMOD.DSP_TREMOLO_DUTY
FMOD.DSP_TREMOLO_SQUARE
FMOD.DSP_TREMOLO_PHASE
FMOD.DSP_TREMOLO_SPREAD
Values
FMOD_DSP_TREMOLO_FREQUENCY
FMOD_DSP_TREMOLO_DEPTH
FMOD_DSP_TREMOLO_SHAPE
FMOD_DSP_TREMOLO_SKEW
FMOD_DSP_TREMOLO_DUTY
FMOD_DSP_TREMOLO_SQUARE
FMOD_DSP_TREMOLO_PHASE
FMOD_DSP_TREMOLO_SPREAD
The shape of the LFO (low freq. oscillator) can morphed between sine, triangle
and sawtooth waves using the FMOD_DSP_TREMOLO_SHAPE and
FMOD_DSP_TREMOLO_SKEW parameters.
FMOD_DSP_TREMOLO_DUTY and FMOD_DSP_TREMOLO_SQUARE are
useful for a chopper-type effect where the first controls the on-time duration and
second controls the flatness of the envelope.
FMOD_DSP_TREMOLO_SPREAD varies the LFO phase between channels to
get an auto-pan effect. This works best with a sine shape LFO.
The LFO can be synchronized using the FMOD_DSP_TREMOLO_PHASE
parameter which sets its instantaneous phase.
See Also
DSP::setParameterFloat
DSP::getParameterFloat
FMOD_DSP_TYPE
C/C++ Syntax
typedef enum {
FMOD_DSP_TYPE_UNKNOWN,
FMOD_DSP_TYPE_MIXER,
FMOD_DSP_TYPE_OSCILLATOR,
FMOD_DSP_TYPE_LOWPASS,
FMOD_DSP_TYPE_ITLOWPASS,
FMOD_DSP_TYPE_HIGHPASS,
FMOD_DSP_TYPE_ECHO,
FMOD_DSP_TYPE_FADER,
FMOD_DSP_TYPE_FLANGE,
FMOD_DSP_TYPE_DISTORTION,
FMOD_DSP_TYPE_NORMALIZE,
FMOD_DSP_TYPE_LIMITER,
FMOD_DSP_TYPE_PARAMEQ,
FMOD_DSP_TYPE_PITCHSHIFT,
FMOD_DSP_TYPE_CHORUS,
FMOD_DSP_TYPE_VSTPLUGIN,
FMOD_DSP_TYPE_WINAMPPLUGIN,
FMOD_DSP_TYPE_ITECHO,
FMOD_DSP_TYPE_COMPRESSOR,
FMOD_DSP_TYPE_SFXREVERB,
FMOD_DSP_TYPE_LOWPASS_SIMPLE,
FMOD_DSP_TYPE_DELAY,
FMOD_DSP_TYPE_TREMOLO,
FMOD_DSP_TYPE_LADSPAPLUGIN,
FMOD_DSP_TYPE_SEND,
FMOD_DSP_TYPE_RETURN,
FMOD_DSP_TYPE_HIGHPASS_SIMPLE,
FMOD_DSP_TYPE_PAN,
FMOD_DSP_TYPE_THREE_EQ,
FMOD_DSP_TYPE_FFT,
FMOD_DSP_TYPE_LOUDNESS_METER,
FMOD_DSP_TYPE_ENVELOPEFOLLOWER,
FMOD_DSP_TYPE_CONVOLUTIONREVERB,
FMOD_DSP_TYPE_CHANNELMIX,
FMOD_DSP_TYPE_TRANSCEIVER,
FMOD_DSP_TYPE_OBJECTPAN,
FMOD_DSP_TYPE_MULTIBAND_EQ,
FMOD_DSP_TYPE_MAX
} FMOD_DSP_TYPE;
JavaScript Syntax
FMOD.DSP_TYPE_UNKNOWN
FMOD.DSP_TYPE_MIXER
FMOD.DSP_TYPE_OSCILLATOR
FMOD.DSP_TYPE_LOWPASS
FMOD.DSP_TYPE_ITLOWPASS
FMOD.DSP_TYPE_HIGHPASS
FMOD.DSP_TYPE_ECHO
FMOD.DSP_TYPE_FADER
FMOD.DSP_TYPE_FLANGE
FMOD.DSP_TYPE_DISTORTION
FMOD.DSP_TYPE_NORMALIZE
FMOD.DSP_TYPE_LIMITER
FMOD.DSP_TYPE_PARAMEQ
FMOD.DSP_TYPE_PITCHSHIFT
FMOD.DSP_TYPE_CHORUS
FMOD.DSP_TYPE_VSTPLUGIN
FMOD.DSP_TYPE_WINAMPPLUGIN
FMOD.DSP_TYPE_ITECHO
FMOD.DSP_TYPE_COMPRESSOR
FMOD.DSP_TYPE_SFXREVERB
FMOD.DSP_TYPE_LOWPASS_SIMPLE
FMOD.DSP_TYPE_DELAY
FMOD.DSP_TYPE_TREMOLO
FMOD.DSP_TYPE_LADSPAPLUGIN
FMOD.DSP_TYPE_SEND
FMOD.DSP_TYPE_RETURN
FMOD.DSP_TYPE_HIGHPASS_SIMPLE
FMOD.DSP_TYPE_PAN
FMOD.DSP_TYPE_THREE_EQ
FMOD.DSP_TYPE_FFT
FMOD.DSP_TYPE_LOUDNESS_METER
FMOD.DSP_TYPE_ENVELOPEFOLLOWER
FMOD.DSP_TYPE_CONVOLUTIONREVERB
FMOD.DSP_TYPE_CHANNELMIX
FMOD.DSP_TYPE_TRANSCEIVER
FMOD.DSP_TYPE_OBJECTPAN
FMOD.DSP_TYPE_MULTIBAND_EQ
FMOD.DSP_TYPE_MAX
FMOD.DSP_TYPE_FORCEINT
Values
FMOD_DSP_TYPE_UNKNOWN
This unit was created via a non FMOD plugin so has an unknown purpose.
FMOD_DSP_TYPE_MIXER
This unit does nothing but take inputs and mix them together then feed the result
to the soundcard unit.
FMOD_DSP_TYPE_OSCILLATOR
FMOD_DSP_TYPE_LOWPASS
This unit filters sound using a high quality, resonant lowpass filter algorithm but
consumes more CPU time. Deprecated and will be removed in a future release
(see FMOD_DSP_LOWPASS remarks for alternatives).
FMOD_DSP_TYPE_ITLOWPASS
This unit filters sound using a resonant lowpass filter algorithm that is used in
Impulse Tracker, but with limited cutoff range (0 to 8060hz).
FMOD_DSP_TYPE_HIGHPASS
This unit filters sound using a resonant highpass filter algorithm. Deprecated and
will be removed in a future release (see FMOD_DSP_HIGHPASS remarks for
alternatives).
FMOD_DSP_TYPE_ECHO
This unit produces an echo on the sound and fades out at the desired rate.
FMOD_DSP_TYPE_FADER
FMOD_DSP_TYPE_DISTORTION
FMOD_DSP_TYPE_NORMALIZE
FMOD_DSP_TYPE_LIMITER
FMOD_DSP_TYPE_PARAMEQ
This unit attenuates or amplifies a selected frequency range. Deprecated and will
be removed in a future release (see FMOD_DSP_PARAMEQ remarks for
alternatives).
FMOD_DSP_TYPE_PITCHSHIFT
This unit bends the pitch of a sound without changing the speed of playback.
FMOD_DSP_TYPE_CHORUS
FMOD_DSP_TYPE_VSTPLUGIN
FMOD_DSP_TYPE_WINAMPPLUGIN
FMOD_DSP_TYPE_ITECHO
This unit produces an echo on the sound and fades out at the desired rate as is
used in Impulse Tracker.
FMOD_DSP_TYPE_COMPRESSOR
FMOD_DSP_TYPE_SFXREVERB
FMOD_DSP_TYPE_LOWPASS_SIMPLE
This unit filters sound using a simple lowpass with no resonance, but has flexible
cutoff and is fast. Deprecated and will be removed in a future release (see
FMOD_DSP_LOWPASS_SIMPLE remarks for alternatives).
FMOD_DSP_TYPE_DELAY
FMOD_DSP_TYPE_TREMOLO
FMOD_DSP_TYPE_LADSPAPLUGIN
Unsupported / Deprecated.
FMOD_DSP_TYPE_SEND
This unit sends a copy of the signal to a return DSP anywhere in the DSP tree.
FMOD_DSP_TYPE_RETURN
FMOD_DSP_TYPE_HIGHPASS_SIMPLE
This unit filters sound using a simple highpass with no resonance, but has
flexible cutoff and is fast. Deprecated and will be removed in a future release
(see FMOD_DSP_HIGHPASS_SIMPLE remarks for alternatives).
FMOD_DSP_TYPE_PAN
FMOD_DSP_TYPE_THREE_EQ
FMOD_DSP_TYPE_FFT
This unit simply analyzes the signal and provides spectrum information back
through getParameter.
FMOD_DSP_TYPE_LOUDNESS_METER
This unit analyzes the loudness and true peak of the signal.
FMOD_DSP_TYPE_ENVELOPEFOLLOWER
This unit tracks the envelope of the input/sidechain signal. Deprecated and will
be removed in a future release.
FMOD_DSP_TYPE_CONVOLUTIONREVERB
FMOD_DSP_TYPE_CHANNELMIX
This unit provides per signal channel gain, and output channel mapping to allow
1 multichannel signal made up of many groups of signals to map to a single
output signal.
FMOD_DSP_TYPE_TRANSCEIVER
This unit sends the signal to a 3d object encoder like Dolby Atmos. Supports a
subset of the FMOD_DSP_TYPE_PAN parameters.
FMOD_DSP_TYPE_MULTIBAND_EQ
FMOD_DSP_TYPE_MAX
C/C++ Syntax
typedef enum {
FMOD_ERRORCALLBACK_INSTANCETYPE_NONE,
FMOD_ERRORCALLBACK_INSTANCETYPE_SYSTEM,
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNEL,
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNELGROUP,
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNELCONTROL,
FMOD_ERRORCALLBACK_INSTANCETYPE_SOUND,
FMOD_ERRORCALLBACK_INSTANCETYPE_SOUNDGROUP,
FMOD_ERRORCALLBACK_INSTANCETYPE_DSP,
FMOD_ERRORCALLBACK_INSTANCETYPE_DSPCONNECTION,
FMOD_ERRORCALLBACK_INSTANCETYPE_GEOMETRY,
FMOD_ERRORCALLBACK_INSTANCETYPE_REVERB3D,
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_SYSTEM,
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTDESCRIPTION,
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTINSTANCE,
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_PARAMETERINSTANCE,
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_BUS,
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_VCA,
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_BANK,
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_COMMANDREPLAY
} FMOD_ERRORCALLBACK_INSTANCETYPE;
JavaScript Syntax
FMOD.ERRORCALLBACK_INSTANCETYPE_NONE
FMOD.ERRORCALLBACK_INSTANCETYPE_SYSTEM
FMOD.ERRORCALLBACK_INSTANCETYPE_CHANNEL
FMOD.ERRORCALLBACK_INSTANCETYPE_CHANNELGROUP
FMOD.ERRORCALLBACK_INSTANCETYPE_CHANNELCONTROL
FMOD.ERRORCALLBACK_INSTANCETYPE_SOUND
FMOD.ERRORCALLBACK_INSTANCETYPE_SOUNDGROUP
FMOD.ERRORCALLBACK_INSTANCETYPE_DSP
FMOD.ERRORCALLBACK_INSTANCETYPE_DSPCONNECTION
FMOD.ERRORCALLBACK_INSTANCETYPE_GEOMETRY
FMOD.ERRORCALLBACK_INSTANCETYPE_REVERB3D
FMOD.ERRORCALLBACK_INSTANCETYPE_STUDIO_SYSTEM
FMOD.ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTDESCRIPTION
FMOD.ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTINSTANCE
FMOD.ERRORCALLBACK_INSTANCETYPE_STUDIO_PARAMETERINSTANCE
FMOD.ERRORCALLBACK_INSTANCETYPE_STUDIO_BUS
FMOD.ERRORCALLBACK_INSTANCETYPE_STUDIO_VCA
FMOD.ERRORCALLBACK_INSTANCETYPE_STUDIO_BANK
FMOD.ERRORCALLBACK_INSTANCETYPE_STUDIO_COMMANDREPLAY
FMOD.ERRORCALLBACK_INSTANCETYPE_FORCEINT
Values
FMOD_ERRORCALLBACK_INSTANCETYPE_NONE
FMOD_ERRORCALLBACK_INSTANCETYPE_SYSTEM
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNEL
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNELGROUP
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNELCONTROL
FMOD_ERRORCALLBACK_INSTANCETYPE_SOUND
FMOD_ERRORCALLBACK_INSTANCETYPE_SOUNDGROUP
FMOD_ERRORCALLBACK_INSTANCETYPE_DSP
FMOD_ERRORCALLBACK_INSTANCETYPE_DSPCONNECTION
FMOD_ERRORCALLBACK_INSTANCETYPE_GEOMETRY
FMOD_ERRORCALLBACK_INSTANCETYPE_REVERB3D
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_SYSTEM
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTDESCRIPTION
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTINSTANCE
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_PARAMETERINSTANCE
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_BUS
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_VCA
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_BANK
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_COMMANDREPLAY
Remarks
Cast the instance of FMOD_ERROR_CALLBACK to the appropriate class
indicated by this enum.
C/C++ Syntax
typedef enum {
FMOD_OPENSTATE_READY,
FMOD_OPENSTATE_LOADING,
FMOD_OPENSTATE_ERROR,
FMOD_OPENSTATE_CONNECTING,
FMOD_OPENSTATE_BUFFERING,
FMOD_OPENSTATE_SEEKING,
FMOD_OPENSTATE_PLAYING,
FMOD_OPENSTATE_SETPOSITION,
FMOD_OPENSTATE_MAX
} FMOD_OPENSTATE;
JavaScript Syntax
FMOD.OPENSTATE_READY
FMOD.OPENSTATE_LOADING
FMOD.OPENSTATE_ERROR
FMOD.OPENSTATE_CONNECTING
FMOD.OPENSTATE_BUFFERING
FMOD.OPENSTATE_SEEKING
FMOD.OPENSTATE_PLAYING
FMOD.OPENSTATE_SETPOSITION
FMOD.OPENSTATE_MAX
FMOD.OPENSTATE_FORCEINT
Values
FMOD_OPENSTATE_READY
FMOD_OPENSTATE_LOADING
FMOD_OPENSTATE_ERROR
Failed to open - file not found, out of memory etc. See return value of
Sound::getOpenState for what happened.
FMOD_OPENSTATE_CONNECTING
FMOD_OPENSTATE_BUFFERING
Buffering data.
FMOD_OPENSTATE_SEEKING
FMOD_OPENSTATE_PLAYING
Ready and playing, but not possible to release at this time without stalling the
main thread.
FMOD_OPENSTATE_SETPOSITION
FMOD_OPENSTATE_MAX
C/C++ Syntax
typedef enum {
FMOD_OUTPUTTYPE_AUTODETECT,
FMOD_OUTPUTTYPE_UNKNOWN,
FMOD_OUTPUTTYPE_NOSOUND,
FMOD_OUTPUTTYPE_WAVWRITER,
FMOD_OUTPUTTYPE_NOSOUND_NRT,
FMOD_OUTPUTTYPE_WAVWRITER_NRT,
FMOD_OUTPUTTYPE_DSOUND,
FMOD_OUTPUTTYPE_WINMM,
FMOD_OUTPUTTYPE_WASAPI,
FMOD_OUTPUTTYPE_ASIO,
FMOD_OUTPUTTYPE_PULSEAUDIO,
FMOD_OUTPUTTYPE_ALSA,
FMOD_OUTPUTTYPE_COREAUDIO,
FMOD_OUTPUTTYPE_XAUDIO,
FMOD_OUTPUTTYPE_PS3,
FMOD_OUTPUTTYPE_AUDIOTRACK,
FMOD_OUTPUTTYPE_OPENSL,
FMOD_OUTPUTTYPE_WIIU,
FMOD_OUTPUTTYPE_AUDIOOUT,
FMOD_OUTPUTTYPE_AUDIO3D,
FMOD_OUTPUTTYPE_ATMOS,
FMOD_OUTPUTTYPE_WEBAUDIO,
FMOD_OUTPUTTYPE_NNAUDIO,
FMOD_OUTPUTTYPE_WINSONIC,
FMOD_OUTPUTTYPE_MAX
} FMOD_OUTPUTTYPE;
JavaScript Syntax
FMOD.OUTPUTTYPE_AUTODETECT
FMOD.OUTPUTTYPE_UNKNOWN
FMOD.OUTPUTTYPE_NOSOUND
FMOD.OUTPUTTYPE_WAVWRITER
FMOD.OUTPUTTYPE_NOSOUND_NRT
FMOD.OUTPUTTYPE_WAVWRITER_NRT
FMOD.OUTPUTTYPE_DSOUND
FMOD.OUTPUTTYPE_WINMM
FMOD.OUTPUTTYPE_WASAPI
FMOD.OUTPUTTYPE_ASIO
FMOD.OUTPUTTYPE_PULSEAUDIO
FMOD.OUTPUTTYPE_ALSA
FMOD.OUTPUTTYPE_COREAUDIO
FMOD.OUTPUTTYPE_XAUDIO
FMOD.OUTPUTTYPE_PS3
FMOD.OUTPUTTYPE_AUDIOTRACK
FMOD.OUTPUTTYPE_OPENSL
FMOD.OUTPUTTYPE_WIIU
FMOD.OUTPUTTYPE_AUDIOOUT
FMOD.OUTPUTTYPE_AUDIO3D
FMOD.OUTPUTTYPE_ATMOS
FMOD.OUTPUTTYPE_WEBAUDIO
FMOD.OUTPUTTYPE_NNAUDIO
FMOD.OUTPUTTYPE_MAX
FMOD.OUTPUTTYPE_FORCEINT
Values
FMOD_OUTPUTTYPE_AUTODETECT
Picks the best output mode for the platform. This is the default.
FMOD_OUTPUTTYPE_UNKNOWN
All - 3rd party plugin, unknown. This is for use with System::getOutput only.
FMOD_OUTPUTTYPE_NOSOUND
FMOD_OUTPUTTYPE_WAVWRITER
FMOD_OUTPUTTYPE_NOSOUND_NRT
FMOD_OUTPUTTYPE_WAVWRITER_NRT
FMOD_OUTPUTTYPE_DSOUND
FMOD_OUTPUTTYPE_WINMM
FMOD_OUTPUTTYPE_WASAPI
FMOD_OUTPUTTYPE_ASIO
FMOD_OUTPUTTYPE_PULSEAUDIO
FMOD_OUTPUTTYPE_ALSA
FMOD_OUTPUTTYPE_COREAUDIO
FMOD_OUTPUTTYPE_XAUDIO
FMOD_OUTPUTTYPE_PS3
FMOD_OUTPUTTYPE_AUDIOTRACK
FMOD_OUTPUTTYPE_OPENSL
FMOD_OUTPUTTYPE_WIIU
FMOD_OUTPUTTYPE_AUDIOOUT
PS4/PSVita - Audio Out. (Default on PS4 and PS Vita)
FMOD_OUTPUTTYPE_AUDIO3D
PS4 - Audio3D.
FMOD_OUTPUTTYPE_ATMOS
FMOD_OUTPUTTYPE_WEBAUDIO
FMOD_OUTPUTTYPE_NNAUDIO
FMOD_OUTPUTTYPE_WINSONIC
FMOD_OUTPUTTYPE_MAX
Currently these are the only FMOD drivers that take extra information. Other
unknown plugins may have different requirements.
Note! If FMOD_OUTPUTTYPE_WAVWRITER_NRT or
FMOD_OUTPUTTYPE_NOSOUND_NRT are used, and if the System::update
function is being called very quickly (ie for a non realtime decode) it may be
being called too quickly for the FMOD streamer thread to respond to. The result
will be a skipping/stuttering output in the captured audio.
C/C++ Syntax
typedef enum {
FMOD_PLUGINTYPE_OUTPUT,
FMOD_PLUGINTYPE_CODEC,
FMOD_PLUGINTYPE_DSP,
FMOD_PLUGINTYPE_MAX
} FMOD_PLUGINTYPE;
JavaScript Syntax
FMOD.PLUGINTYPE_OUTPUT
FMOD.PLUGINTYPE_CODEC
FMOD.PLUGINTYPE_DSP
FMOD.PLUGINTYPE_MAX
FMOD.PLUGINTYPE_FORCEINT
Values
FMOD_PLUGINTYPE_OUTPUT
The plugin type is an output module. FMOD mixed audio will play through one
of these devices
FMOD_PLUGINTYPE_CODEC
The plugin type is a file format codec. FMOD will use these codecs to load file
formats for playback.
FMOD_PLUGINTYPE_DSP
The plugin type is a DSP unit. FMOD will use these plugins as part of its DSP
network to apply effects to output or generate sound in realtime.
FMOD_PLUGINTYPE_MAX
C/C++ Syntax
typedef enum {
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;
JavaScript Syntax
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_FORCEINT
Values
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
FMOD_ERR_CHANNEL_STOLEN
FMOD_ERR_DMA
FMOD_ERR_DSP_CONNECTION
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 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.
FMOD_ERR_DSP_INUSE
DSP is already in the mixer's DSP network. It must be removed before being
reinserted or released.
FMOD_ERR_DSP_NOTFOUND
FMOD_ERR_DSP_RESERVED
FMOD_ERR_DSP_SILENCE
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.
FMOD_ERR_DSP_TYPE
FMOD_ERR_FILE_BAD
FMOD_ERR_FILE_COULDNOTSEEK
FMOD_ERR_FILE_DISKEJECTED
FMOD_ERR_FILE_EOF
End of file unexpectedly reached while trying to read essential data (truncated?).
FMOD_ERR_FILE_ENDOFDATA
FMOD_ERR_FILE_NOTFOUND
FMOD_ERR_FORMAT
FMOD_ERR_HEADER_MISMATCH
There is a version mismatch between the FMOD header and either the FMOD
Studio library or the FMOD Low Level library.
FMOD_ERR_HTTP
A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.
FMOD_ERR_HTTP_ACCESS
FMOD_ERR_HTTP_PROXY_AUTH
FMOD_ERR_HTTP_SERVER_ERROR
FMOD_ERR_HTTP_TIMEOUT
FMOD_ERR_INITIALIZATION
FMOD_ERR_INTERNAL
FMOD_ERR_INVALID_FLOAT
FMOD_ERR_INVALID_HANDLE
FMOD_ERR_INVALID_PARAM
FMOD_ERR_INVALID_POSITION
FMOD_ERR_INVALID_SPEAKER
An invalid speaker was passed to this function based on the current speaker
mode.
FMOD_ERR_INVALID_SYNCPOINT
FMOD_ERR_INVALID_THREAD
FMOD_ERR_INVALID_VECTOR
FMOD_ERR_MEMORY
FMOD_ERR_MEMORY_CANTPOINT
FMOD_ERR_NEEDS3D
Tried to call a command on a 2d sound when the command was meant for 3d
sound.
FMOD_ERR_NEEDSHARDWARE
FMOD_ERR_NET_CONNECT
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
FMOD_ERR_NET_WOULD_BLOCK
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
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
FMOD_ERR_OUTPUT_INIT
FMOD_ERR_OUTPUT_NODRIVERS
FMOD_ERR_PLUGIN
FMOD_ERR_PLUGIN_MISSING
FMOD_ERR_PLUGIN_RESOURCE
A resource that the plugin requires cannot be found. (ie the DLS file for MIDI
playback)
FMOD_ERR_PLUGIN_VERSION
FMOD_ERR_RECORD
FMOD_ERR_REVERB_CHANNELGROUP
FMOD_ERR_REVERB_INSTANCE
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 sound created exceeds the allowable input channel count. This can be
increased using the 'maxinputchannels' parameter in System::setSoftwareFormat.
FMOD_ERR_TRUNCATED
The retrieved string is too long to fit in the supplied buffer and has been
truncated.
FMOD_ERR_UNIMPLEMENTED
FMOD_ERR_UNINITIALIZED
FMOD_ERR_UNSUPPORTED
A command issued was not supported by this object. Possibly a plugin without
certain callbacks specified.
FMOD_ERR_VERSION
FMOD_ERR_EVENT_ALREADY_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
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
C/C++ Syntax
typedef enum {
FMOD_SOUNDGROUP_BEHAVIOR_FAIL,
FMOD_SOUNDGROUP_BEHAVIOR_MUTE,
FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST,
FMOD_SOUNDGROUP_BEHAVIOR_MAX
} FMOD_SOUNDGROUP_BEHAVIOR;
JavaScript Syntax
FMOD.SOUNDGROUP_BEHAVIOR_FAIL
FMOD.SOUNDGROUP_BEHAVIOR_MUTE
FMOD.SOUNDGROUP_BEHAVIOR_STEALLOWEST
FMOD.SOUNDGROUP_BEHAVIOR_MAX
FMOD.SOUNDGROUP_BEHAVIOR_FORCEINT
Values
FMOD_SOUNDGROUP_BEHAVIOR_FAIL
Any sound played that puts the sound count over the
SoundGroup::setMaxAudible setting, will simply fail during System::playSound.
FMOD_SOUNDGROUP_BEHAVIOR_MUTE
Any sound played that puts the sound count over the
SoundGroup::setMaxAudible setting, will be silent, then if another sound in the
group stops the sound that was silent before becomes audible again.
FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST
Any sound played that puts the sound count over the
SoundGroup::setMaxAudible setting, will steal the quietest / least important
sound playing in the group.
FMOD_SOUNDGROUP_BEHAVIOR_MAX
C/C++ Syntax
typedef enum {
FMOD_SOUND_FORMAT_NONE,
FMOD_SOUND_FORMAT_PCM8,
FMOD_SOUND_FORMAT_PCM16,
FMOD_SOUND_FORMAT_PCM24,
FMOD_SOUND_FORMAT_PCM32,
FMOD_SOUND_FORMAT_PCMFLOAT,
FMOD_SOUND_FORMAT_BITSTREAM,
FMOD_SOUND_FORMAT_MAX
} FMOD_SOUND_FORMAT;
JavaScript Syntax
FMOD.SOUND_FORMAT_NONE
FMOD.SOUND_FORMAT_PCM8
FMOD.SOUND_FORMAT_PCM16
FMOD.SOUND_FORMAT_PCM24
FMOD.SOUND_FORMAT_PCM32
FMOD.SOUND_FORMAT_PCMFLOAT
FMOD.SOUND_FORMAT_BITSTREAM
FMOD.SOUND_FORMAT_MAX
FMOD.SOUND_FORMAT_FORCEINT
Values
FMOD_SOUND_FORMAT_NONE
Unitialized / unknown.
FMOD_SOUND_FORMAT_PCM8
FMOD_SOUND_FORMAT_PCM16
FMOD_SOUND_FORMAT_PCM24
FMOD_SOUND_FORMAT_PCM32
FMOD_SOUND_FORMAT_PCMFLOAT
FMOD_SOUND_FORMAT_BITSTREAM
FMOD_SOUND_FORMAT_MAX
C/C++ Syntax
typedef enum {
FMOD_SOUND_TYPE_UNKNOWN,
FMOD_SOUND_TYPE_AIFF,
FMOD_SOUND_TYPE_ASF,
FMOD_SOUND_TYPE_DLS,
FMOD_SOUND_TYPE_FLAC,
FMOD_SOUND_TYPE_FSB,
FMOD_SOUND_TYPE_IT,
FMOD_SOUND_TYPE_MIDI,
FMOD_SOUND_TYPE_MOD,
FMOD_SOUND_TYPE_MPEG,
FMOD_SOUND_TYPE_OGGVORBIS,
FMOD_SOUND_TYPE_PLAYLIST,
FMOD_SOUND_TYPE_RAW,
FMOD_SOUND_TYPE_S3M,
FMOD_SOUND_TYPE_USER,
FMOD_SOUND_TYPE_WAV,
FMOD_SOUND_TYPE_XM,
FMOD_SOUND_TYPE_XMA,
FMOD_SOUND_TYPE_AUDIOQUEUE,
FMOD_SOUND_TYPE_AT9,
FMOD_SOUND_TYPE_VORBIS,
FMOD_SOUND_TYPE_MEDIA_FOUNDATION,
FMOD_SOUND_TYPE_MEDIACODEC,
FMOD_SOUND_TYPE_FADPCM,
FMOD_SOUND_TYPE_MAX
} FMOD_SOUND_TYPE;
JavaScript Syntax
FMOD.SOUND_TYPE_UNKNOWN
FMOD.SOUND_TYPE_AIFF
FMOD.SOUND_TYPE_ASF
FMOD.SOUND_TYPE_DLS
FMOD.SOUND_TYPE_FLAC
FMOD.SOUND_TYPE_FSB
FMOD.SOUND_TYPE_IT
FMOD.SOUND_TYPE_MIDI
FMOD.SOUND_TYPE_MOD
FMOD.SOUND_TYPE_MPEG
FMOD.SOUND_TYPE_OGGVORBIS
FMOD.SOUND_TYPE_PLAYLIST
FMOD.SOUND_TYPE_RAW
FMOD.SOUND_TYPE_S3M
FMOD.SOUND_TYPE_USER
FMOD.SOUND_TYPE_WAV
FMOD.SOUND_TYPE_XM
FMOD.SOUND_TYPE_XMA
FMOD.SOUND_TYPE_AUDIOQUEUE
FMOD.SOUND_TYPE_AT9
FMOD.SOUND_TYPE_VORBIS
FMOD.SOUND_TYPE_MEDIA_FOUNDATION
FMOD.SOUND_TYPE_MEDIACODEC
FMOD.SOUND_TYPE_FADPCM
FMOD.SOUND_TYPE_MAX
FMOD.SOUND_TYPE_FORCEINT
Values
FMOD_SOUND_TYPE_UNKNOWN
FMOD_SOUND_TYPE_AIFF
AIFF.
FMOD_SOUND_TYPE_ASF
FMOD_SOUND_TYPE_DLS
FMOD_SOUND_TYPE_FLAC
FMOD_SOUND_TYPE_FSB
FMOD_SOUND_TYPE_IT
Impulse Tracker.
FMOD_SOUND_TYPE_MIDI
MIDI.
FMOD_SOUND_TYPE_MOD
FMOD_SOUND_TYPE_MPEG
MP2/MP3 MPEG.
FMOD_SOUND_TYPE_OGGVORBIS
Ogg vorbis.
FMOD_SOUND_TYPE_PLAYLIST
FMOD_SOUND_TYPE_RAW
FMOD_SOUND_TYPE_S3M
ScreamTracker 3.
FMOD_SOUND_TYPE_USER
FMOD_SOUND_TYPE_WAV
Microsoft WAV.
FMOD_SOUND_TYPE_XM
FastTracker 2 XM.
FMOD_SOUND_TYPE_XMA
Xbox360 XMA
FMOD_SOUND_TYPE_AUDIOQUEUE
FMOD_SOUND_TYPE_AT9
Vorbis
FMOD_SOUND_TYPE_MEDIA_FOUNDATION
FMOD_SOUND_TYPE_MEDIACODEC
Android MediaCodec
FMOD_SOUND_TYPE_FADPCM
FMOD_SOUND_TYPE_MAX
C/C++ Syntax
typedef enum {
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;
JavaScript Syntax
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_MAX
FMOD.SPEAKER_FORCEINT
Values
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
The top front right speaker
FMOD_SPEAKER_TOP_BACK_LEFT
FMOD_SPEAKER_TOP_BACK_RIGHT
FMOD_SPEAKER_MAX
C/C++ Syntax
typedef enum {
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;
JavaScript Syntax
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_MAX
FMOD.SPEAKERMODE_FORCEINT
Values
FMOD_SPEAKERMODE_DEFAULT
Default speaker mode for the chosen output mode which will resolve after
System::init.
FMOD_SPEAKERMODE_RAW
FMOD_SPEAKERMODE_MONO
FMOD_SPEAKERMODE_STEREO
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
FMOD_SPEAKERMODE_RAW
---------------------
This mode is for output devices that are not specifically
mono/stereo/quad/surround/5.1 or 7.1, but are multichannel.
Use System::setSoftwareFormat to specify the number of speakers you want to
address, otherwise it will default to 2 (stereo).
Sound channels map to speakers sequentially, so a mono sound maps to output
speaker 0, stereo sound maps to output speaker 0 & 1.
The user assumes knowledge of the speaker order. FMOD_SPEAKER
enumerations may not apply, so raw channel indices should be used.
Multichannel sounds map input channels to output channels 1:1.
Channel::setPan and Channel::setPanLevels do not work.
Speaker levels must be manually set with Channel::setPanMatrix.
FMOD_SPEAKERMODE_MONO
---------------------
This mode is for a 1 speaker arrangement.
Panning does not work in this speaker mode.
Mono, stereo and multichannel sounds have each sound channel played on the
one speaker unity.
Mix behavior for multichannel sounds can be set with Channel::setPanMatrix.
Channel::setPanLevels does not work.
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 Channel::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 Channel::setPan.
Multichannel sounds have each sound channel played on each speaker at unity.
Mix behavior for multichannel sounds can be set with Channel::setPanMatrix.
Channel::setPanLevels works but only front left and right parameters are used,
the rest are ignored.
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 Channel::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 Channel::setPan.
Multichannel sounds default to all of their sound channels being played on
each speaker in order of input.
Mix behavior for multichannel sounds can be set with Channel::setPanMatrix.
Channel::setPanLevels works but rear left, rear right, center and lfe are
ignored.
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
Channel::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 Channel::setPan.
Multichannel sounds default to all of their sound channels being played on
each speaker in order of input.
Mix behavior for multichannel sounds can be set with Channel::setPanMatrix.
Channel::setPanLevels works but rear left / rear right are ignored.
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
Channel::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 Channel::setPan.
Multichannel sounds default to all of their sound channels being played on
each speaker in order of input.
Mix behavior for multichannel sounds can be set with Channel::setPanMatrix.
Channel::setPanLevels works but rear left / rear right are ignored.
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
Channel::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 Channel::setPan.
Multichannel sounds default to all of their sound channels being played on
each speaker in order of input.
Mix behavior for multichannel sounds can be set with Channel::setPanMatrix.
Channel::setPanLevels works and every parameter is used to set the balance of
a sound in any speaker.
See Also
System::setSoftwareFormat
System::getSoftwareFormat
DSP::setChannelFormat
C/C++ Syntax
typedef enum {
FMOD_TAGDATATYPE_BINARY,
FMOD_TAGDATATYPE_INT,
FMOD_TAGDATATYPE_FLOAT,
FMOD_TAGDATATYPE_STRING,
FMOD_TAGDATATYPE_STRING_UTF16,
FMOD_TAGDATATYPE_STRING_UTF16BE,
FMOD_TAGDATATYPE_STRING_UTF8,
FMOD_TAGDATATYPE_CDTOC,
FMOD_TAGDATATYPE_MAX
} FMOD_TAGDATATYPE;
JavaScript Syntax
FMOD.TAGDATATYPE_BINARY
FMOD.TAGDATATYPE_INT
FMOD.TAGDATATYPE_FLOAT
FMOD.TAGDATATYPE_STRING
FMOD.TAGDATATYPE_STRING_UTF16
FMOD.TAGDATATYPE_STRING_UTF16BE
FMOD.TAGDATATYPE_STRING_UTF8
FMOD.TAGDATATYPE_CDTOC
FMOD.TAGDATATYPE_MAX
FMOD.TAGDATATYPE_FORCEINT
Values
FMOD_TAGDATATYPE_BINARY
FMOD_TAGDATATYPE_INT
FMOD_TAGDATATYPE_FLOAT
FMOD_TAGDATATYPE_STRING
FMOD_TAGDATATYPE_STRING_UTF16
FMOD_TAGDATATYPE_STRING_UTF16BE
FMOD_TAGDATATYPE_STRING_UTF8
FMOD_TAGDATATYPE_CDTOC
FMOD_TAGDATATYPE_MAX
C/C++ Syntax
typedef enum {
FMOD_TAGTYPE_UNKNOWN,
FMOD_TAGTYPE_ID3V1,
FMOD_TAGTYPE_ID3V2,
FMOD_TAGTYPE_VORBISCOMMENT,
FMOD_TAGTYPE_SHOUTCAST,
FMOD_TAGTYPE_ICECAST,
FMOD_TAGTYPE_ASF,
FMOD_TAGTYPE_MIDI,
FMOD_TAGTYPE_PLAYLIST,
FMOD_TAGTYPE_FMOD,
FMOD_TAGTYPE_USER,
FMOD_TAGTYPE_MAX
} FMOD_TAGTYPE;
JavaScript Syntax
FMOD.TAGTYPE_UNKNOWN
FMOD.TAGTYPE_ID3V1
FMOD.TAGTYPE_ID3V2
FMOD.TAGTYPE_VORBISCOMMENT
FMOD.TAGTYPE_SHOUTCAST
FMOD.TAGTYPE_ICECAST
FMOD.TAGTYPE_ASF
FMOD.TAGTYPE_MIDI
FMOD.TAGTYPE_PLAYLIST
FMOD.TAGTYPE_FMOD
FMOD.TAGTYPE_USER
FMOD.TAGTYPE_MAX
FMOD.TAGTYPE_FORCEINT
Values
FMOD_TAGTYPE_UNKNOWN
FMOD_TAGTYPE_ID3V1
FMOD_TAGTYPE_ID3V2
FMOD_TAGTYPE_VORBISCOMMENT
FMOD_TAGTYPE_SHOUTCAST
FMOD_TAGTYPE_ICECAST
FMOD_TAGTYPE_ASF
FMOD_TAGTYPE_MIDI
FMOD_TAGTYPE_PLAYLIST
FMOD_TAGTYPE_FMOD
FMOD_TAGTYPE_USER
FMOD_TAGTYPE_MAX
C++ Syntax
static FMOD_RESULT Studio::System::create(
Studio::System **system,
unsigned int headerVersion
);
C Syntax
FMOD_RESULT FMOD_Studio_System_Create(
FMOD_STUDIO_SYSTEM **system,
unsigned int headerVersion
);
C# Syntax
static RESULT Studio.System.create(
out System studiosystem
);
JavaScript Syntax
static System.create(
system, // writes value to system.val
headerversion
);
Parameters
system
Address of a variable to receive the new Studio System object.
headerVersion
The expected FMOD Studio API version, to ensure the library matches the
headers. For the C API, pass in FMOD_VERSION. For the C++ API, it
defaults to FMOD_VERSION, so you don't need to pass it in explicitly.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This also creates the internal Low Level System object. Call
Studio::System::release to free the Studio System.
C++ Syntax
FMOD_RESULT Studio::System::flushCommands();
C Syntax
FMOD_RESULT FMOD_Studio_System_FlushCommands(FMOD_STUDIO_SYSTEM *system
C# Syntax
RESULT Studio.System.flushCommands();
JavaScript Syntax
System.flushCommands();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When Studio has been initialized in asynchronous mode, this function will block
the calling thread until the pending command buffer is empty and until all non-
blocking bank loads have completed.
You can use this function to ensure that Studio has finished executing all
pending commands, for example, when measuring memory usage after calling
bank unload.
This function does not wait for sample data loading to complete.
See Also
Studio::System::initialize
Studio::System::update
Studio::System::flushSampleLoading
C++ Syntax
FMOD_RESULT Studio::System::flushSampleLoading();
C Syntax
FMOD_RESULT FMOD_Studio_System_FlushSampleLoading(FMOD_STUDIO_SYSTEM *
C# Syntax
RESULT Studio.System.flushSampleLoading();
JavaScript Syntax
System.flushSampleLoading();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function will block the calling thread until all pending sample loading and
unloading has completed.
You can use this function to ensure that Studio has finished executing sample
loading, for example measuring memory or disk usage.
NOTE! This function may stall for a long time if other threads are continuing to
issue calls to load and unload sample data, such continually creating new event
instances.
See Also
Studio::System::flushCommands
Studio::Bank::loadSampleData
Studio::EventDescription::loadSampleData
C++ Syntax
FMOD_RESULT Studio::System::getAdvancedSettings(
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetAdvancedSettings(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
C# Syntax
RESULT Studio.System.getAdvancedSettings(
out ADVANCEDSETTINGS settings
);
JavaScript Syntax
System.getAdvancedSettings(
settings // writes value to settings.val
);
Parameters
settings
Address of a variable to receive the contents of the
FMOD_STUDIO_ADVANCEDSETTINGS structure specified by the user.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The cbSize field must be set to
sizeof(FMOD_STUDIO_ADVANCEDSETTINGS) before calling this function.
See Also
FMOD_STUDIO_ADVANCEDSETTINGS
Studio::System::setAdvancedSettings
C++ Syntax
FMOD_RESULT Studio::System::getBank(
const char *path,
Studio::Bank **bank
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetBank(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_STUDIO_BANK **bank
);
C# Syntax
RESULT Studio.System.getBank(
string path,
out Bank bank
);
JavaScript Syntax
System.getBank(
path,
bank // writes value to bank.val
);
Parameters
path
The bank path, filename, or the ID string that identifies the bank.
bank
Address of a variable to receive the Bank object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If a bank path or ID is passed in, this is equivalent to calling
Studio::System::lookupID or Studio::parseID and then calling
Studio::System::GetBankByID. If a bank filename is passed in, it is first
converted to a bank path.
The path field can be the bank path such as 'bank:/Weapons', the bank filename
such as '../Desktop/Weapons.bank', or the ID such as '{793cddb6-7fa1-4e06-
b805-4c74c0fd625b}'.
See Also
Studio::parseID
Studio::System::lookupID
Studio::System::getBankByID
C++ Syntax
FMOD_RESULT Studio::System::getBankByID(
const FMOD_GUID *id,
Studio::Bank **bank
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetBankByID(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
FMOD_STUDIO_BANK **bank
);
C# Syntax
RESULT Studio.System.getBankByID(
Guid guid,
out Bank bank
);
JavaScript Syntax
System.getBankByID(
id,
bank // writes value to bank.val
);
Parameters
id
The 128-bit GUID which identifies the bank.
bank
Address of a variable to receive the Bank object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The bank ID can be looked up using Studio::System::lookupID or parsed from a
string using Studio::parseID.
See Also
Studio::parseID
Studio::System::lookupID
Studio::System::getBank
C++ Syntax
FMOD_RESULT Studio::System::getBankCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetBankCount(
FMOD_STUDIO_SYSTEM *system,
int *count
);
C# Syntax
RESULT Studio.System.getBankCount(
out int count
);
JavaScript Syntax
System.getBankCount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the number of loaded Banks.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used in conjunction with Studio::System::getBankList to enumerate the banks.
See Also
Studio::System::getBankList
C++ Syntax
FMOD_RESULT Studio::System::getBankList(
Studio::Bank **array,
int capacity,
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetBankList(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_BANK **array,
int capacity,
int *count
);
C# Syntax
RESULT Studio.System.getBankList(
out Bank[] array
);
JavaScript Syntax
System.getBankList(
array, // writes value to array.val
capacity,
count // writes value to count.val
);
Parameters
array
An array of memory allocated by the user.
capacity
The capacity of the array passed in as the first parameter
count
Address of a variable to receive the number of Banks written to the array
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used in conjunction with Studio::System::getBankCount to enumerate the
banks.
See Also
Studio::System::getBankCount
C++ Syntax
FMOD_RESULT Studio::System::getBufferUsage(
FMOD_STUDIO_BUFFER_USAGE *usage
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetBufferUsage(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_BUFFER_USAGE *usage
);
C# Syntax
RESULT Studio.System.getBufferUsage(
out BUFFER_USAGE usage
);
JavaScript Syntax
System.getBufferUsage(
usage // writes value to usage.val
);
Parameters
usage
Address of a variable to receive the performance information.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Stall count and time values are cumulative. They can be reset by calling
Studio::System::resetBufferUsage.
C++ Syntax
FMOD_RESULT Studio::System::getBus(
const char *path,
Studio::Bus **bus
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetBus(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_STUDIO_BUS **bus
);
C# Syntax
RESULT Studio.System.getBus(
string path,
out Bus bus
);
JavaScript Syntax
System.getBus(
path,
bus // writes value to bus.val
);
Parameters
path
The bus path or the ID string that identifies the bus.
bus
Address of a variable to receive the bus object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows you to retrieve a handle for any bus in the global mixer.
The path field can be the full bus path, such as 'bus:/SFX/Ambience', or the ID,
such as '{d9982c58-a056-4e6c-b8e3-883854b4bffb}'.
Note that path lookups will only succeed if the strings bank has been loaded.
See Also
Studio::parseID
Studio::System::lookupID
Studio::System::getBusByID
C++ Syntax
FMOD_RESULT Studio::System::getBusByID(
const FMOD_GUID *id,
Studio::Bus **bus
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetBusByID(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
FMOD_STUDIO_BUS **bus
);
C# Syntax
RESULT Studio.System.getBusByID(
Guid guid,
out Bus bus
);
JavaScript Syntax
System.getBusByID(
id,
bus // writes value to bus.val
);
Parameters
id
The 128-bit GUID which identifies the bus.
bus
Address of a variable to receive the bus object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows you to retrieve a handle for any bus in the global mixer. The
ID can be looked up using Studio::System::lookupID or parsed from a string
using Studio::parseID.
See Also
Studio::parseID
Studio::System::lookupID
Studio::System::getBus
C++ Syntax
FMOD_RESULT Studio::System::getCPUUsage(
FMOD_STUDIO_CPU_USAGE *usage
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetCPUUsage(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_CPU_USAGE *usage
);
C# Syntax
RESULT Studio.System.getCPUUsage(
out CPU_USAGE usage
);
JavaScript Syntax
System.getCPUUsage(
usage // writes value to usage.val
);
Parameters
usage
Address of a variable to receive the performance information.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_STUDIO_CPU_USAGE
C++ Syntax
FMOD_RESULT Studio::System::getEvent(
const char *path,
Studio::EventDescription **event
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetEvent(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_STUDIO_EVENTDESCRIPTION **event
);
C# Syntax
RESULT Studio.System.getEvent(
string path,
out EventDescription _event
);
JavaScript Syntax
System.getEvent(
path,
event // writes value to event.val
);
Parameters
path
The path or the ID string that identifies the event or snapshot.
event
Address of a variable to receive the EventDescription object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows you to retrieve a handle to any loaded event description.
The path field can be the full event path, such as 'event:/UI/Cancel' or
'snapshot:/IngamePause', or the ID in the form '{2a3e48e6-94fc-4363-9468-
33d2dd4d7b00}'.
Note that path lookups will only succeed if the strings bank has been loaded.
See Also
Studio::parseID
Studio::System::lookupID
Studio::System::getEventByID
Studio::EventDescription::isSnapshot
Studio::EventDescription::createInstance
C++ Syntax
FMOD_RESULT Studio::System::getEventByID(
const FMOD_GUID *id,
Studio::EventDescription **event
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetEventByID(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
FMOD_STUDIO_EVENTDESCRIPTION **event
);
C# Syntax
RESULT Studio.System.getEventByID(
Guid guid,
out EventDescription _event
);
JavaScript Syntax
System.getEventByID(
id,
event // writes value to event.val
);
Parameters
id
The 128-bit GUID which identifies the event or snapshot.
event
Address of a variable to receive the EventDescription object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The event ID can be looked up using Studio::System::lookupID or parsed from a
string using Studio::parseID.
See Also
Studio::parseID
Studio::System::lookupID
Studio::System::getEvent
Studio::EventDescription::isSnapshot
Studio::EventDescription::createInstance
C++ Syntax
FMOD_RESULT Studio::System::getListenerAttributes(
int listener,
FMOD_3D_ATTRIBUTES *attributes
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetListenerAttributes(
FMOD_STUDIO_SYSTEM *system,
int listener,
FMOD_3D_ATTRIBUTES *attributes
);
C# Syntax
RESULT Studio.System.getListenerAttributes(
int listener,
out _3D_ATTRIBUTES attributes
);
JavaScript Syntax
System.getListenerAttributes(
listener,
attributes // writes value to attributes.val
);
Parameters
listener
Listener index. Specify 0 if there is only 1 listener.
attributes
Address of a variable to receive the 3D attributes for the listener. See
FMOD_3D_ATTRIBUTES.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventInstance::get3DAttributes
Studio::System::getNumListeners
Studio::System::setListenerAttributes
C++ Syntax
FMOD_RESULT Studio::System::getListenerWeight(
int listener,
float *weight
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetListenerWeight(
FMOD_STUDIO_SYSTEM *system,
int listener,
float *weight
);
C# Syntax
RESULT Studio.System.getListenerWeight(
int listener,
out float weight
);
JavaScript Syntax
System.getListenerWeight(
listener,
weight // writes value to weight.val
);
Parameters
listener
Listener index.
weight
Address of a variable to receive the weighting value.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::System::setListenerWeight
Studio::System::setNumListeners
Studio::System::getListenerAttributes
C++ Syntax
FMOD_RESULT Studio::System::getLowLevelSystem(
FMOD::System **lowLevelSystem
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetLowLevelSystem(
FMOD_STUDIO_SYSTEM *system,
FMOD_SYSTEM **lowLevelSystem
);
C# Syntax
RESULT Studio.System.getLowLevelSystem(
out FMOD.System system
);
JavaScript Syntax
System.getLowLevelSystem(
system // writes value to system.val
);
Parameters
lowLevelSystem
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Use this to call Low Level configuration functions before initialization.
See Also
System::setFileSystem
System::setDSPBufferSize
System::setSoftwareChannels
System::setSoftwareFormat
System::setAdvancedSettings
System::setCallback
C++ Syntax
FMOD_RESULT Studio::System::getNumListeners(
int *numlisteners
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetNumListeners(
FMOD_STUDIO_SYSTEM *system,
int *numlisteners
);
C# Syntax
RESULT Studio.System.getNumListeners(
out int numlisteners
);
JavaScript Syntax
System.getNumListeners(
numlisteners // writes value to numlisteners.val
);
Parameters
numlisteners
Number of listeners that have been set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::System::setNumListeners
C++ Syntax
FMOD_RESULT Studio::System::getSoundInfo(
const char *key,
FMOD_STUDIO_SOUND_INFO *info
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetSoundInfo(
FMOD_STUDIO_SYSTEM *system,
const char *key,
FMOD_STUDIO_SOUND_INFO *info
);
C# Syntax
RESULT Studio.System.getSoundInfo(
string key,
out SOUND_INFO info
);
JavaScript Syntax
System.getSoundInfo(
key,
info // writes value to info.val
);
Parameters
key
The key that identifies the sound.
info
Address of a variable to receive the sound loading information.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The FMOD_STUDIO_SOUND_INFO structure contains information to be
passed to System::createSound (which will create a parent sound), along with a
subsound index to be passed to Sound::getSubSound once the parent sound is
loaded.
Example code:
const char* audio_table_name = "some name";
FMOD::Sound* sound = NULL;
FMOD_STUDIO_SOUND_INFO info = {};
C++ Syntax
FMOD_RESULT Studio::System::getUserData(
void **userData
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetUserData(
FMOD_STUDIO_SYSTEM *system,
void **userData
);
C# Syntax
RESULT Studio.System.getUserData(
out IntPtr userdata
);
JavaScript Syntax
System.getUserData(
userdata // writes value to userdata.val
);
Parameters
userData
Address of a variable to receive the user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::System::setUserData
C++ Syntax
FMOD_RESULT Studio::System::getVCA(
const char *path,
Studio::VCA **vca
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetVCA(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_STUDIO_VCA **vca
);
C# Syntax
RESULT Studio.System.getVCA(
string path,
out VCA vca
);
JavaScript Syntax
System.getVCA(
path,
vca // writes value to vca.val
);
Parameters
path
The VCA path or the ID string that identifies the VCA.
vca
Address of a variable to receive the VCA object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows you to retrieve a handle for any VCA in the global mixer.
The path field can be the full VCA path, such as 'vca:/MyVCA', or the ID, such
as '{d9982c58-a056-4e6c-b8e3-883854b4bffb}'.
Note that path lookups will only succeed if the strings bank has been loaded.
See Also
Studio::parseID
Studio::System::lookupID
Studio::System::getVCAByID
C++ Syntax
FMOD_RESULT Studio::System::getVCAByID(
const FMOD_GUID *id,
Studio::VCA **vca
);
C Syntax
FMOD_RESULT FMOD_Studio_System_GetVCAByID(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
FMOD_STUDIO_VCA **vca
);
C# Syntax
RESULT Studio.System.getVCAByID(
Guid guid,
out VCA vca
);
JavaScript Syntax
System.getVCAByID(
id,
vca // writes value to vca.val
);
Parameters
id
The 128-bit GUID which identifies the VCA.
vca
Address of a variable to receive the VCA object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows you to retrieve a handle for any VCA in the global mixer.
The ID can be looked up using Studio::System::lookupID or parsed from a string
using Studio::parseID.
See Also
Studio::parseID
Studio::System::lookupID
Studio::System::getVCA
C++ Syntax
FMOD_RESULT Studio::System::initialize(
int maxchannels,
FMOD_STUDIO_INITFLAGS studioflags,
FMOD_INITFLAGS flags,
void *extradriverdata
);
C Syntax
FMOD_RESULT FMOD_Studio_System_Initialize(
FMOD_STUDIO_SYSTEM *system,
int maxchannels,
FMOD_STUDIO_INITFLAGS studioflags,
FMOD_INITFLAGS flags,
void *extradriverdata
);
C# Syntax
RESULT Studio.System.initialize(
int maxchannels,
INITFLAGS studioFlags,
FMOD.INITFLAGS flags,
IntPtr extradriverdata
);
JavaScript Syntax
System.initialize(
maxchannels,
studioflags,
flags,
extradriverdata
);
Parameters
maxchannels
The maximum number of channels to be used in FMOD. These are also
called 'virtual channels', as you can play as many of these as you want, even
if you only have a small number of real voices.
studioflags
See FMOD_STUDIO_INITFLAGS. This can be a selection of flags bitwise
OR'ed together to change the behaviour of the Studio System.
flags
See FMOD_INITFLAGS. This can be a selection of flags bitwise OR'ed
together to change the behaviour of the Low Level System.
extradriverdata
Driver specific data that can be passed to the output plugin. For example the
filename for the wav writer plugin. See FMOD_OUTPUTTYPE for what
each output mode might take here. Optional. Specify 0 or NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function should be called at startup time, after creating a Studio System
with Studio::System::create.
By default Studio is initialized in asynchronous mode where all API calls are
automatically deferred for execution on a separate Studio thread. You can use
FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE to disable this behaviour
and have all commands executed inside Studio::System::update.
See Also
Studio::System::create
C++ Syntax
FMOD_RESULT Studio::System::loadBankCustom(
const FMOD_STUDIO_BANK_INFO *info,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
Studio::Bank **bank
);
C Syntax
FMOD_RESULT FMOD_Studio_System_LoadBankCustom(
FMOD_STUDIO_SYSTEM *system,
const FMOD_STUDIO_BANK_INFO *info,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
FMOD_STUDIO_BANK **bank
);
C# Syntax
RESULT Studio.System.loadBankCustom(
BANK_INFO info,
LOAD_BANK_FLAGS flags,
out Bank bank
);
JavaScript Syntax
System.loadBankCustom(
info,
flags,
bank // writes value to bank.val
);
Parameters
info
Information for loading the bank.
flags
Flags to control bank loading.
bank
Address of a variable to receive the Bank object. Optional. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
By default this function will block until the file load finishes, and then return the
FMOD_RESULT indicating the result. If there was a file error for blocking bank
loads, then the bank variable will be returned as NULL.
C++ Syntax
FMOD_RESULT Studio::System::loadBankFile(
const char *filename,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
Studio::Bank **bank
);
C Syntax
FMOD_RESULT FMOD_Studio_System_LoadBankFile(
FMOD_STUDIO_SYSTEM *system,
const char *filename,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
FMOD_STUDIO_BANK **bank
);
C# Syntax
RESULT Studio.System.loadBankFile(
string name,
LOAD_BANK_FLAGS flags,
out Bank bank
);
JavaScript Syntax
System.loadBankFile(
filename,
flags,
bank // writes value to bank.val
);
Parameters
filename
Name of the file on disk.
flags
Flags to control bank loading.
bank
Address of a variable to receive the Bank object. Optional. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
By default this function will block until the file load finishes, and then return the
FMOD_RESULT indicating the result. If there was a file error for blocking bank
loads, then the bank variable will be returned as NULL.
C++ Syntax
FMOD_RESULT Studio::System::loadBankMemory(
const char *buffer,
int length,
FMOD_STUDIO_LOAD_MEMORY_MODE mode,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
Studio::Bank **bank
);
C Syntax
FMOD_RESULT FMOD_Studio_System_LoadBankMemory(
FMOD_STUDIO_SYSTEM *system,
const char *buffer,
int length,
FMOD_STUDIO_LOAD_MEMORY_MODE mode,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
FMOD_STUDIO_BANK **bank
);
C# Syntax
RESULT Studio.System.loadBankMemory(
byte[] buffer,
LOAD_BANK_FLAGS flags,
out Bank bank
);
JavaScript Syntax
System.loadBankMemory(
buffer,
length,
mode,
flags,
bank // writes value to bank.val
);
Parameters
buffer
Memory buffer to load from. This should be 32-byte aligned if mode is
FMOD_STUDIO_LOAD_MEMORY_POINT.
length
Length of the memory buffer.
mode
Loading mode to use.
flags
Flags to control bank loading.
bank
Address of a variable to receive the Bank object. Optional. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Specifying mode FMOD_STUDIO_LOAD_MEMORY_POINT will POINT to
your memory rather than FMOD allocating its own buffers and duplicating it
internally. When using this mode, the buffer must be aligned to
FMOD_STUDIO_LOAD_MEMORY_ALIGNMENT and the lifetime of the
memory must persist until the bank has been queued for unload and then the
unload has been performed. You can ensure the memory is not being freed
prematurely by only freeing it after receiving the
FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD callback.
By default this function will block until the file load finishes, and then return the
FMOD_RESULT indicating the result. If there was a file error for blocking bank
loads, then the bank variable will be returned as NULL.
C++ Syntax
FMOD_RESULT Studio::System::loadCommandReplay(
const char *filename,
FMOD_STUDIO_COMMANDREPLAY_FLAGS flags
);
C Syntax
FMOD_RESULT FMOD_Studio_System_LoadCommandReplay(
FMOD_STUDIO_SYSTEM *system,
const char *filename,
FMOD_STUDIO_COMMANDREPLAY_FLAGS flags
);
C# Syntax
RESULT Studio.System.loadCommandReplay(
string path,
COMMANDREPLAY_FLAGS flags,
out CommandReplay replay
);
JavaScript Syntax
System.loadCommandReplay(
filename,
flags,
playback // writes value to playback.val
);
Parameters
filename
The filename to load the command replay file from.
flags
Flags that control the command replay.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_STUDIO_COMMANDREPLAY_FLAGS
Studio::System::startCommandCapture
Studio::System::stopCommandCapture
Studio::CommandReplay::start
Studio::CommandReplay::stop
Studio::CommandReplay::release
C++ Syntax
FMOD_RESULT Studio::System::lookupID(
const char *path,
FMOD_GUID *id
);
C Syntax
FMOD_RESULT FMOD_Studio_System_LookupID(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_GUID *id
);
C# Syntax
RESULT Studio.System.lookupID(
string path,
out Guid guid
);
JavaScript Syntax
System.lookupID(
path,
id // writes value to id.val
);
Parameters
path
The path to the object as shown in FMOD Studio.
id
Address of a variable to receive the 128-bit GUID.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function will return FMOD_ERR_EVENT_NOTFOUND unless string data
for the requested object is loaded (by loading the "Master Bank.strings.bank"
file).
The path can be retrieved from FMOD Studio using the "Copy Path" context
menu command. Paths must be in the following format:
"event:/UI/Cancel"
"snapshot:/IngamePause"
"bus:/SFX/Ambience"
"vca:/Mega Strip"
"bank:/Vehicles"
See Also
Studio::System::getEvent
Studio::System::getBus
Studio::System::getVCA
Studio::System::getBank
Studio::System::lookupPath
C++ Syntax
FMOD_RESULT Studio::System::lookupPath(
const FMOD_GUID *id,
char *path,
int size,
int *retrieved
);
C Syntax
FMOD_RESULT FMOD_Studio_System_LookupPath(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
char *path,
int size,
int *retrieved
);
C# Syntax
RESULT Studio.System.lookupPath(
Guid guid,
out string path
);
JavaScript Syntax
System.lookupPath(
id,
path, // writes value to path.val
size,
retrieved // writes value to retrieved.val
);
Parameters
id
The 128-bit GUID which identifies the bank, event, snapshot, bus or VCA.
path
Address of a buffer to receive the path. Specify 0 or NULL to ignore.
size
Size of the path buffer in bytes. Required if path parameter is not NULL.
retrieved
Address of a variable to receive the size of the retrieved path in bytes,
including the terminating null character. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function will return FMOD_ERR_EVENT_NOTFOUND unless string data
for the requested object is loaded (by loading the "Master Bank.strings.bank"
file).
If the retrieved path is too long to fit in the supplied buffer, it will be truncated
and this function will return FMOD_ERR_TRUNCATED. Use the retrieved
parameter to obtain the minimum buffer size required to hold the full path.
JavaScript only :
Note: For the "path" parameter, the maximum string length is 512.
See Also
Studio::System::lookupID
C++ Syntax
FMOD_RESULT Studio::System::registerPlugin(
const FMOD_DSP_DESCRIPTION *description
);
C Syntax
FMOD_RESULT FMOD_Studio_System_RegisterPlugin(
FMOD_STUDIO_SYSTEM *system,
const FMOD_DSP_DESCRIPTION *description
);
C# Syntax
RESULT Studio.System.registerPlugin(
);
JavaScript Syntax
System.registerPlugin(
description
);
Parameters
description
The description of the DSP. See FMOD_DSP_DESCRIPTION.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::System::unregisterPlugin
C++ Syntax
FMOD_RESULT Studio::System::release();
C Syntax
FMOD_RESULT FMOD_Studio_System_Release(FMOD_STUDIO_SYSTEM *system);
C# Syntax
RESULT Studio.System.release();
JavaScript Syntax
System.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This will free the Studio System object and everything created under it.
C++ Syntax
FMOD_RESULT Studio::System::resetBufferUsage();
C Syntax
FMOD_RESULT FMOD_Studio_System_ResetBufferUsage(FMOD_STUDIO_SYSTEM *
C# Syntax
RESULT Studio.System.resetBufferUsage();
JavaScript Syntax
System.resetBufferUsage();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function resets the stall count, stall time, and peak usage fields of the
FMOD_STUDIO_BUFFER_USAGE struct.
See Also
FMOD_STUDIO_BUFFER_USAGE
Studio::System::getBufferUsage
C++ Syntax
FMOD_RESULT Studio::System::setAdvancedSettings(
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
C Syntax
FMOD_RESULT FMOD_Studio_System_SetAdvancedSettings(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
C# Syntax
RESULT Studio.System.setAdvancedSettings(
ADVANCEDSETTINGS settings
);
JavaScript Syntax
System.setAdvancedSettings(
settings
);
Parameters
settings
Pointer to FMOD_STUDIO_ADVANCEDSETTINGS structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function should be called before Studio initialization. The cbSize field must
be set to sizeof(FMOD_STUDIO_ADVANCEDSETTINGS) before calling this
function.
See Also
FMOD_STUDIO_ADVANCEDSETTINGS
Studio::System::getAdvancedSettings
Studio::System::initialize
C++ Syntax
FMOD_RESULT Studio::System::setCallback(
FMOD_STUDIO_SYSTEM_CALLBACK callback,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE callbackmask
);
C Syntax
FMOD_RESULT FMOD_Studio_System_SetCallback(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_SYSTEM_CALLBACK callback,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE callbackmask
);
C# Syntax
RESULT Studio.System.setCallback(
SYSTEM_CALLBACK callback,
SYSTEM_CALLBACK_TYPE callbackmask = SYSTEM_CALLBACK_TYPE.ALL
);
JavaScript Syntax
System.setCallback(
callback,
callbackmask
);
Parameters
callback
Pointer to a callback to receive the callback when it happens.
callbackmask
A bitfield specifying which callback types are required. Masking out some
callback types can help avoid a flood of irrelevant callbacks being
triggered. Defaults to FMOD_STUDIO_SYSTEM_CALLBACK_ALL.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Some callbacks can occur asynchronously depending on Studio initialisation
flags.
Example:
FMOD_RESULT F_CALLBACK MySystemCallback(FMOD_STUDIO_SYSTEM *system,
C++ Syntax
FMOD_RESULT Studio::System::setListenerAttributes(
int listener,
FMOD_3D_ATTRIBUTES *attributes
);
C Syntax
FMOD_RESULT FMOD_Studio_System_SetListenerAttributes(
FMOD_STUDIO_SYSTEM *system,
int listener,
FMOD_3D_ATTRIBUTES *attributes
);
C# Syntax
RESULT Studio.System.setListenerAttributes(
int listener,
_3D_ATTRIBUTES attributes
);
JavaScript Syntax
System.setListenerAttributes(
listener,
attributes
);
Parameters
listener
Listener index. Specify 0 if there is only 1 listener.
attributes
The 3D attributes for the listener. See FMOD_3D_ATTRIBUTES.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This should be called every game tick, or at least whenever the listener moves.
See Also
Studio::EventInstance::set3DAttributes
Studio::System::setNumListeners
Studio::System::setListenerWeight
Studio::System::getListenerAttributes
C++ Syntax
FMOD_RESULT Studio::System::setListenerWeight(
int listener,
float weight
);
C Syntax
FMOD_RESULT FMOD_Studio_System_SetListenerWeight(
FMOD_STUDIO_SYSTEM *system,
int listener,
float weight
);
C# Syntax
RESULT Studio.System.setListenerWeight(
int listener,
float weight
);
JavaScript Syntax
System.setListenerWeight(
listener,
weight
);
Parameters
listener
Listener index.
weight
The weighting value from 0 to 1.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Listener weighting is a factor that determines how much the listener contributes
to the mix. It is taken into account for 3D panning, doppler, and the automatic
distance event parameter. A listener with a weight of 0 has no effect on the mix.
Listener weighting can be used to fade in and out multiple listeners. For example
to do a crossfade, an additional listener can be created with a weighting of 0 that
ramps up to 1 while the old listener weight is ramped down to 0. After the
crossfade is finished the number of listeners can be reduced to 1 again.
The sum of all the listener weights should add up to at least 1. It is a user error to
set all listener weights to 0.
See Also
Studio::System::getListenerWeight
Studio::EventInstance::set3DAttributes
Studio::System::setNumListeners
Studio::System::getListenerAttributes
C++ Syntax
FMOD_RESULT Studio::System::setNumListeners(
int numlisteners
);
C Syntax
FMOD_RESULT FMOD_Studio_System_SetNumListeners(
FMOD_STUDIO_SYSTEM *system,
int numlisteners
);
C# Syntax
RESULT Studio.System.setNumListeners(
int numlisteners
);
JavaScript Syntax
System.setNumListeners(
numlisteners
);
Parameters
numlisteners
Number of listeners in the scene. Valid values are from 1 to
FMOD_MAX_LISTENERS inclusive. Default = 1.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If the number of listeners is set to more than 1, then FMOD uses a 'closest sound
to the listener' method to determine what should be heard.
See Also
Studio::System::getNumListeners
Studio::System::setListenerAttributes
Studio::System::setListenerWeight
FMOD_MAX_LISTENERS
C++ Syntax
FMOD_RESULT Studio::System::setUserData(
void *userData
);
C Syntax
FMOD_RESULT FMOD_Studio_System_SetUserData(
FMOD_STUDIO_SYSTEM *system,
void *userData
);
C# Syntax
RESULT Studio.System.setUserData(
IntPtr userdata
);
JavaScript Syntax
System.setUserData(
userdata
);
Parameters
userData
Address of user data to store within the system.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
See Also
Studio::System::getUserData
C++ Syntax
FMOD_RESULT Studio::System::startCommandCapture(
const char *filename,
FMOD_STUDIO_COMMANDCAPTURE_FLAGS flags
);
C Syntax
FMOD_RESULT FMOD_Studio_System_StartCommandCapture(
FMOD_STUDIO_SYSTEM *system,
const char *filename,
FMOD_STUDIO_COMMANDCAPTURE_FLAGS flags
);
C# Syntax
RESULT Studio.System.startCommandCapture(
string path,
COMMANDCAPTURE_FLAGS flags
);
JavaScript Syntax
System.startCommandCapture(
filename,
flags
);
Parameters
filename
The filename where the write the command replay file.
flags
Flags that control command capturing.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Commands can be captured and then replayed for debug purposes.
C++ Syntax
FMOD_RESULT Studio::System::stopCommandCapture();
C Syntax
FMOD_RESULT FMOD_Studio_System_StopCommandCapture(FMOD_STUDIO_SYSTEM *
C# Syntax
RESULT Studio.System.stopCommandCapture();
JavaScript Syntax
System.stopCommandCapture();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::System::startCommandCapture
Studio::System::loadCommandReplay
C++ Syntax
FMOD_RESULT Studio::System::unloadAll();
C Syntax
FMOD_RESULT FMOD_Studio_System_UnloadAll(FMOD_STUDIO_SYSTEM *system);
C# Syntax
RESULT Studio.System.unloadAll();
JavaScript Syntax
System.unloadAll();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::System::unregisterPlugin(
const char *name
);
C Syntax
FMOD_RESULT FMOD_Studio_System_UnregisterPlugin(
FMOD_STUDIO_SYSTEM *system,
const char *name
);
C# Syntax
RESULT Studio.System.unregisterPlugin(
);
JavaScript Syntax
System.unregisterPlugin(
name
);
Parameters
name
The name of the DSP. This should match the description passed to
Studio::System::registerPlugin.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::System::registerPlugin
C++ Syntax
FMOD_RESULT Studio::System::update();
C Syntax
FMOD_RESULT FMOD_Studio_System_Update(FMOD_STUDIO_SYSTEM *system);
C# Syntax
RESULT Studio.System.update();
JavaScript Syntax
System.update();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When Studio has been initialized in asynchronous mode, calling update flips a
command buffer for commands to be executed on the async thread and then
immediately returns. It is very fast since it is not executing any commands itself.
When Studio has been initialized with
FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE, update will execute the
queued commands before returning.
C++ Syntax
FMOD_RESULT Studio::EventDescription::createInstance(
Studio::EventInstance **instance
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_CreateInstance(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_STUDIO_EVENTINSTANCE **instance
);
C# Syntax
RESULT Studio.EventDescription.createInstance(
out EventInstance instance
);
JavaScript Syntax
EventDescription.createInstance(
instance // writes value to instance.val
);
Parameters
instance
Address of a variable to receive the EventInstance object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function creates playable instances of the EventDescription. Many instances
can be created from a single EventDescription. When an event instance is
created, it begins loading the required sample data asynchronously; use
Studio::EventDescription::getSampleLoadingState to check the loading status.
C++ Syntax
FMOD_RESULT Studio::EventDescription::getID(
FMOD_GUID *id
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetID(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_GUID *id
);
C# Syntax
RESULT Studio.EventDescription.getID(
out Guid id
);
JavaScript Syntax
EventDescription.getID(
id // writes value to id.val
);
Parameters
id
Address of a variable to receive the 128-bit GUID.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::EventDescription::getInstanceCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetInstanceCount(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
int *count
);
C# Syntax
RESULT Studio.EventDescription.getInstanceCount(
out int count
);
JavaScript Syntax
EventDescription.getInstanceCount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the number of created instances.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used in conjunction with Studio::EventDescription::getInstanceList to track the
playing instances of this event.
See Also
Studio::EventDescription::getInstanceList
C++ Syntax
FMOD_RESULT Studio::EventDescription::getInstanceList(
Studio::EventInstance **array,
int capacity,
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetInstanceList(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_STUDIO_EVENTINSTANCE **array,
int capacity,
int *count
);
C# Syntax
RESULT Studio.EventDescription.getInstanceList(
out EventInstance[] array
);
JavaScript Syntax
EventDescription.getInstanceList(
array, // writes value to array.val
capacity,
count // writes value to count.val
);
Parameters
array
An array of memory allocated by the user.
capacity
The capacity of the array passed in as the first parameter
count
Address of a variable to receive the number of Event Instances written to
the array
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Can be used in conjunction with Studio::EventDescription::getInstanceCount to
track the playing instances of this event.
See Also
Studio::EventDescription::getInstanceCount
C++ Syntax
FMOD_RESULT Studio::EventDescription::getLength(
int *length
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetLength(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
int *length
);
C# Syntax
RESULT Studio.EventDescription.getLength(
out int length
);
JavaScript Syntax
EventDescription.getLength(
length // writes value to length.val
);
Parameters
length
Address of a variable to receive the timeline length in milliseconds.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventInstance::getTimelinePosition
Studio::EventInstance::setTimelinePosition
C++ Syntax
FMOD_RESULT Studio::EventDescription::getMaximumDistance(
float *distance
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetMaximumDistance(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
float *distance
);
C# Syntax
RESULT Studio.EventDescription.getMaximumDistance(
out float distance
);
JavaScript Syntax
EventDescription.getMaximumDistance(
distance // writes value to distance.val
);
Parameters
distance
Address of a variable to receive the distance.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This is the largest Max Distance value out of all of the event's 3D Panners, or
zero if there are no 3D Panners.
C++ Syntax
FMOD_RESULT Studio::EventDescription::getMinimumDistance(
float *distance
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetMinimumDistance(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
float *distance
);
C# Syntax
RESULT Studio.EventDescription.getMinimumDistance(
out float distance
);
JavaScript Syntax
EventDescription.getMinimumDistance(
distance // writes value to distance.val
);
Parameters
distance
Address of a variable to receive the distance.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This is the smallest Min Distance value out of all of the event's 3D Panners, or
zero if there are no 3D Panners.
C++ Syntax
FMOD_RESULT Studio::EventDescription::getParameter(
const char *name,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetParameter(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
const char *name,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
C# Syntax
RESULT Studio.EventDescription.getParameter(
string name,
out PARAMETER_DESCRIPTION parameter
);
JavaScript Syntax
EventDescription.getParameter(
name,
parameter // writes value to parameter.val
);
Parameters
name
Name of the parameter (case-insensitive).
parameter
Address of a variable to receive the parameter description.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_STUDIO_PARAMETER_DESCRIPTION
Studio::EventInstance::getParameterValue
Studio::EventInstance::getParameterValueByIndex
Studio::EventInstance::setParameterValue
Studio::EventInstance::setParameterValueByIndex
C++ Syntax
FMOD_RESULT Studio::EventDescription::getParameterByIndex(
int index,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetParameterByIndex(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
int index,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
C# Syntax
RESULT Studio.EventDescription.getParameterByIndex(
int index,
out PARAMETER_DESCRIPTION parameter
);
JavaScript Syntax
EventDescription.getParameterByIndex(
index,
parameter // writes value to parameter.val
);
Parameters
index
Index of the parameter.
parameter
Address of a variable to receive the parameter description.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function can be used in combination with
Studio::EventDescription::getParameterCount to enumerate all parameters
within an event.
NOTE: The order of parameters is not necessarily the same as what is shown in
the FMOD Studio event window.
See Also
FMOD_STUDIO_PARAMETER_DESCRIPTION
Studio::EventDescription::getParameterCount
C++ Syntax
FMOD_RESULT Studio::EventDescription::getParameterCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetParameterCount(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
int *count
);
C# Syntax
RESULT Studio.EventDescription.getParameterCount(
out int count
);
JavaScript Syntax
EventDescription.getParameterCount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the parameter count.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventDescription::getParameterByIndex
C++ Syntax
FMOD_RESULT Studio::EventDescription::getPath(
char *path,
int size,
int *retrieved
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetPath(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
char *path,
int size,
int *retrieved
);
C# Syntax
RESULT Studio.EventDescription.getPath(
out string path
);
JavaScript Syntax
EventDescription.getPath(
path, // writes value to path.val
size,
retrieved // writes value to retrieved.val
);
Parameters
path
Address of a buffer to receive the path. Specify 0 or NULL to ignore.
size
Size of the path buffer in bytes. Required if path parameter is not NULL.
retrieved
Address of a variable to receive the size of the retrieved path in bytes,
including the terminating null character. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function will return FMOD_ERR_EVENT_NOTFOUND unless string data
for the requested event is loaded (by loading the "Master Bank.strings.bank"
file).
If the retrieved path is too long to fit in the supplied buffer, it will be truncated
and this function will return FMOD_ERR_TRUNCATED. Use the retrieved
parameter to obtain the minimum buffer size required to hold the full path.
JavaScript only :
Note: For the "path" parameter, the maximum string length is 512.
C++ Syntax
FMOD_RESULT Studio::EventDescription::getSampleLoadingState(
FMOD_STUDIO_LOADING_STATE *state
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetSampleLoadingState(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_STUDIO_LOADING_STATE *state
);
C# Syntax
RESULT Studio.EventDescription.getSampleLoadingState(
out LOADING_STATE state
);
JavaScript Syntax
EventDescription.getSampleLoadingState(
state // writes value to state.val
);
Parameters
state
Address of a variable to receive the loading state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Event sample data loading can be triggered by calls to
Studio::EventDescription::loadSampleData, Studio::Bank::loadSampleData or
Studio::EventDescription::createInstance.
C++ Syntax
FMOD_RESULT Studio::EventDescription::getSoundSize(
float *size
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetSoundSize(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
float *size
);
C# Syntax
RESULT Studio.EventDescription.getSoundSize(
out float size
);
JavaScript Syntax
EventDescription.getSoundSize(
size // writes value to size.val
);
Parameters
size
Address of a variable to receive the sound size.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This is the largest Sound Size value out of all of the event's 3D Panners, or zero
if there are no 3D Panners.
C++ Syntax
FMOD_RESULT Studio::EventDescription::getUserData(
void **userData
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetUserData(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
void **userData
);
C# Syntax
RESULT Studio.EventDescription.getUserData(
out IntPtr userdata
);
JavaScript Syntax
EventDescription.getUserData(
userdata // writes value to userdata.val
);
Parameters
userData
Address of a variable to receive the user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventDescription::setUserData
C++ Syntax
FMOD_RESULT Studio::EventDescription::getUserProperty(
const char *name,
FMOD_STUDIO_USER_PROPERTY *property
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetUserProperty(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
const char *name,
FMOD_STUDIO_USER_PROPERTY *property
);
C# Syntax
RESULT Studio.EventDescription.getUserProperty(
string name,
out USER_PROPERTY property
);
JavaScript Syntax
EventDescription.getUserProperty(
name,
property // writes value to property.val
);
Parameters
name
Name of the user property
property
Address of a variable to receive the user property.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_STUDIO_USER_PROPERTY
Studio::EventDescription::getUserPropertyCount
Studio::EventDescription::getUserPropertyByIndex
C++ Syntax
FMOD_RESULT Studio::EventDescription::getUserPropertyByIndex(
int index,
FMOD_STUDIO_USER_PROPERTY *property
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetUserPropertyByIndex(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
int index,
FMOD_STUDIO_USER_PROPERTY *property
);
C# Syntax
RESULT Studio.EventDescription.getUserPropertyByIndex(
int index,
out USER_PROPERTY property
);
JavaScript Syntax
EventDescription.getUserPropertyByIndex(
index,
property // writes value to property.val
);
Parameters
index
Index of the user property.
property
Address of a variable to receive the user property.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_STUDIO_USER_PROPERTY
Studio::EventDescription::getUserPropertyCount
Studio::EventDescription::getUserProperty
C++ Syntax
FMOD_RESULT Studio::EventDescription::getUserPropertyCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_GetUserPropertyCount(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
int *count
);
C# Syntax
RESULT Studio.EventDescription.getUserPropertyCount(
out int count
);
JavaScript Syntax
EventDescription.getUserPropertyCount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the user property count.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventDescription::getUserPropertyByIndex
Studio::EventDescription::getUserProperty
C++ Syntax
FMOD_RESULT Studio::EventDescription::hasCue(
bool *cue
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_HasCue(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_BOOL *cue
);
C# Syntax
RESULT Studio.EventDescription.hasCue(
out bool cue
);
JavaScript Syntax
EventDescription.hasCue(
cue // writes value to cue.val
);
Parameters
cue
Address of a variable to receive the cue status.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventInstance::triggerCue
C++ Syntax
FMOD_RESULT Studio::EventDescription::is3D(
bool *is3D
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_Is3D(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_BOOL *is3D
);
C# Syntax
RESULT Studio.EventDescription.is3D(
out bool is3D
);
JavaScript Syntax
EventDescription.is3D(
is3D // writes value to is3D.val
);
Parameters
is3D
Address of a variable to receive the 3D status.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
An event is considered 3D if it contains a 3D panner or an automatic parameter
that depends on the event's 3D attributes:
Distance
Event Cone Angle
Event Orientation
Direction
Elevation
An event will also return that it is 3D if it has any nested events that are 3D.
C++ Syntax
FMOD_RESULT Studio::EventDescription::isOneshot(
bool *oneshot
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_IsOneshot(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_BOOL *oneshot
);
C# Syntax
RESULT Studio.EventDescription.isOneshot(
out bool oneshot
);
JavaScript Syntax
EventDescription.isOneshot(
oneshot // writes value to oneshot.val
);
Parameters
oneshot
Address of a variable to receive the oneshot status.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If the event is oneshot then it will naturally terminate and can be used as a fire-
and-forget style oneshot sound by calling Studio::EventInstance::start followed
by Studio::EventInstance::release.
See Also
Studio::EventInstance::start
Studio::EventInstance::release
C++ Syntax
FMOD_RESULT Studio::EventDescription::isSnapshot(
bool *snapshot
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_IsSnapshot(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_BOOL *snapshot
);
C# Syntax
RESULT Studio.EventDescription.isSnapshot(
out bool snapshot
);
JavaScript Syntax
EventDescription.isSnapshot(
snapshot // writes value to snapshot.val
);
Parameters
snapshot
Address of a variable to receive the snapshot status.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Studio implements snapshots as a special kind of event. Use this function to
distinguish a snapshot event from a regular event.
C++ Syntax
FMOD_RESULT Studio::EventDescription::isStream(
bool *isStream
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_IsStream(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_BOOL *isStream
);
C# Syntax
RESULT Studio.EventDescription.isStream(
out bool isStream
);
JavaScript Syntax
EventDescription.isStream(
isStream // writes value to isStream.val
);
Parameters
isStream
Address of a variable to receive the stream status.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::EventDescription::loadSampleData();
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_LoadSampleData(FMOD_STUDIO_EVENTDESCRI
C# Syntax
RESULT Studio.EventDescription.loadSampleData();
JavaScript Syntax
EventDescription.loadSampleData();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You can use this function to preload sample data ahead of time so that events can
be played immediately when required.
Each time this function is called, it will increment the reference count, so the
sample data will not be unloaded until
Studio::EventDescription::unloadSampleData is called the same number of
times.
C++ Syntax
FMOD_RESULT Studio::EventDescription::releaseAllInstances();
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_ReleaseAllInstances(FMOD_STUDIO_EVENTD
C# Syntax
RESULT Studio.EventDescription.releaseAllInstances();
JavaScript Syntax
EventDescription.releaseAllInstances();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function immediately stops and releases all instances of the event.
See Also
Studio::EventInstance::release
C++ Syntax
FMOD_RESULT Studio::EventDescription::setCallback(
FMOD_STUDIO_EVENT_CALLBACK callback,
FMOD_STUDIO_EVENT_CALLBACK_TYPE callbackmask
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_SetCallback(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
FMOD_STUDIO_EVENT_CALLBACK callback,
FMOD_STUDIO_EVENT_CALLBACK_TYPE callbackmask
);
C# Syntax
RESULT Studio.EventDescription.setCallback(
EVENT_CALLBACK callback,
EVENT_CALLBACK_TYPE callbackmask = EVENT_CALLBACK_TYPE.ALL
);
JavaScript Syntax
EventDescription.setCallback(
callback,
callbackmask
);
Parameters
callback
Pointer to a callback function.
callbackmask
A bitfield specifying which callback types are required. Masking out some
callback types can help avoid a flood of irrelevant callbacks being
triggered. Defaults to FMOD_STUDIO_EVENT_CALLBACK_ALL.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Some callbacks can occur asynchronously depending on Studio initialisation
flags. See Studio::EventInstance::setCallback for more information about when
callbacks occur.
Example:
FMOD_RESULT F_CALLBACK MyEventCallback(FMOD_STUDIO_EVENT_CALLBACK_TYPE
C++ Syntax
FMOD_RESULT Studio::EventDescription::setUserData(
void *userData
);
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_SetUserData(
FMOD_STUDIO_EVENTDESCRIPTION *eventdescription,
void *userData
);
C# Syntax
RESULT Studio.EventDescription.setUserData(
IntPtr userdata
);
JavaScript Syntax
EventDescription.setUserData(
userdata
);
Parameters
userData
Address of user data to store within the event description object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
It can be useful if an FMOD callback passes an object of this type as a
parameter, and the user does not know which object it is (e.g. if many objects of
this type exist). Using Studio::EventDescription::getUserData would help in the
identification of the object.
See Also
Studio::EventDescription::getUserData
C++ Syntax
FMOD_RESULT Studio::EventDescription::unloadSampleData();
C Syntax
FMOD_RESULT FMOD_Studio_EventDescription_UnloadSampleData(FMOD_STUDIO_EVENTDESC
C# Syntax
RESULT Studio.EventDescription.unloadSampleData();
JavaScript Syntax
EventDescription.unloadSampleData();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Each time this function is called, it will decrement the reference count. If the
reference count goes to zero, the sample data will be unloaded.
If any instances of this event exist, sample data will not be unloaded until all
instances are released.
See Also
Studio::EventDescription::loadSampleData
Studio::EventDescription::getSampleLoadingState
Studio::Bank::loadSampleData
Studio::Bank::unloadSampleData
C++ Syntax
FMOD_RESULT Studio::EventInstance::get3DAttributes(
FMOD_3D_ATTRIBUTES *attributes
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_Get3DAttributes(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_3D_ATTRIBUTES *attributes
);
C# Syntax
RESULT Studio.EventInstance.get3DAttributes(
out _3D_ATTRIBUTES attributes
);
JavaScript Syntax
EventInstance.get3DAttributes(
attributes // writes value to attributes.val
);
Parameters
attributes
Address of a variable to receive the FMOD_3D_ATTRIBUTES for the
event.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_3D_ATTRIBUTES
Studio::EventInstance::set3DAttributes
C++ Syntax
FMOD_RESULT Studio::EventInstance::getChannelGroup(
FMOD::ChannelGroup **group
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetChannelGroup(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_CHANNELGROUP **group
);
C# Syntax
RESULT Studio.EventInstance.getChannelGroup(
out FMOD.ChannelGroup group
);
JavaScript Syntax
EventInstance.getChannelGroup(
group // writes value to group.val
);
Parameters
group
Address of a variable to receive the ChannelGroup.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The retrieved ChannelGroup corresponds to the master track of the event
instance.
It is not possible to get the ChannelGroup until the event instance has finished
being created. When Studio has been initialized in asynchronous mode, this
function will return FMOD_ERR_STUDIO_NOT_LOADED until the
Studio::EventDescription::createInstance command has been executed in the
async thread. When Studio has been initialized with
FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE, the ChannelGroup will
be available after the next Studio::System::update call.
Also note that the when the event instance is destroyed, the underlying
ChannelGroup will become invalid. To make sure the ChannelGroup is remains
valid, you can do one of the following:
C++ Syntax
FMOD_RESULT Studio::EventInstance::getDescription(
Studio::EventDescription **description
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetDescription(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_STUDIO_EVENTDESCRIPTION **description
);
C# Syntax
RESULT Studio.EventInstance.getDescription(
out EventDescription description
);
JavaScript Syntax
EventInstance.getDescription(
description // writes value to description.val
);
Parameters
description
Address of a variable to receive the EventDescription object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::EventInstance::getListenerMask(
unsigned int *mask
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetListenerMask(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
unsigned int *mask
);
C# Syntax
RESULT Studio.EventInstance.getListenerMask(
out uint mask
);
JavaScript Syntax
EventInstance.getListenerMask(
mask // writes value to mask.val
);
Parameters
mask
Address of a variable to receive the mask.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventInstance::setListenerMask
Studio::System::setNumListeners
C++ Syntax
FMOD_RESULT Studio::EventInstance::getParameter(
const char *name,
Studio::ParameterInstance **parameter
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetParameter(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
const char *name,
FMOD_STUDIO_PARAMETERINSTANCE **parameter
);
C# Syntax
RESULT Studio.EventInstance.getParameter(
string name,
out ParameterInstance instance
);
JavaScript Syntax
EventInstance.getParameter(
name,
parameter // writes value to parameter.val
);
Parameters
name
Name of the parameter (case-insensitive).
parameter
Address of a variable to receive the ParameterInstance object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE: This function is deprecated. It will be removed in a future version.
Please get and set parameter values using
Studio::EventInstance::getParameterValue,
Studio::EventInstance::setParameterValue,
Studio::EventInstance::getParameterValueByIndex, and
Studio::EventInstance::setParameterValueByIndex.
See Also
Studio::ParameterInstance::setValue
Studio::EventInstance::getParameterValue
Studio::EventInstance::setParameterValue
Studio::EventInstance::getParameterValueByIndex
Studio::EventInstance::setParameterValueByIndex
C++ Syntax
FMOD_RESULT Studio::EventInstance::getParameterByIndex(
int index,
Studio::ParameterInstance **parameter
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetParameterByIndex(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int index,
FMOD_STUDIO_PARAMETERINSTANCE **parameter
);
C# Syntax
RESULT Studio.EventInstance.getParameterByIndex(
int index,
out ParameterInstance instance
);
JavaScript Syntax
EventInstance.getParameterByIndex(
index,
parameter // writes value to parameter.val
);
Parameters
index
Index of the parameter.
parameter
Address of a variable to receive the ParameterInstance object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function can be used in combination with
Studio::EventInstance::getParameterCount to enumerate all parameter instances
within an event instance.
NOTE: The order of parameters is not necessarily the same as what is shown in
the FMOD Studio event window.
C++ Syntax
FMOD_RESULT Studio::EventInstance::getParameterCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetParameterCount(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int *count
);
C# Syntax
RESULT Studio.EventInstance.getParameterCount(
out int count
);
JavaScript Syntax
EventInstance.getParameterCount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the parameter count.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventInstance::getParameterByIndex
Studio::EventInstance::setParameterByIndex
C++ Syntax
FMOD_RESULT Studio::EventInstance::getParameterValue(
const char *name,
float *value,
float *finalvalue
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetParameterValue(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
const char *name,
float *value,
float *finalvalue
);
C# Syntax
RESULT Studio.EventInstance.getParameterValue(
string name,
out float value,
out float finalvalue
);
JavaScript Syntax
EventInstance.getParameterValue(
name,
value, // writes value to value.val
finalvalue // writes value to finalvalue.val
);
Parameters
name
Name of the parameter (case-insensitive).
value
Address of a variable to receive the value as set from the public API.
Specify 0 or NULL to ignore.
finalvalue
Address of a variable to receive the final combined value. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function finds the parameter by name and then gets the value. This function
can return both the user side value set from the last call to
Studio::EventInstance::setParameterValue, as well as the final combined value
which may be the result of automation, modulation, and smoothing. Automatic
parameters always return the user value as 0, since they can never be set from
the public API.
NOTE: The final value will not change immediately. It will change during
subsequent asynchronous updates.
See Also
Studio::EventInstance::getParameterValue
Studio::EventInstance::setParameterValue
Studio::EventInstance::getParameterValueByIndex
C++ Syntax
FMOD_RESULT Studio::EventInstance::getParameterValueByIndex(
int index,
float *value,
float *finalvalue
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetParameterValueByIndex(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int index,
float *value,
float *finalvalue
);
C# Syntax
RESULT Studio.EventInstance.getParameterValueByIndex(
int index,
out float value,
out float finalvalue
);
JavaScript Syntax
EventInstance.getParameterValueByIndex(
index,
value, // writes value to value.val
finalvalue // writes value to finalvalue.val
);
Parameters
index
Index of the parameter.
value
Address of a variable to receive the value as set from the public API.
Specify 0 or NULL to ignore.
finalvalue
Address of a variable to receive the final combined value. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function gets the parameter value for the given index. The parameter index
can be one of the list from Studio::EventInstance::getParameterCount, or it can
found by looking at the index field of
FMOD_STUDIO_PARAMETER_DESCRIPTION after calling
Studio::EventDescription::getParameter.
This function can return both the value set from the last call to
Studio::EventInstance::setParameterValue, as well as the final combined value
which may be the result of automation, modulation, and smoothing. Automatic
parameters always return the user value as 0, since they can never be set from
the public API.
NOTE: The final value will not change immediately. It will change during
subsequent asynchronous updates.
NOTE: The order of parameters is not necessarily the same as what is shown in
the FMOD Studio event window.
See Also
Studio::EventDescription::getParameterCount
Studio::EventDescription::getParameter
Studio::EventInstance::getParameterCount
Studio::EventInstance::getParameterValue
Studio::EventInstance::setParameterValue
Studio::EventInstance::setParameterValueByIndex
C++ Syntax
FMOD_RESULT Studio::EventInstance::getPaused(
bool *paused
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetPaused(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_BOOL *paused
);
C# Syntax
RESULT Studio.EventInstance.getPaused(
out bool paused
);
JavaScript Syntax
EventInstance.getPaused(
paused // writes value to paused.val
);
Parameters
paused
Address of a variable to receive the pause state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventInstance::setPaused
C++ Syntax
FMOD_RESULT Studio::EventInstance::getPitch(
float *pitch,
float *finalpitch
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetPitch(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
float *pitch,
float *finalpitch
);
C# Syntax
RESULT Studio.EventInstance.getPitch(
out float pitch,
out float finalpitch
);
JavaScript Syntax
EventInstance.getPitch(
pitch, // writes value to pitch.val
finalpitch // writes value to finalpitch.val
);
Parameters
pitch
Address of a variable to receive the pitch as set from the public API.
Specify 0 or NULL to ignore.
finalpitch
Address of a variable to receive the final combined pitch. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function can return both the pitch set from the last call to
Studio::EventInstance::setPitch, as well as the final combined pitch which may
be the result of automation and modulation.
NOTE: The final pitch will not change immediately. It will change during
subsequent asynchronous updates.
See Also
Studio::EventInstance::setPitch
C++ Syntax
FMOD_RESULT Studio::EventInstance::getPlaybackState(
FMOD_STUDIO_PLAYBACK_STATE *state
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetPlaybackState(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_STUDIO_PLAYBACK_STATE *state
);
C# Syntax
RESULT Studio.EventInstance.getPlaybackState(
out PLAYBACK_STATE state
);
JavaScript Syntax
EventInstance.getPlaybackState(
state // writes value to state.val
);
Parameters
state
Address of a variable to receive the current playback state of the event
instance. See FMOD_STUDIO_PLAYBACK_STATE.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You can poll this function to track the playback state of an event instance.
C++ Syntax
FMOD_RESULT Studio::EventInstance::getProperty(
FMOD_STUDIO_EVENT_PROPERTY index,
float *value
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetProperty(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_STUDIO_EVENT_PROPERTY index,
float *value
);
C# Syntax
RESULT Studio.EventInstance.getProperty(
EVENT_PROPERTY index,
out float value
);
JavaScript Syntax
EventInstance.getProperty(
index,
value // writes value to value.val
);
Parameters
index
The index of the property to retrieve.
value
Address of a variable to receive the property value.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_STUDIO_EVENT_PROPERTY
Studio::EventInstance::setProperty
C++ Syntax
FMOD_RESULT Studio::EventInstance::getReverbLevel(
int index,
float *level
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetReverbLevel(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int index,
float *level
);
C# Syntax
RESULT Studio.EventInstance.getReverbLevel(
int index,
out float level
);
JavaScript Syntax
EventInstance.getReverbLevel(
index,
level // writes value to level.val
);
Parameters
index
Index of the Low Level reverb instance to target, from 0 to 3.
level
Address of a variable to receive the send level for the signal to the reverb,
from 0 (none) to 1 (full).
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function gets the level of signal sent from the event instance to a Low Level
reverb instance.
C++ Syntax
FMOD_RESULT Studio::EventInstance::getTimelinePosition(
int *position
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetTimelinePosition(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int *position
);
C# Syntax
RESULT Studio.EventInstance.getTimelinePosition(
out int position
);
JavaScript Syntax
EventInstance.getTimelinePosition(
position // writes value to position.val
);
Parameters
position
Address of a variable to receive the timeline position in milliseconds.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::EventInstance::getUserData(
void **userData
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetUserData(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
void **userData
);
C# Syntax
RESULT Studio.EventInstance.getUserData(
out IntPtr userdata
);
JavaScript Syntax
EventInstance.getUserData(
userdata // writes value to userdata.val
);
Parameters
userData
Address of a variable to receive the user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventInstance::setUserData
C++ Syntax
FMOD_RESULT Studio::EventInstance::getVolume(
float *volume,
float *finalvolume
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_GetVolume(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
float *volume,
float *finalvolume
);
C# Syntax
RESULT Studio.EventInstance.getVolume(
out float volume,
out float finalvolume
);
JavaScript Syntax
EventInstance.getVolume(
volume, // writes value to volume.val
finalvolume // writes value to finalvolume.val
);
Parameters
volume
Address of a variable to receive the volume as set from the public API.
Specify 0 or NULL to ignore.
finalvolume
Address of a variable to receive the final combined volume. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function can return both the volume set from the last call to
Studio::EventInstance::setVolume, as well as the final combined volume which
may be the result of automation and modulation.
NOTE: The final volume will not change immediately. It will change during
subsequent asynchronous updates.
See Also
Studio::EventInstance::setVolume
C++ Syntax
FMOD_RESULT Studio::EventInstance::isVirtual(
bool *virtualState
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_IsVirtual(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_BOOL *virtualState
);
C# Syntax
RESULT Studio.EventInstance.isVirtual(
out bool virtualState
);
JavaScript Syntax
EventInstance.isVirtual(
virtualState // writes value to virtualState.val
);
Parameters
virtualState
Address of a variable to receive the virtualization state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This can be used to check if an event instance has been virtualized due to the
max polyphony being exceeded.
C++ Syntax
FMOD_RESULT Studio::EventInstance::release();
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_Release(FMOD_STUDIO_EVENTINSTANCE *
C# Syntax
RESULT Studio.EventInstance.release();
JavaScript Syntax
EventInstance.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If the instance is already stopped when release is called, it will be destroyed after
the next update.
The handle will remain valid until the event instance stops and is destroyed.
Oneshot events will stop naturally, while looping events need to be stopped
manually (e.g. by a call to Studio::EventInstance::stop).
See Also
Studio::EventInstance::stop
C++ Syntax
FMOD_RESULT Studio::EventInstance::set3DAttributes(
FMOD_3D_ATTRIBUTES *attributes
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_Set3DAttributes(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_3D_ATTRIBUTES *attributes
);
C# Syntax
RESULT Studio.EventInstance.set3DAttributes(
_3D_ATTRIBUTES attributes
);
JavaScript Syntax
EventInstance.set3DAttributes(
attributes
);
Parameters
attributes
The 3D attributes to set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is used to position the event inside the 3D game world. This will
update the 3D panner and any automatic Distance or Angle parameters.
See Also
FMOD_3D_ATTRIBUTES
Studio::EventInstance::get3DAttributes
Studio::EventDescription::is3D
C++ Syntax
FMOD_RESULT Studio::EventInstance::setCallback(
FMOD_STUDIO_EVENT_CALLBACK callback,
FMOD_STUDIO_EVENT_CALLBACK_TYPE callbackmask
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetCallback(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_STUDIO_EVENT_CALLBACK callback,
FMOD_STUDIO_EVENT_CALLBACK_TYPE callbackmask
);
C# Syntax
RESULT Studio.EventInstance.setCallback(
EVENT_CALLBACK callback,
EVENT_CALLBACK_TYPE callbackmask = EVENT_CALLBACK_TYPE.ALL
);
JavaScript Syntax
EventInstance.setCallback(
callback,
callbackmask
);
Parameters
callback
Pointer to a callback function.
callbackmask
A bitfield specifying which callback types are required. Masking out some
callback types can help avoid a flood of irrelevant callbacks being
triggered. Defaults to FMOD_STUDIO_EVENT_CALLBACK_ALL.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When Studio has been initialized in asynchronous mode, callbacks will be fired
from the Studio asynchronous thread.
Example:
FMOD_RESULT F_CALLBACK MyEventCallback(FMOD_STUDIO_EVENT_CALLBACK_TYPE
C++ Syntax
FMOD_RESULT Studio::EventInstance::setListenerMask(
unsigned int mask
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetListenerMask(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
unsigned int mask
);
C# Syntax
RESULT Studio.EventInstance.setListenerMask(
uint mask
);
JavaScript Syntax
EventInstance.setListenerMask(
mask
);
Parameters
mask
Mask of listeners that apply to this event instance.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The default mask is 0xffffffff, which is for all listeners to be enabled.
NOTE: It is an error to set a mask that does not include at least one active
listener.
See Also
Studio::EventInstance::getListenerMask
Studio::System::setNumListeners
C++ Syntax
FMOD_RESULT Studio::EventInstance::setParameterValue(
const char *name,
float value
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetParameterValue(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
const char *name,
float value
);
C# Syntax
RESULT Studio.EventInstance.setParameterValue(
string name,
float value
);
JavaScript Syntax
EventInstance.setParameterValue(
name,
value
);
Parameters
name
Name of the parameter (case-insensitive).
value
Value to set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function finds the parameter by name and then sets the value.
C++ Syntax
FMOD_RESULT Studio::EventInstance::setParameterValueByIndex(
int index,
float value
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetParameterValueByIndex(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int index,
float value
);
C# Syntax
RESULT Studio.EventInstance.setParameterValueByIndex(
int index,
float value
);
JavaScript Syntax
EventInstance.setParameterValueByIndex(
index,
value
);
Parameters
index
Index of the parameter.
value
Value to set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function sets the parameter value for the given index. The parameter index
can be one of the list from Studio::EventInstance::getParameterCount, or it can
found by looking at the index field of
FMOD_STUDIO_PARAMETER_DESCRIPTION after calling
Studio::EventDescription::getParameter.
NOTE: The order of parameters is not necessarily the same as what is shown in
the FMOD Studio event window.
See Also
Studio::EventInstance::getParameterCount
Studio::EventInstance::getParameterValue
Studio::EventInstance::setParameterValue
Studio::EventInstance::getParameterValueByIndex
C++ Syntax
FMOD_RESULT Studio::EventInstance::setParameterValuesByIndices(
int *indices,
float *values,
int count
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetParameterValuesByIndices(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int *indices,
float *values,
int count
);
C# Syntax
RESULT Studio.EventInstance.setParameterValuesByIndices(
int[] indices,
float[] values,
int count
);
Parameters
indices
Indices of the parameters.
values
Values to set.
count
Number of indices and values.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function sets the parameter values for the given indices. Each parameter
index can be one of the list from Studio::EventInstance::getParameterCount, or it
can found by looking at the index field of
FMOD_STUDIO_PARAMETER_DESCRIPTION after calling
Studio::EventDescription::getParameter.
If any index is set to -1 then the index and corresponding value will be ignored.
NOTE: The order of parameters is not necessarily the same as what is shown in
the FMOD Studio event window.
See Also
Studio::EventInstance::getParameterCount
Studio::EventInstance::getParameterValue
Studio::EventInstance::setParameterValue
Studio::EventInstance::setParameterValueByIndex
Studio::EventInstance::getParameterValueByIndex
C++ Syntax
FMOD_RESULT Studio::EventInstance::setPaused(
bool paused
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetPaused(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_BOOL paused
);
C# Syntax
RESULT Studio.EventInstance.setPaused(
bool paused
);
JavaScript Syntax
EventInstance.setPaused(
paused
);
Parameters
paused
The desired pause state. true = pause, false = unpause.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows pausing/unpausing of an event instance.
See Also
Studio::EventInstance::getPaused
C++ Syntax
FMOD_RESULT Studio::EventInstance::setPitch(
float pitch
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetPitch(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
float pitch
);
C# Syntax
RESULT Studio.EventInstance.setPitch(
float pitch
);
JavaScript Syntax
EventInstance.setPitch(
pitch
);
Parameters
pitch
The pitch multiplier. 1 = normal pitch.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This pitch is applied as a multiplier for the event pitch. It does not override the
pitch set in FMOD Studio, nor any internal pitch automation or modulation.
See Also
Studio::EventInstance::getPitch
C++ Syntax
FMOD_RESULT Studio::EventInstance::setProperty(
FMOD_STUDIO_EVENT_PROPERTY index,
float value
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetProperty(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_STUDIO_EVENT_PROPERTY index,
float value
);
C# Syntax
RESULT Studio.EventInstance.setProperty(
EVENT_PROPERTY index,
float value
);
JavaScript Syntax
EventInstance.setProperty(
index,
value
);
Parameters
index
The index of the property to set.
value
The property value to set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_STUDIO_EVENT_PROPERTY
Studio::EventInstance::getProperty
C++ Syntax
FMOD_RESULT Studio::EventInstance::setReverbLevel(
int index,
float level
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetReverbLevel(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int index,
float level
);
C# Syntax
RESULT Studio.EventInstance.setReverbLevel(
int index,
float level
);
JavaScript Syntax
EventInstance.setReverbLevel(
index,
level
);
Parameters
index
Index of the Low Level reverb instance to target, from 0 to 3.
level
Send level for the signal to the reverb, from 0 (none) to 1 (full). Default = 0.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function controls the signal to be sent from the event instance to a Low
Level reverb instance.
C++ Syntax
FMOD_RESULT Studio::EventInstance::setTimelinePosition(
int position
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetTimelinePosition(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
int position
);
C# Syntax
RESULT Studio.EventInstance.setTimelinePosition(
int position
);
JavaScript Syntax
EventInstance.setTimelinePosition(
position
);
Parameters
position
Desired timeline position in milliseconds.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You can use this function to seek the timeline.
C++ Syntax
FMOD_RESULT Studio::EventInstance::setUserData(
void *userData
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetUserData(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
void *userData
);
C# Syntax
RESULT Studio.EventInstance.setUserData(
IntPtr userdata
);
JavaScript Syntax
EventInstance.setUserData(
userdata
);
Parameters
userData
Address of user data to be stored within the event instance object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
It can be useful if an FMOD callback passes an object of this type as a
parameter, and the user does not know which object it is (if many of these types
of objects exist). Using Studio::EventInstance::getUserData would help in the
identification of the object.
See Also
Studio::EventInstance::getUserData
C++ Syntax
FMOD_RESULT Studio::EventInstance::setVolume(
float volume
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_SetVolume(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
float volume
);
C# Syntax
RESULT Studio.EventInstance.setVolume(
float volume
);
JavaScript Syntax
EventInstance.setVolume(
volume
);
Parameters
volume
The volume as a linear gain. 0 = silent, 1 = full volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This volume is applied as a scaling factor for the event volume. It does not
override the volume level set in FMOD Studio, nor any internal volume
automation or modulation.
See Also
Studio::EventInstance::getVolume
C++ Syntax
FMOD_RESULT Studio::EventInstance::start();
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_Start(FMOD_STUDIO_EVENTINSTANCE *
C# Syntax
RESULT Studio.EventInstance.start();
JavaScript Syntax
EventInstance.start();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This will begin replay of the event instance. If the instance was already playing
it will restart the event.
See Also
Studio::EventInstance::stop
C++ Syntax
FMOD_RESULT Studio::EventInstance::stop(
FMOD_STUDIO_STOP_MODE mode
);
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_Stop(
FMOD_STUDIO_EVENTINSTANCE *eventinstance,
FMOD_STUDIO_STOP_MODE mode
);
C# Syntax
RESULT Studio.EventInstance.stop(
STOP_MODE mode
);
JavaScript Syntax
EventInstance.stop(
mode
);
Parameters
mode
The desired stop mode. See FMOD_STUDIO_STOP_MODE.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
FMOD_STUDIO_STOP_MODE
Studio::EventInstance::start
C++ Syntax
FMOD_RESULT Studio::EventInstance::triggerCue();
C Syntax
FMOD_RESULT FMOD_Studio_EventInstance_TriggerCue(FMOD_STUDIO_EVENTINSTANCE *
C# Syntax
RESULT Studio.EventInstance.triggerCue();
JavaScript Syntax
EventInstance.triggerCue();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Triggering cues makes the timeline cursor continue past sustain points. The cue
can be triggered ahead of time; for each time it is triggered, the timeline cursor
will continue past one more sustain point.
C++ Syntax
FMOD_RESULT Studio::ParameterInstance::getDescription(
FMOD_STUDIO_PARAMETER_DESCRIPTION *description
);
C Syntax
FMOD_RESULT FMOD_Studio_ParameterInstance_GetDescription(
FMOD_STUDIO_PARAMETERINSTANCE *parameterinstance,
FMOD_STUDIO_PARAMETER_DESCRIPTION *description
);
C# Syntax
RESULT Studio.ParameterInstance.getDescription(
out PARAMETER_DESCRIPTION description
);
JavaScript Syntax
ParameterInstance.getDescription(
description // writes value to description.val
);
Parameters
description
Address of a variable to receive the parameter description.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE: This class is deprecated. It will be removed in a future version. Please
get and set parameter values using Studio::EventInstance::getParameterValue,
Studio::EventInstance::setParameterValue,
Studio::EventInstance::getParameterValueByIndex, and
Studio::EventInstance::setParameterValueByIndex.
See Also
FMOD_STUDIO_PARAMETER_DESCRIPTION
Studio::EventInstance::getParameterValue
Studio::EventInstance::setParameterValue
Studio::EventInstance::getParameterValueByIndex
Studio::EventInstance::setParameterValueByIndex
C++ Syntax
FMOD_RESULT Studio::ParameterInstance::getValue(
float *value
);
C Syntax
FMOD_RESULT FMOD_Studio_ParameterInstance_GetValue(
FMOD_STUDIO_PARAMETERINSTANCE *parameterinstance,
float *value
);
C# Syntax
RESULT Studio.ParameterInstance.getValue(
out float value
);
JavaScript Syntax
ParameterInstance.getValue(
value // writes value to value.val
);
Parameters
value
Address of a variable to receive the parameter value.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
NOTE: This class is deprecated. It will be removed in a future version. Please
get and set parameter values using Studio::EventInstance::getParameterValue,
Studio::EventInstance::setParameterValue,
Studio::EventInstance::getParameterValueByIndex, and
Studio::EventInstance::setParameterValueByIndex.
See Also
Studio::ParameterInstance::setValue
Studio::EventInstance::getParameterValue
Studio::EventInstance::setParameterValue
Studio::EventInstance::getParameterValueByIndex
Studio::EventInstance::setParameterValueByIndex
C++ Syntax
FMOD_RESULT Studio::ParameterInstance::setValue(
float value
);
C Syntax
FMOD_RESULT FMOD_Studio_ParameterInstance_SetValue(
FMOD_STUDIO_PARAMETERINSTANCE *parameterinstance,
float value
);
C# Syntax
RESULT Studio.ParameterInstance.setValue(
float value
);
JavaScript Syntax
ParameterInstance.setValue(
value
);
Parameters
value
The value to set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Parameters are used to control event playback and link it to game state. The
provided value will be clamped to the parameter's range before it is set.
C++ Syntax
FMOD_RESULT Studio::Bus::getChannelGroup(
FMOD::ChannelGroup **group
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_GetChannelGroup(
FMOD_STUDIO_BUS *bus,
FMOD_CHANNELGROUP **group
);
C# Syntax
RESULT Studio.Bus.getChannelGroup(
out FMOD.ChannelGroup group
);
JavaScript Syntax
Bus.getChannelGroup(
channelgroup // writes value to channelgroup.val
);
Parameters
group
Address of a variable to receive a pointer to the Low Level ChannelGroup.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The ChannelGroup is created and destroyed on demand. This means it only
exists if at least one event instance routes into the bus. If it doesn't exist, this
function will return FMOD_ERR_STUDIO_NOT_LOADED.
C++ Syntax
FMOD_RESULT Studio::Bus::getID(
FMOD_GUID *id
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_GetID(
FMOD_STUDIO_BUS *bus,
FMOD_GUID *id
);
C# Syntax
RESULT Studio.Bus.getID(
out Guid id
);
JavaScript Syntax
Bus.getID(
id // writes value to id.val
);
Parameters
id
Address of a variable to receive the 128-bit GUID.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::Bus::getMute(
bool *mute
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_GetMute(
FMOD_STUDIO_BUS *bus,
FMOD_BOOL *mute
);
C# Syntax
RESULT Studio.Bus.getMute(
out bool mute
);
JavaScript Syntax
Bus.getMute(
mute // writes value to mute.val
);
Parameters
mute
Address of a variable to receive the mute state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::Bus::setMute
C++ Syntax
FMOD_RESULT Studio::Bus::getPath(
char *path,
int size,
int *retrieved
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_GetPath(
FMOD_STUDIO_BUS *bus,
char *path,
int size,
int *retrieved
);
C# Syntax
RESULT Studio.Bus.getPath(
out string path
);
JavaScript Syntax
Bus.getPath(
path, // writes value to path.val
size,
retrieved // writes value to retrieved.val
);
Parameters
path
Address of a buffer to receive the path. Specify 0 or NULL to ignore.
size
Size of the path buffer in bytes. Required if path parameter is not NULL.
retrieved
Address of a variable to receive the size of the retrieved path in bytes,
including the terminating null character. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function will return FMOD_ERR_EVENT_NOTFOUND unless string data
for the requested bus is loaded (by loading the "Master Bank.strings.bank" file).
If the retrieved path is too long to fit in the supplied buffer, it will be truncated
and this function will return FMOD_ERR_TRUNCATED. Use the retrieved
parameter to obtain the minimum buffer size required to hold the full path.
JavaScript only :
Note: For the "path" parameter, the maximum string length is 512.
C++ Syntax
FMOD_RESULT Studio::Bus::getPaused(
bool *paused
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_GetPaused(
FMOD_STUDIO_BUS *bus,
FMOD_BOOL *paused
);
C# Syntax
RESULT Studio.Bus.getPaused(
out bool paused
);
JavaScript Syntax
Bus.getPaused(
paused // writes value to paused.val
);
Parameters
paused
Address of a variable to receive the pause state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::Bus::setPaused
C++ Syntax
FMOD_RESULT Studio::Bus::getVolume(
float *volume,
float *finalvolume
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_GetVolume(
FMOD_STUDIO_BUS *bus,
float *volume,
float *finalvolume
);
C# Syntax
RESULT Studio.Bus.getVolume(
out float volume,
out float finalvolume
);
JavaScript Syntax
Bus.getVolume(
volume, // writes value to volume.val
finalvolume // writes value to finalvolume.val
);
Parameters
volume
Address of a variable to receive the volume as set from the public API.
Specify 0 or NULL to ignore.
finalvolume
Address of a variable to receive the final combined volume. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function can return both the volume set from the last call to
Studio::Bus::setVolume, as well as the final combined volume which may be the
result of automation and modulation.
NOTE: The final volume will not change immediately. It will change during
subsequent asynchronous updates.
See Also
Studio::Bus::setVolume
C++ Syntax
FMOD_RESULT Studio::Bus::lockChannelGroup();
C Syntax
FMOD_RESULT FMOD_Studio_Bus_LockChannelGroup(FMOD_STUDIO_BUS *bus);
C# Syntax
RESULT Studio.Bus.lockChannelGroup();
JavaScript Syntax
Bus.lockChannelGroup();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Normally the ChannelGroup is created and destroyed on demand. This means it
only exists if at least one event instance routes into the bus. This function forces
the ChannelGroup to be created and to persist until
Studio::Bus::unlockChannelGroup is called.
Note that the ChannelGroup may not be available immediately after calling this
function. When Studio has been initialized in asynchronous mode, the
ChannelGroup will not be created until the Studio::Bus::lockChannelGroup
command has been executed in the async thread. When Studio has been
initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE, the
ChannelGroup will be available after the next Studio::System::update call.
C++ Syntax
FMOD_RESULT Studio::Bus::setMute(
bool mute
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_SetMute(
FMOD_STUDIO_BUS *bus,
FMOD_BOOL mute
);
C# Syntax
RESULT Studio.Bus.setMute(
bool mute
);
JavaScript Syntax
Bus.setMute(
mute
);
Parameters
mute
The desired mute state. true = mute, false = unmute.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows muting/unmuting of all audio routed into the bus. If mute is
true, it overrides the mute state of all objects routed into this bus. If mute is false,
objects routed into this bus obey their own mute state.
See Also
Studio::Bus::getMute
C++ Syntax
FMOD_RESULT Studio::Bus::setPaused(
bool paused
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_SetPaused(
FMOD_STUDIO_BUS *bus,
FMOD_BOOL paused
);
C# Syntax
RESULT Studio.Bus.setPaused(
bool paused
);
JavaScript Syntax
Bus.setPaused(
paused
);
Parameters
paused
The desired pause state. true = pause, false = unpause.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows pausing/unpausing of all audio routed into the bus. If
paused is true, it overrides the pause state of all objects routed into this bus. If
paused is false, objects routed into this bus obey their own pause state.
See Also
Studio::Bus::getPaused
C++ Syntax
FMOD_RESULT Studio::Bus::setVolume(
float volume
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_SetVolume(
FMOD_STUDIO_BUS *bus,
float volume
);
C# Syntax
RESULT Studio.Bus.setVolume(
float volume
);
JavaScript Syntax
Bus.setVolume(
volume
);
Parameters
volume
The volume level to set as a linear gain. 0 = silent, 1 = full volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows volume control of all audio routed into the bus. This fader
level is relative to the fader level set in FMOD Studio.
See Also
Studio::Bus::getVolume
C++ Syntax
FMOD_RESULT Studio::Bus::stopAllEvents(
FMOD_STUDIO_STOP_MODE mode
);
C Syntax
FMOD_RESULT FMOD_Studio_Bus_StopAllEvents(
FMOD_STUDIO_BUS *bus,
FMOD_STUDIO_STOP_MODE mode
);
C# Syntax
RESULT Studio.Bus.stopAllEvents(
STOP_MODE mode
);
JavaScript Syntax
Bus.stopAllEvents(
mode
);
Parameters
mode
The desired stop mode. See FMOD_STUDIO_STOP_MODE.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::EventInstance::stop
C++ Syntax
FMOD_RESULT Studio::Bus::unlockChannelGroup();
C Syntax
FMOD_RESULT FMOD_Studio_Bus_UnlockChannelGroup(FMOD_STUDIO_BUS *bus);
C# Syntax
RESULT Studio.Bus.unlockChannelGroup();
JavaScript Syntax
Bus.unlockChannelGroup();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You can force a bus's ChannelGroup to be created by calling
Studio::Bus::lockChannelGroup. This function reverts to the default behavior of
creating and destroying the ChannelGroup on demand, meaning it will only exist
if at least one event instance routes into the bus.
Calling this function will cause the ChannelGroup to be destroyed if there are
currently no event instances routing into the bus.
See Also
Studio::Bus::lockChannelGroup
Studio::Bus::getChannelGroup
C++ Syntax
FMOD_RESULT Studio::VCA::getID(
FMOD_GUID *id
);
C Syntax
FMOD_RESULT FMOD_Studio_VCA_GetID(
FMOD_STUDIO_VCA *vca,
FMOD_GUID *id
);
C# Syntax
RESULT Studio.VCA.getID(
out Guid id
);
JavaScript Syntax
VCA.getID(
id // writes value to id.val
);
Parameters
id
Address of a variable to receive the 128-bit GUID.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::VCA::getPath(
char *path,
int size,
int *retrieved
);
C Syntax
FMOD_RESULT FMOD_Studio_VCA_GetPath(
FMOD_STUDIO_VCA *vca,
char *path,
int size,
int *retrieved
);
C# Syntax
RESULT Studio.VCA.getPath(
out string path
);
JavaScript Syntax
VCA.getPath(
path, // writes value to path.val
size,
retrieved // writes value to retrieved.val
);
Parameters
path
Address of a buffer to receive the path. Specify 0 or NULL to ignore.
size
Size of the path buffer in bytes. Required if path parameter is not NULL.
retrieved
Address of a variable to receive the size of the retrieved path in bytes,
including the terminating null character. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function will return FMOD_ERR_EVENT_NOTFOUND unless string data
for the requested VCA is loaded (by loading the "Master Bank.strings.bank"
file).
If the retrieved path is too long to fit in the supplied buffer, it will be truncated
and this function will return FMOD_ERR_TRUNCATED. Use the retrieved
parameter to obtain the minimum buffer size required to hold the full path.
JavaScript only :
Note: For the "path" parameter, the maximum string length is 512.
C++ Syntax
FMOD_RESULT Studio::VCA::getVolume(
float *volume,
float *finalvolume
);
C Syntax
FMOD_RESULT FMOD_Studio_VCA_GetVolume(
FMOD_STUDIO_VCA *vca,
float *volume,
float *finalvolume
);
C# Syntax
RESULT Studio.VCA.getVolume(
out float volume,
out float finalvolume
);
JavaScript Syntax
VCA.getVolume(
volume, // writes value to volume.val
finalvolume // writes value to finalvolume.val
);
Parameters
volume
Address of a variable to receive the volume as set from the public API.
Specify 0 or NULL to ignore.
finalvolume
Address of a variable to receive the final combined volume. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function can return both the volume set from the last call to
Studio::VCA::setVolume, as well as the final combined volume which may be
the result of automation and modulation.
NOTE: The final volume will not change immediately. It will change during
subsequent asynchronous updates.
See Also
Studio::VCA::setVolume
C++ Syntax
FMOD_RESULT Studio::VCA::setVolume(
float volume
);
C Syntax
FMOD_RESULT FMOD_Studio_VCA_SetVolume(
FMOD_STUDIO_VCA *vca,
float volume
);
C# Syntax
RESULT Studio.VCA.setVolume(
float volume
);
JavaScript Syntax
VCA.setVolume(
volume
);
Parameters
volume
The volume level to set as a linear gain. 0 = silent, 1 = full volume.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows volume control of all audio controlled by the VCA. This
fader level is relative to the fader level set in FMOD Studio.
See Also
Studio::VCA::getVolume
C++ Syntax
FMOD_RESULT Studio::Bank::getBusCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetBusCount(
FMOD_STUDIO_BANK *bank,
int *count
);
C# Syntax
RESULT Studio.Bank.getBusCount(
out int count
);
JavaScript Syntax
Bank.getBusCount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the number of buses.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used in conjunction with Studio::Bank::getBusList to enumerate the buses.
See Also
Studio::Bank::getBusList
C++ Syntax
FMOD_RESULT Studio::Bank::getBusList(
Studio::Bus **array,
int capacity,
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetBusList(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_BUS **array,
int capacity,
int *count
);
C# Syntax
RESULT Studio.Bank.getBusList(
out Bus[] array
);
JavaScript Syntax
Bank.getBusList(
array, // writes value to array.val
capacity,
count // writes value to count.val
);
Parameters
array
An array of memory allocated by the user.
capacity
The capacity of the array passed in as the first parameter
count
Address of a variable to receive the number of buses written to the array
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used in conjunction with Studio::Bank::getBusCount to enumerate the buses.
See Also
Studio::Bank::getBusCount
C++ Syntax
FMOD_RESULT Studio::Bank::getEventCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetEventCount(
FMOD_STUDIO_BANK *bank,
int *count
);
C# Syntax
RESULT Studio.Bank.getEventCount(
out int count
);
JavaScript Syntax
Bank.getEventCount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the number of EventDescriptions.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Can be used in conjunction with Studio::Bank::getEventList to enumerate the
events.
NOTE! This function only counts events that have been added explicitly to the
bank by the sound designer. Events that have been implicitly included via event
instrument references are not counted.
See Also
Studio::Bank::getEventList
C++ Syntax
FMOD_RESULT Studio::Bank::getEventList(
Studio::EventDescription **array,
int capacity,
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetEventList(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_EVENTDESCRIPTION **array,
int capacity,
int *count
);
C# Syntax
RESULT Studio.Bank.getEventList(
out EventDescription[] array
);
JavaScript Syntax
Bank.getEventList(
array, // writes value to array.val
capacity,
count // writes value to count.val
);
Parameters
array
An array of memory allocated by the user.
capacity
The capacity of the array passed in as the first parameter
count
Address of a variable to receive the number of Event Descriptions written
to the array
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Can be used in conjunction with Studio::Bank::getEventCount to enumerate the
events.
NOTE! This function only counts events that have been added explicitly to the
bank by the sound designer. Events that have been implicitly included via event
instrument references are not counted.
See Also
Studio::Bank::getEventCount
C++ Syntax
FMOD_RESULT Studio::Bank::getID(
FMOD_GUID *id
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetID(
FMOD_STUDIO_BANK *bank,
FMOD_GUID *id
);
C# Syntax
RESULT Studio.Bank.getID(
out Guid id
);
JavaScript Syntax
Bank.getID(
id // writes value to id.val
);
Parameters
id
Address of a variable to receive the ID.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::Bank::getLoadingState(
FMOD_STUDIO_LOADING_STATE *state
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetLoadingState(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_LOADING_STATE *state
);
C# Syntax
RESULT Studio.Bank.getLoadingState(
out LOADING_STATE state
);
JavaScript Syntax
Bank.getLoadingState(
state // writes value to state.val
);
Parameters
state
Address of a variable to receive the loading state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function provides a way of tracking banks which can be loaded
asynchronously. Only after a bank has finished loading is it valid to query event
descriptions within the bank.
If the bank has a file error, then the state will be returned as
FMOD_STUDIO_LOADING_STATE_ERROR and the return code from this
function will be the error code of the bank load function.
C++ Syntax
FMOD_RESULT Studio::Bank::getPath(
char *path,
int size,
int *retrieved
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetPath(
FMOD_STUDIO_BANK *bank,
char *path,
int size,
int *retrieved
);
C# Syntax
RESULT Studio.Bank.getPath(
out string path
);
JavaScript Syntax
Bank.getPath(
path, // writes value to path.val
size,
retrieved // writes value to retrieved.val
);
Parameters
path
Address of a buffer to receive the path. Specify 0 or NULL to ignore.
size
Size of the path buffer in bytes. Required if path parameter is not NULL.
retrieved
Address of a variable to receive the size of the retrieved path in bytes,
including the terminating null character. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function will return FMOD_ERR_EVENT_NOTFOUND unless string data
for the requested bank is loaded (by loading the "Master Bank.strings.bank"
file).
The bank path is always of the form 'bank:/name'. It is not the same as the
filename used to load the bank.
If the retrieved path is too long to fit in the supplied buffer, it will be truncated
and this function will return FMOD_ERR_TRUNCATED. Use the retrieved
parameter to obtain the minimum buffer size required to hold the full path.
JavaScript only :
Note: For the "path" parameter, the maximum string length is 512.
C++ Syntax
FMOD_RESULT Studio::Bank::getSampleLoadingState(
FMOD_STUDIO_LOADING_STATE *state
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetSampleLoadingState(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_LOADING_STATE *state
);
C# Syntax
RESULT Studio.Bank.getSampleLoadingState(
out LOADING_STATE state
);
JavaScript Syntax
Bank.getSampleLoadingState(
state // writes value to state.val
);
Parameters
state
Address of a variable to receive the loading state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used for tracking the status of the Studio::Bank::loadSampleData operation.
C++ Syntax
FMOD_RESULT Studio::Bank::getStringCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetStringCount(
FMOD_STUDIO_BANK *bank,
int *count
);
C# Syntax
RESULT Studio.Bank.getStringCount(
out int count
);
JavaScript Syntax
Bank.getStringCount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the number of string table entries.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Can be used in conjunction with Studio::Bank::getStringInfo to directly access
the string table. Only the strings bank will contain string table entries.
See Also
Studio::Bank::getStringInfo
C++ Syntax
FMOD_RESULT Studio::Bank::getStringInfo(
int index,
FMOD_GUID *id,
char *path,
int size,
int *retrieved
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetStringInfo(
FMOD_STUDIO_BANK *bank,
int index,
FMOD_GUID *id,
char *path,
int size,
int *retrieved
);
C# Syntax
RESULT Studio.Bank.getStringInfo(
int index,
out Guid id,
out string path
);
JavaScript Syntax
Bank.getStringInfo(
index,
id, // writes value to id.val
path, // writes value to path.val
size,
retrieved // writes value to retrieved.val
);
Parameters
index
Index of string table entry to retrieve.
id
Address of a variable to receive the ID. Specify 0 or NULL to ignore.
path
Address of a buffer to receive the path. Specify 0 or NULL to ignore.
size
Size of the path buffer in bytes. Required if path parameter is not NULL.
retrieved
Address of a variable to receive the size of the retrieved path in bytes,
including the terminating null character. Optional. Specify 0 or NULL to
ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The string table contains mappings from ID to path and is automatically used by
Studio::System::lookupID and Studio::System::lookupPath. This function can be
called to get the string data directly.
If the retrieved path is too long to fit in the supplied buffer, it will be truncated
and this function will return FMOD_ERR_TRUNCATED. Use the retrieved
parameter to obtain the minimum buffer size required to hold the full path.
JavaScript only :
Note: For the "path" parameter, the maximum string length is 512.
See Also
Studio::Bank::getStringCount
C++ Syntax
FMOD_RESULT Studio::Bank::getUserData(
void **userData
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetUserData(
FMOD_STUDIO_BANK *bank,
void **userData
);
C# Syntax
RESULT Studio.Bank.getUserData(
out IntPtr userdata
);
JavaScript Syntax
Bank.getUserData(
userdata // writes value to userdata.val
);
Parameters
userData
Address of a variable to receive the user data.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::Bank::setUserData
C++ Syntax
FMOD_RESULT Studio::Bank::getVCACount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetVCACount(
FMOD_STUDIO_BANK *bank,
int *count
);
C# Syntax
RESULT Studio.Bank.getVCACount(
out int count
);
JavaScript Syntax
Bank.getVCACount(
count // writes value to count.val
);
Parameters
count
Address of a variable to receive the number of VCAs.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used in conjunction with Studio::Bank::getVCAList to enumerate the VCAs.
See Also
Studio::Bank::getVCAList
C++ Syntax
FMOD_RESULT Studio::Bank::getVCAList(
Studio::VCA **array,
int capacity,
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_GetVCAList(
FMOD_STUDIO_BANK *bank,
FMOD_STUDIO_VCA **array,
int capacity,
int *count
);
C# Syntax
RESULT Studio.Bank.getVCAList(
out VCA[] array
);
JavaScript Syntax
Bank.getVCAList(
array, // writes value to array.val
capacity,
count // writes value to count.val
);
Parameters
array
An array of memory allocated by the user.
capacity
The capacity of the array passed in as the first parameter
count
Address of a variable to receive the number of VCAs written to the array
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Used in conjunction with Studio::Bank::getVCACount to enumerate the VCAs.
See Also
Studio::Bank::getVCACount
C++ Syntax
FMOD_RESULT Studio::Bank::loadSampleData();
C Syntax
FMOD_RESULT FMOD_Studio_Bank_LoadSampleData(FMOD_STUDIO_BANK *bank);
C# Syntax
RESULT Studio.Bank.loadSampleData();
JavaScript Syntax
Bank.loadSampleData();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
You can use this function to preload sample data ahead of time so that events can
be played immediately when required.
Each time this function is called, it will increment the reference count, so the
sample data will not be unloaded until Studio::Bank::unloadSampleData is
called the same number of times.
C++ Syntax
FMOD_RESULT Studio::Bank::setUserData(
void *userData
);
C Syntax
FMOD_RESULT FMOD_Studio_Bank_SetUserData(
FMOD_STUDIO_BANK *bank,
void *userData
);
C# Syntax
RESULT Studio.Bank.setUserData(
IntPtr userdata
);
JavaScript Syntax
Bank.setUserData(
userdata
);
Parameters
userData
Address of user data to store within the event description object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
It can be useful if an FMOD callback passes an object of this type as a
parameter, and the user does not know which object it is (e.g. if many objects of
this type exist). Using Studio::Bank::getUserData would help in the
identification of the object.
See Also
Studio::Bank::getUserData
C++ Syntax
FMOD_RESULT Studio::Bank::unload();
C Syntax
FMOD_RESULT FMOD_Studio_Bank_Unload(FMOD_STUDIO_BANK *bank);
C# Syntax
RESULT Studio.Bank.unload();
JavaScript Syntax
Bank.unload();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This will destroy all objects created from the bank, unload all sample data inside
the bank, and invalidate all API handles referring to the bank.
See Also
Studio::System::loadBankFile
Studio::System::loadBankMemory
Studio::System::loadBankCustom
C++ Syntax
FMOD_RESULT Studio::Bank::unloadSampleData();
C Syntax
FMOD_RESULT FMOD_Studio_Bank_UnloadSampleData(FMOD_STUDIO_BANK *bank
C# Syntax
RESULT Studio.Bank.unloadSampleData();
JavaScript Syntax
Bank.unloadSampleData();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
Each time this function is called, it will decrement the reference count. If the
reference count goes to zero, the sample data will be unloaded.
Any sample data that is being used by event instances will not be unloaded until
the event instances are released.
See Also
Studio::Bank::loadSampleData
Studio::Bank::getSampleLoadingState
Studio::EventDescription::loadSampleData
Studio::EventDescription::unloadSampleData
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getCommandAtTime(
float time,
int *commandIndex
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetCommandAtTime(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
float time,
int *commandIndex
);
C# Syntax
RESULT Studio.CommandReplay.getCommandAtTime(
float time,
out int commandIndex
);
JavaScript Syntax
CommandReplay.getCommandAtTime(
time,
commandindex // writes value to commandindex.val
);
Parameters
time
The time used to find a command index.
commandIndex
Address of the variable to receive the command index.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The time passed in must be less than or equal to the total playback time of the
replay. It will return an index for the first command which has an equal or
greater time.
See Also
Studio::CommandReplay::getCommandCount
Studio::CommandReplay::getCommandString
Studio::CommandReplay::getCommandInfo
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getCommandCount(
int *count
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetCommandCount(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
int *count
);
C# Syntax
RESULT Studio.CommandReplay.getCommandCount(
out int count
);
JavaScript Syntax
CommandReplay.getCommandCount(
count // writes value to count.val
);
Parameters
count
Address of the variable to receive the count.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::CommandReplay::getCommandInfo
Studio::CommandReplay::getCommandString
Studio::CommandReplay::getCommandAtTime
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getCommandInfo(
int commandIndex,
FMOD_STUDIO_COMMAND_INFO *info
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetCommandInfo(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
int commandIndex,
FMOD_STUDIO_COMMAND_INFO *info
);
C# Syntax
RESULT Studio.CommandReplay.getCommandInfo(
int commandIndex,
out COMMAND_INFO info
);
JavaScript Syntax
CommandReplay.getCommandInfo(
commandindex,
info // writes value to info.val
);
Parameters
commandIndex
The index of the command.
info
Address of the variable to receive command info structure.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::CommandReplay::getCommandCount
Studio::CommandReplay::getCommandString
Studio::CommandReplay::getCommandAtTime
FMOD_STUDIO_COMMAND_INFO
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getCommandString(
int commandIndex,
char *buffer,
int length
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetCommandString(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
int commandIndex,
char *buffer,
int length
);
C# Syntax
RESULT Studio.CommandReplay.getCommandString(
int commandIndex,
out string description
);
JavaScript Syntax
CommandReplay.getCommandString(
commandindex,
buffer // writes value to buffer.val
);
Parameters
commandIndex
The index of the command.
buffer
Address of the variable to receive the string.
length
The capacity of the buffer.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
If the retrieved path is too long to fit in the supplied buffer, it will be truncated
and this function will return FMOD_ERR_TRUNCATED.
JavaScript only :
Note: For the "buffer" parameter, the maximum string length is 512.
See Also
Studio::CommandReplay::getCommandCount
Studio::CommandReplay::getCommandInfo
Studio::CommandReplay::getCommandAtTime
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getCurrentCommand(
int *commandIndex,
float *currentTime
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetCurrentCommand(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
int *commandIndex,
float *currentTime
);
C# Syntax
RESULT Studio.CommandReplay.getCurrentCommand(
out int commandIndex,
out float currentTime
);
JavaScript Syntax
CommandReplay.getCurrentCommand(
commandindex, // writes value to commandindex.val
currenttime // writes value to currenttime.val
);
Parameters
commandIndex
The address of the variable to hold the current command index. Specify 0 or
NULL to ignore.
currentTime
The address of the variable to hold the current playback time. Specify 0 or
NULL to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function returns the current command index the playback is up to, and the
current playback time.
See Also
Studio::CommandReplay::start
Studio::CommandReplay::stop
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getLength(
float *totalTime
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetLength(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
float *totalTime
);
C# Syntax
RESULT Studio.CommandReplay.getLength(
out float totalTime
);
JavaScript Syntax
CommandReplay.getLength(
length // writes value to length.val
);
Parameters
totalTime
Address of the variable to receive the total time.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getPaused(
bool *paused
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetPaused(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
FMOD_BOOL *paused
);
C# Syntax
RESULT Studio.CommandReplay.getPaused(
out bool paused
);
JavaScript Syntax
CommandReplay.getPaused(
paused // writes value to paused.val
);
Parameters
paused
Address of the variable to hold the paused state.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::CommandReplay::setPaused
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getPlaybackState(
FMOD_STUDIO_PLAYBACK_STATE *state
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetPlaybackState(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
FMOD_STUDIO_PLAYBACK_STATE *state
);
C# Syntax
RESULT Studio.CommandReplay.getPlaybackState(
out PLAYBACK_STATE state
);
JavaScript Syntax
CommandReplay.getPlaybackState(
state // writes value to state.val
);
Parameters
state
The address of the variable to hold the playback state. Specify 0 or NULL
to ignore.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::CommandReplay::start
Studio::CommandReplay::stop
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getSystem(
Studio::System **system
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetSystem(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
FMOD_STUDIO_SYSTEM **system
);
C# Syntax
RESULT Studio.CommandReplay.getSystem(
out System system
);
JavaScript Syntax
CommandReplay.getSystem(
system // writes value to system.val
);
Parameters
system
Address of the variable to receive the system.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
C++ Syntax
FMOD_RESULT Studio::CommandReplay::getUserData(
void **userdata
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_GetUserData(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
void **userdata
);
C# Syntax
RESULT Studio.CommandReplay.getUserData(
out IntPtr userdata
);
JavaScript Syntax
CommandReplay.getUserData(
userdata // writes value to userdata.val
);
Parameters
userdata
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
See Also
Studio::CommandReplay::setUserData
C++ Syntax
FMOD_RESULT Studio::CommandReplay::release();
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_Release(FMOD_STUDIO_COMMANDREPLAY *
C# Syntax
RESULT Studio.CommandReplay.release();
JavaScript Syntax
CommandReplay.release();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This will free all resources associated with the command replay.
C++ Syntax
FMOD_RESULT Studio::CommandReplay::seekToCommand(
int commandIndex
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SeekToCommand(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
int commandIndex
);
C# Syntax
RESULT Studio.CommandReplay.seekToCommand(
int commandIndex
);
JavaScript Syntax
CommandReplay.seekToCommand(
commandindex
);
Parameters
commandIndex
The command index to seek to.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function sets the seek command to seek to. The replay will start from the
given seek position.
See Also
Studio::CommandReplay::getCommandCount
Studio::CommandReplay::getCommandAtTime
Studio::CommandReplay::seekToTime
C++ Syntax
FMOD_RESULT Studio::CommandReplay::seekToTime(
float time
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SeekToTime(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
float time
);
C# Syntax
RESULT Studio.CommandReplay.seekToTime(
float time
);
JavaScript Syntax
CommandReplay.seekToTime(
time
);
Parameters
time
The time to seek to.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function sets the seek command to seek to by looking up the given time.
See Also
Studio::CommandReplay::seekToCommand
C++ Syntax
FMOD_RESULT Studio::CommandReplay::setBankPath(
const char *bankPath
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SetBankPath(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
const char *bankPath
);
C# Syntax
RESULT Studio.CommandReplay.setBankPath(
string bankPath
);
JavaScript Syntax
CommandReplay.setBankPath(
bankPath
);
Parameters
bankPath
The path to use when loading banks.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function allows a replay to be redirected to load banks for a given directory,
instead of the original one recorded as part of the replay file. It will only affect
the Studio::System::loadBankFile command in the replay.
See Also
Studio::CommandReplay::setLoadBankCallback
C++ Syntax
FMOD_RESULT Studio::CommandReplay::setCreateInstanceCallback(
FMOD_STUDIO_COMMANDREPLAY_CREATE_INSTANCE_CALLBACK callback
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SetCreateInstanceCallback(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
FMOD_STUDIO_COMMANDREPLAY_CREATE_INSTANCE_CALLBACK callback
);
C# Syntax
RESULT Studio.CommandReplay.setCreateInstanceCallback(
COMMANDREPLAY_CREATE_INSTANCE_CALLBACK callback
);
JavaScript Syntax
CommandReplay.setCreateInstanceCallback(
callback
);
Parameters
callback
The callback to use.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The create instance bank callback is invoked whenever a
Studio::EventDescription::createInstance command is reached.
If this callback is not set the event instance is created automatically. If the
callback is set, it is up to the callback to either create a new instance or return
without creating anything. If the instance is not created, then subsequent event
instance calls will be ignored in the replay.
The callback contains the original handle that was created when the replay was
recorded. This will not correspond to any valid object, but it can be used as a
way of identifying different instances in the replay.
See Also
FMOD_STUDIO_COMMANDREPLAY_CREATE_INSTANCE_CALLBACK
C++ Syntax
FMOD_RESULT Studio::CommandReplay::setFrameCallback(
FMOD_STUDIO_COMMANDREPLAY_FRAME_CALLBACK callback
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SetFrameCallback(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
FMOD_STUDIO_COMMANDREPLAY_FRAME_CALLBACK callback
);
C# Syntax
RESULT Studio.CommandReplay.setFrameCallback(
COMMANDREPLAY_FRAME_CALLBACK callback
);
JavaScript Syntax
CommandReplay.setFrameCallback(
callback
);
Parameters
callback
The callback to use.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The frame callback is called whenever a new frame of the replay is reached.
Each frame command will advance the time of the replay.
See Also
FMOD_STUDIO_COMMANDREPLAY_FRAME_CALLBACK
C++ Syntax
FMOD_RESULT Studio::CommandReplay::setLoadBankCallback(
FMOD_STUDIO_COMMANDREPLAY_LOAD_BANK_CALLBACK callback
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SetLoadBankCallback(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
FMOD_STUDIO_COMMANDREPLAY_LOAD_BANK_CALLBACK callback
);
C# Syntax
RESULT Studio.CommandReplay.setLoadBankCallback(
COMMANDREPLAY_LOAD_BANK_CALLBACK callback
);
JavaScript Syntax
CommandReplay.setLoadBankCallback(
callback
);
Parameters
callback
The callback to use.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
The load bank callback is invoked whenever any of the Studio load bank
functions are reached. For Studio::System::loadBankFile, the callback will have
the filename used in the replay file, modified by any path set in
Studio::CommandReplay::setBankPath. For banks loaded with
Studio::System::loadBankMemory and Studio::System::loadBankCustom, the
path will be NULL but the guid can be used to identify what bank was loaded.
If this callback is not set the bank is loaded automatically. If the callback is set
the bank is not loaded automatically and should be loaded in the callback.
Failing to load the bank in the callback will mean the replay will continue but
some later events may not be found.
See Also
FMOD_STUDIO_COMMANDREPLAY_LOAD_BANK_CALLBACK
C++ Syntax
FMOD_RESULT Studio::CommandReplay::setPaused(
bool paused
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SetPaused(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
FMOD_BOOL paused
);
C# Syntax
RESULT Studio.CommandReplay.setPaused(
bool paused
);
JavaScript Syntax
CommandReplay.setPaused(
paused
);
Parameters
paused
The desired pause state. true = pause, false = unpause.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
When paused the replay will no longer contiune to issue replay commands.
See Also
Studio::CommandReplay::setPaused
C++ Syntax
FMOD_RESULT Studio::CommandReplay::setUserData(
void *userdata
);
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_SetUserData(
FMOD_STUDIO_COMMANDREPLAY *commandreplay,
void *userdata
);
C# Syntax
RESULT Studio.CommandReplay.setUserData(
IntPtr userdata
);
JavaScript Syntax
CommandReplay.setUserData(
userdata
);
Parameters
userdata
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function is primarily used in case the user wishes to 'attach' data to an
FMOD object.
See Also
Studio::CommandReplay::setUserData
C++ Syntax
FMOD_RESULT Studio::CommandReplay::start();
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_Start(FMOD_STUDIO_COMMANDREPLAY *
C# Syntax
RESULT Studio.CommandReplay.start();
JavaScript Syntax
CommandReplay.start();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function starts the replay running. The state of the replay can be called from
Studio::CommandReplay::getPlaybackState.
If the replay is already running then it will restart from the beginning.
C++ Syntax
FMOD_RESULT Studio::CommandReplay::stop();
C Syntax
FMOD_RESULT FMOD_Studio_CommandReplay_Stop(FMOD_STUDIO_COMMANDREPLAY *
C# Syntax
RESULT Studio.CommandReplay.stop();
JavaScript Syntax
CommandReplay.stop();
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This function stops the replay.
C++ Syntax
FMOD_RESULT Studio::parseID(
const char *idString,
FMOD_GUID *id
);
C Syntax
FMOD_RESULT FMOD_Studio_ParseID(
const char *idString,
FMOD_GUID *id
);
C# Syntax
static RESULT Studio.Util.ParseID(
string idString,
out Guid id
);
Parameters
idString
id
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_STUDIO_COMMANDREPLAY_CREATE_INSTANCE_CALLBACK(
FMOD_STUDIO_COMMANDREPLAY *replay,
int commandIndex,
FMOD_STUDIO_EVENTDESCRIPTION *eventDescription,
FMOD_STUDIO_EVENTINSTANCE **instance,
void *userdata
);
Parameters
replay
commandIndex
eventDescription
instance
userdata
The userdata assigned into the given replay, or NULL if not set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
C++ Users. Cast FMOD_STUDIO_COMMANDREPLAY * to
FMOD::Studio::CommandReplay * inside the callback and use as normal.
NOTE! The original handle does not represent a valid object. It should only
used to match against the replay file as a unique identifier.
See Also
Studio::CommandReplay::setCreateInstanceCallback
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_STUDIO_COMMANDREPLAY_FRAME_CALLBACK(
FMOD_STUDIO_COMMANDREPLAY *replay,
int commandIndex,
float currentTime,
void *userdata
);
Parameters
replay
commandIndex
currentTime
userdata
The userdata assigned into the given replay, or NULL if not set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
C++ Users. Cast FMOD_STUDIO_COMMANDREPLAY * to
FMOD::Studio::CommandReplay * inside the callback and use as normal.
The command replay file is batched into frames, where each frame will be
executed only after the appropriate time as passed. Each time a frame is passed
this callback will be invoked.
See Also
Studio::CommandReplay::setFrameCallback
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_STUDIO_COMMANDREPLAY_LOAD_BANK_CALLBACK(
FMOD_STUDIO_COMMANDREPLAY *replay,
int commandIndex,
const FMOD_GUID *bankGuid,
const char *bankFilename,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
FMOD_STUDIO_BANK **bank,
void *userdata
);
Parameters
replay
commandIndex
bankGuid
The guid of the bank that needs to be loaded. May be all zero if not known.
bankFilename
The filename of the bank that needs to be loaded. May be NULL if not known.
flags
bank
userdata
The userdata assigned into the given replay, or NULL if not set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
C++ Users. Cast FMOD_STUDIO_COMMANDREPLAY * to
FMOD::Studio::CommandReplay * inside the callback and use as normal.
This callback can be used to load banks when playing a command replay.
See Also
Studio::CommandReplay::setLoadBankCallback
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_STUDIO_EVENT_CALLBACK(
FMOD_STUDIO_EVENT_CALLBACK_TYPE type,
FMOD_STUDIO_EVENTINSTANCE *event,
void *parameters
);
Parameters
type
event
The event instance that has changed state. Can be cast to Studio::EventInstance*
type.
parameters
The callback parameters. The data passed varies based on the callback type.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
This callback is used for tracking replay state and providing programmer sounds.
The data passed to the callback function in the parameters argument varies
based on the callback type. See FMOD_STUDIO_EVENT_CALLBACK_TYPE
for more information.
Example:
FMOD_RESULT F_CALLBACK MyCallback(FMOD_STUDIO_EVENT_CALLBACK_TYPE type, FMOD_ST
{
Studio::EventInstance *instance = (Studio::EventInstance *)event;
if (type == FMOD_STUDIO_EVENT_CALLBACK_STOPPED)
{
// Handle event instance stop here
}
else if (type == FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
{
FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES* properties = (FMOD_STUDIO_PROG
return FMOD_OK;
}
See Also
Studio::EventInstance::setCallback
Studio::EventDescription::setCallback
Studio::System::getSoundInfo
FMOD_STUDIO_EVENT_CALLBACK_TYPE
FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_STUDIO_SYSTEM_CALLBACK(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE type,
void *commanddata,
void *userdata
);
Parameters
system
type
commanddata
The callback type specific data generated by the callback. See remarks for
meaning.
userdata
The userdata assigned into the given system, or NULL if not set.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the
FMOD_RESULT enumeration.
Remarks
C++ Users. Cast FMOD_STUDIO_SYSTEM * to FMOD::Studio::System * inside the
callback and use as normal.
'commanddata' is not currently used for any callback type. It is included for
future compatibility.
See Also
Studio::System::setCallback
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE
C/C++ Syntax
typedef struct {
int cbsize;
unsigned int commandqueuesize;
unsigned int handleinitialsize;
int studioupdateperiod;
int idlesampledatapoolsize;
} FMOD_STUDIO_ADVANCEDSETTINGS;
JavaScript Syntax
struct FMOD_STUDIO_ADVANCEDSETTINGS
{
commandqueuesize,
handleinitialsize,
studioupdateperiod,
idlesampledatapoolsize,
};
Members
cbsize
commandqueuesize
[r/w] Optional. Specify 0 to ignore. Specify the command queue size for studio
async processing. Default 32kB.
handleinitialsize
[r/w] Optional. Specify 0 to ignore. Specify the initial size to allocate for
handles. Memory for handles will grow as needed in pages. Default 8192 *
sizeof(void*)
studioupdateperiod
[r/w] Optional. Specify 0 to ignore. Specify the update period of Studio when in
async mode, in milliseconds. Will be quantised to the nearest multiple of mixer
duration. Default is 20ms.
idlesampledatapoolsize
[r/w] Optional. Specify 0 to ignore. Specify the amount of sample data to keep in
memory when no longer used, to avoid repeated disk IO. Use -1 to disable.
Default is 256kB.
Remarks
Members marked with [r] mean the variable is modified by FMOD and is for
reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set
the value.
Members marked with [r/w] are either read or write depending on if you are
using System::setAdvancedSettings (w) or System::getAdvancedSettings (r).
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_ADVANCEDSETTINGS()", no 'new' keyword is required.
See Also
Studio::System::setAdvancedSettings
Studio::System::getAdvancedSettings
FMOD_MODE
C/C++ Syntax
typedef struct {
int size;
void *userdata;
int userdatalength;
FMOD_FILE_OPEN_CALLBACK opencallback;
FMOD_FILE_CLOSE_CALLBACK closecallback;
FMOD_FILE_READ_CALLBACK readcallback;
FMOD_FILE_SEEK_CALLBACK seekcallback;
} FMOD_STUDIO_BANK_INFO;
JavaScript Syntax
struct FMOD_STUDIO_BANK_INFO
{
userdata,
userdatalength,
opencallback,
closecallback,
readcallback,
seekcallback,
};
Members
size
userdata
userdatalength
opencallback
closecallback
readcallback
seekcallback
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_BANK_INFO()", no 'new' keyword is required.
See Also
Studio::System::loadBankCustom
C/C++ Syntax
typedef struct {
int currentusage;
int peakusage;
int capacity;
int stallcount;
float stalltime;
} FMOD_STUDIO_BUFFER_INFO;
JavaScript Syntax
struct FMOD_STUDIO_BUFFER_INFO
{
currentusage,
peakusage,
capacity,
stallcount,
stalltime,
};
Members
currentusage
peakusage
capacity
stallcount
stalltime
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_BUFFER_INFO()", no 'new' keyword is required.
See Also
FMOD_STUDIO_BUFFER_USAGE
C/C++ Syntax
typedef struct {
FMOD_STUDIO_BUFFER_INFO studiocommandqueue;
FMOD_STUDIO_BUFFER_INFO studiohandle;
} FMOD_STUDIO_BUFFER_USAGE;
Members
studiocommandqueue
studiohandle
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_BUFFER_USAGE()", no 'new' keyword is required.
See Also
Studio::System::getBufferUsage
Studio::System::resetBufferUsage
FMOD_STUDIO_BUFFER_INFO
C/C++ Syntax
typedef struct {
const char *commandname;
int parentcommandindex;
int framenumber;
float frametime;
FMOD_STUDIO_INSTANCETYPE instancetype;
FMOD_STUDIO_INSTANCETYPE outputtype;
unsigned int instancehandle;
unsigned int outputhandle;
} FMOD_STUDIO_COMMAND_INFO;
JavaScript Syntax
struct FMOD_STUDIO_COMMAND_INFO
{
commandname,
parentcommandindex,
framenumber,
frametime,
instancetype,
outputtype,
instancehandle,
outputhandle,
};
Members
commandname
parentcommandindex
For commands that operate on an instance, this is the command that created the
instance.
framenumber
frametime
instancetype
outputtype
instancehandle
The original handle value of the instance. This will no longer correspond to any
actual object in playback.
outputhandle
The original handle value of the command output. This will no longer
correspond to any actual object in playback.
Remarks
This information has metadata about the command at the given index. Note that
the handle fields are from the recorded session, and will no longer correspond to
any actual object type in the current system.
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_COMMAND_INFO()", no 'new' keyword is required.
See Also
Studio::CommandReplay::getCommandInfo
C/C++ Syntax
typedef struct {
float dspusage;
float streamusage;
float geometryusage;
float updateusage;
float studiousage;
} FMOD_STUDIO_CPU_USAGE;
JavaScript Syntax
struct FMOD_STUDIO_CPU_USAGE
{
dspusage,
streamusage,
geometryusage,
updateusage,
studiousage,
};
Members
dspusage
Returns the % CPU time taken by DSP processing on the low level mixer thread.
streamusage
Returns the % CPU time taken by stream processing on the low level stream
thread.
geometryusage
Returns the % CPU time taken by geometry processing on the low level
geometry thread.
updateusage
Returns the % CPU time taken by low level update, called as part of the studio
update.
studiousage
Returns the % CPU time taken by studio update, called from the studio thread.
Does not include low level update time.
Remarks
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_CPU_USAGE()", no 'new' keyword is required.
See Also
Studio::System::getCPUUsage
C/C++ Syntax
typedef struct {
const char *name;
int index;
float minimum;
float maximum;
float defaultvalue;
FMOD_STUDIO_PARAMETER_TYPE type;
} FMOD_STUDIO_PARAMETER_DESCRIPTION;
JavaScript Syntax
struct FMOD_STUDIO_PARAMETER_DESCRIPTION
{
name,
index,
minimum,
maximum,
defaultvalue,
type,
};
Members
name
index
Index of parameter
minimum
maximum
defaultvalue
Default value
type
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_PARAMETER_DESCRIPTION()", no 'new' keyword is
required.
See Also
Studio::EventDescription::getParameter
FMOD_STUDIO_PARAMETER_TYPE
C/C++ Syntax
typedef struct {
const char *name;
FMOD_DSP *dsp;
} FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES;
JavaScript Syntax
struct FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES
{
name,
};
Members
name
dsp
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_PLUGIN_INSTANCE_PROPERTIES()", no 'new' keyword
is required.
See Also
FMOD_STUDIO_EVENT_CALLBACK
Studio::EventDescription::setCallback
Studio::EventInstance::setCallback
C/C++ Syntax
typedef struct {
const char *name;
FMOD_SOUND *sound;
int subsoundIndex;
} FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES;
JavaScript Syntax
struct FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES
{
name,
sound,
subsoundIndex,
};
Members
name
sound
subsoundIndex
The index of the subsound to use. This should be filled in by the create callback,
or set to -1 if the provided sound should be used directly. Defaults to -1.
Remarks
This data is passed to the event callback function when type is
FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
or
FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_PROGRAMMER_SOUND_PROPERTIES()", no 'new'
keyword is required.
See Also
FMOD_STUDIO_EVENT_CALLBACK
FMOD_STUDIO_SOUND_INFO
Studio::EventDescription::setCallback
Studio::EventInstance::setCallback
Studio::System::getSoundInfo
C/C++ Syntax
typedef struct {
const char *name_or_data;
FMOD_MODE mode;
FMOD_CREATESOUNDEXINFO exinfo;
int subsoundindex;
} FMOD_STUDIO_SOUND_INFO;
JavaScript Syntax
struct FMOD_STUDIO_SOUND_INFO
{
name_or_data,
mode,
subsoundindex,
};
Members
name_or_data
mode
exinfo
subsoundindex
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_SOUND_INFO()", no 'new' keyword is required.
See Also
Studio::System::getSoundInfo
System::createSound
C/C++ Syntax
typedef struct {
int bar;
int beat;
int position;
float tempo;
int timesignatureupper;
int timesignaturelower;
} FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES;
JavaScript Syntax
struct FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES
{
bar,
beat,
position,
tempo,
timesignatureupper,
timesignaturelower,
};
Members
bar
beat
position
tempo
timesignatureupper
timesignaturelower
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_TIMELINE_BEAT_PROPERTIES()", no 'new' keyword is
required.
See Also
FMOD_STUDIO_EVENT_CALLBACK
Studio::EventDescription::setCallback
Studio::EventInstance::setCallback
C/C++ Syntax
typedef struct {
const char *name;
int position;
} FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES;
JavaScript Syntax
struct FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES
{
name,
position,
};
Members
name
position
JavaScript only :
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_TIMELINE_MARKER_PROPERTIES()", no 'new' keyword
is required.
See Also
FMOD_STUDIO_EVENT_CALLBACK
Studio::EventDescription::setCallback
Studio::EventInstance::setCallback
C/C++ Syntax
typedef struct {
const char *name;
FMOD_STUDIO_USER_PROPERTY_TYPE type;
int intvalue;
FMOD_BOOL boolvalue;
float floatvalue;
const char *stringvalue;
} FMOD_STUDIO_USER_PROPERTY;
JavaScript Syntax
struct FMOD_STUDIO_USER_PROPERTY
{
name,
type,
intvalue,
boolvalue,
floatvalue,
stringvalue,
};
Members
name
type
Type of the user property. Use this to select one of the following values.
intvalue
boolvalue
floatvalue
stringvalue
Not all fields are currently supported or may not work as expected at this time.
To initialize an new instance in javascript use
"FMOD.STUDIO_USER_PROPERTY()", no 'new' keyword is required.
See Also
Studio::EventDescription::getUserProperty
C/C++ Syntax
#define FMOD_STUDIO_COMMANDCAPTURE_NORMAL 0x00000000
#define FMOD_STUDIO_COMMANDCAPTURE_FILEFLUSH 0x00000001
#define FMOD_STUDIO_COMMANDCAPTURE_SKIP_INITIAL_STATE 0x00000002
JavaScript Syntax
FMOD.STUDIO_COMMANDCAPTURE_NORMAL
FMOD.STUDIO_COMMANDCAPTURE_FILEFLUSH
FMOD.STUDIO_COMMANDCAPTURE_SKIP_INITIAL_STATE
Values
FMOD_STUDIO_COMMANDCAPTURE_NORMAL
Standard behaviour.
FMOD_STUDIO_COMMANDCAPTURE_FILEFLUSH
FMOD_STUDIO_COMMANDCAPTURE_SKIP_INITIAL_STATE
Normally the initial state of banks and instances is captured, unless this flag is
set.
See Also
Studio::System::startCommandCapture
C/C++ Syntax
#define FMOD_STUDIO_COMMANDREPLAY_NORMAL 0x00000000
#define FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP 0x00000001
#define FMOD_STUDIO_COMMANDREPLAY_FAST_FORWARD 0x00000002
JavaScript Syntax
FMOD.STUDIO_COMMANDREPLAY_NORMAL
FMOD.STUDIO_COMMANDREPLAY_SKIP_CLEANUP
FMOD.STUDIO_COMMANDREPLAY_FAST_FORWARD
Values
FMOD_STUDIO_COMMANDREPLAY_NORMAL
Standard behaviour.
FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP
Normally the playback will release any created resources when it stops, unless
this flag is set.
FMOD_STUDIO_COMMANDREPLAY_FAST_FORWARD
Play back at maximum speed, ignoring the timing of the original replay.
See Also
Studio::System::loadCommandReplay
The data passed to the event callback function in the parameters argument varies
based on the callback type.
The event has commenced playing. Normally this callback will be issued
immediately after FMOD_STUDIO_EVENT_CALLBACK_STARTING,
but may be delayed until sample data has loaded.
FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
is called when:
FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND
is called when:
C/C++ Syntax
#define FMOD_STUDIO_EVENT_CALLBACK_CREATED 0x00000001
#define FMOD_STUDIO_EVENT_CALLBACK_DESTROYED 0x00000002
#define FMOD_STUDIO_EVENT_CALLBACK_STARTING 0x00000004
#define FMOD_STUDIO_EVENT_CALLBACK_STARTED 0x00000008
#define FMOD_STUDIO_EVENT_CALLBACK_RESTARTED 0x00000010
#define FMOD_STUDIO_EVENT_CALLBACK_STOPPED 0x00000020
#define FMOD_STUDIO_EVENT_CALLBACK_START_FAILED 0x00000040
#define FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND 0x00000080
#define FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND 0x00000100
#define FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_CREATED 0x00000200
#define FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED 0x00000400
#define FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER 0x00000800
#define FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT 0x00001000
#define FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED 0x00002000
#define FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED 0x00004000
#define FMOD_STUDIO_EVENT_CALLBACK_ALL 0xFFFFFFFF
JavaScript Syntax
FMOD.STUDIO_EVENT_CALLBACK_CREATED
FMOD.STUDIO_EVENT_CALLBACK_DESTROYED
FMOD.STUDIO_EVENT_CALLBACK_STARTING
FMOD.STUDIO_EVENT_CALLBACK_STARTED
FMOD.STUDIO_EVENT_CALLBACK_RESTARTED
FMOD.STUDIO_EVENT_CALLBACK_STOPPED
FMOD.STUDIO_EVENT_CALLBACK_START_FAILED
FMOD.STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
FMOD.STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND
FMOD.STUDIO_EVENT_CALLBACK_PLUGIN_CREATED
FMOD.STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED
FMOD.STUDIO_EVENT_CALLBACK_TIMELINE_MARKER
FMOD.STUDIO_EVENT_CALLBACK_TIMELINE_BEAT
FMOD.STUDIO_EVENT_CALLBACK_SOUND_PLAYED
FMOD.STUDIO_EVENT_CALLBACK_SOUND_STOPPED
FMOD.STUDIO_EVENT_CALLBACK_ALL
Values
FMOD_STUDIO_EVENT_CALLBACK_CREATED
FMOD_STUDIO_EVENT_CALLBACK_DESTROYED
FMOD_STUDIO_EVENT_CALLBACK_STARTING
FMOD_STUDIO_EVENT_CALLBACK_STARTED
FMOD_STUDIO_EVENT_CALLBACK_RESTARTED
FMOD_STUDIO_EVENT_CALLBACK_STOPPED
FMOD_STUDIO_EVENT_CALLBACK_START_FAILED
Called when an instance did not start, e.g. due to polyphony. Parameters =
unused.
FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND
Called when a programmer sound needs to be destroyed. Parameters =
FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_CREATED
Called when a DSP plugin instance has just been created. Parameters =
FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED
FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER
FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT
FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED
FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED
FMOD_STUDIO_EVENT_CALLBACK_ALL
C/C++ Syntax
#define FMOD_STUDIO_INIT_NORMAL 0x00000000
#define FMOD_STUDIO_INIT_LIVEUPDATE 0x00000001
#define FMOD_STUDIO_INIT_ALLOW_MISSING_PLUGINS 0x00000002
#define FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE 0x00000004
#define FMOD_STUDIO_INIT_DEFERRED_CALLBACKS 0x00000008
#define FMOD_STUDIO_INIT_LOAD_FROM_UPDATE 0x00000010
JavaScript Syntax
FMOD.STUDIO_INIT_NORMAL
FMOD.STUDIO_INIT_LIVEUPDATE
FMOD.STUDIO_INIT_ALLOW_MISSING_PLUGINS
FMOD.STUDIO_INIT_SYNCHRONOUS_UPDATE
FMOD.STUDIO_INIT_DEFERRED_CALLBACKS
FMOD.STUDIO_INIT_LOAD_FROM_UPDATE
Values
FMOD_STUDIO_INIT_NORMAL
Initialize normally.
FMOD_STUDIO_INIT_LIVEUPDATE
FMOD_STUDIO_INIT_ALLOW_MISSING_PLUGINS
Load banks even if they reference plugins that have not been loaded.
FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE
FMOD_STUDIO_INIT_DEFERRED_CALLBACKS
FMOD_STUDIO_INIT_LOAD_FROM_UPDATE
No additional threads are created for bank and resource loading. Loading is
driven from Studio::System::update. Mainly used in non-realtime situations.
See Also
Studio::System::initialize
C/C++ Syntax
#define FMOD_STUDIO_LOAD_BANK_NORMAL 0x00000000
#define FMOD_STUDIO_LOAD_BANK_NONBLOCKING 0x00000001
#define FMOD_STUDIO_LOAD_BANK_DECOMPRESS_SAMPLES 0x00000002
JavaScript Syntax
FMOD.STUDIO_LOAD_BANK_NORMAL
FMOD.STUDIO_LOAD_BANK_NONBLOCKING
FMOD.STUDIO_LOAD_BANK_DECOMPRESS_SAMPLES
Values
FMOD_STUDIO_LOAD_BANK_NORMAL
Standard behaviour.
FMOD_STUDIO_LOAD_BANK_NONBLOCKING
FMOD_STUDIO_LOAD_BANK_DECOMPRESS_SAMPLES
Force samples to decompress into memory when they are loaded, rather than
staying compressed.
See Also
Studio::System::loadBankFile
Studio::System::loadBankMemory
Studio::System::loadBankCustom
C/C++ Syntax
#define FMOD_STUDIO_LOAD_MEMORY_ALIGNMENT 32
JavaScript Syntax
FMOD.STUDIO_LOAD_MEMORY_ALIGNMENT
Values
FMOD_STUDIO_LOAD_MEMORY_ALIGNMENT
See Also
Studio::System::loadBankMemory
FMOD_STUDIO_LOAD_MEMORY_MODE
C/C++ Syntax
#define FMOD_STUDIO_SYSTEM_CALLBACK_PREUPDATE 0x00000001
#define FMOD_STUDIO_SYSTEM_CALLBACK_POSTUPDATE 0x00000002
#define FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD 0x00000004
#define FMOD_STUDIO_SYSTEM_CALLBACK_ALL 0xFFFFFFFF
JavaScript Syntax
FMOD.STUDIO_SYSTEM_CALLBACK_PREUPDATE
FMOD.STUDIO_SYSTEM_CALLBACK_POSTUPDATE
FMOD.STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD
FMOD.STUDIO_SYSTEM_CALLBACK_ALL
Values
FMOD_STUDIO_SYSTEM_CALLBACK_PREUPDATE
Called at the start of the main Studio update. For async mode this will be on its
own thread.
FMOD_STUDIO_SYSTEM_CALLBACK_POSTUPDATE
Called at the end of the main Studio update. For async mode this will be on its
own thread.
FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD
Called when bank has just been unloaded, after all resources are freed.
CommandData will be the bank handle.
FMOD_STUDIO_SYSTEM_CALLBACK_ALL
C/C++ Syntax
typedef enum {
FMOD_STUDIO_EVENT_PROPERTY_CHANNELPRIORITY,
FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY,
FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_LOOKAHEAD,
FMOD_STUDIO_EVENT_PROPERTY_MINIMUM_DISTANCE,
FMOD_STUDIO_EVENT_PROPERTY_MAXIMUM_DISTANCE,
FMOD_STUDIO_EVENT_PROPERTY_MAX
} FMOD_STUDIO_EVENT_PROPERTY;
JavaScript Syntax
FMOD.STUDIO_EVENT_PROPERTY_CHANNELPRIORITY
FMOD.STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY
FMOD.STUDIO_EVENT_PROPERTY_SCHEDULE_LOOKAHEAD
FMOD.STUDIO_EVENT_PROPERTY_MINIMUM_DISTANCE
FMOD.STUDIO_EVENT_PROPERTY_MAXIMUM_DISTANCE
FMOD.STUDIO_EVENT_PROPERTY_MAX
FMOD.STUDIO_EVENT_PROPERTY_FORCEINT
Values
FMOD_STUDIO_EVENT_PROPERTY_CHANNELPRIORITY
Priority to set on low-level channels created by this event instance (-1 to 256).
FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY
FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_LOOKAHEAD
FMOD_STUDIO_EVENT_PROPERTY_MINIMUM_DISTANCE
FMOD_STUDIO_EVENT_PROPERTY_MAXIMUM_DISTANCE
FMOD_STUDIO_EVENT_PROPERTY_MAX
C/C++ Syntax
typedef enum {
FMOD_STUDIO_INSTANCETYPE_NONE,
FMOD_STUDIO_INSTANCETYPE_SYSTEM,
FMOD_STUDIO_INSTANCETYPE_EVENTDESCRIPTION,
FMOD_STUDIO_INSTANCETYPE_EVENTINSTANCE,
FMOD_STUDIO_INSTANCETYPE_PARAMETERINSTANCE,
FMOD_STUDIO_INSTANCETYPE_BUS,
FMOD_STUDIO_INSTANCETYPE_VCA,
FMOD_STUDIO_INSTANCETYPE_BANK,
FMOD_STUDIO_INSTANCETYPE_COMMANDREPLAY
} FMOD_STUDIO_INSTANCETYPE;
JavaScript Syntax
FMOD.STUDIO_INSTANCETYPE_NONE
FMOD.STUDIO_INSTANCETYPE_SYSTEM
FMOD.STUDIO_INSTANCETYPE_EVENTDESCRIPTION
FMOD.STUDIO_INSTANCETYPE_EVENTINSTANCE
FMOD.STUDIO_INSTANCETYPE_PARAMETERINSTANCE
FMOD.STUDIO_INSTANCETYPE_BUS
FMOD.STUDIO_INSTANCETYPE_VCA
FMOD.STUDIO_INSTANCETYPE_BANK
FMOD.STUDIO_INSTANCETYPE_COMMANDREPLAY
FMOD.STUDIO_INSTANCETYPE_FORCEINT
Values
FMOD_STUDIO_INSTANCETYPE_NONE
FMOD_STUDIO_INSTANCETYPE_SYSTEM
FMOD_STUDIO_INSTANCETYPE_EVENTDESCRIPTION
FMOD_STUDIO_INSTANCETYPE_EVENTINSTANCE
FMOD_STUDIO_INSTANCETYPE_PARAMETERINSTANCE
FMOD_STUDIO_INSTANCETYPE_BUS
FMOD_STUDIO_INSTANCETYPE_VCA
FMOD_STUDIO_INSTANCETYPE_BANK
FMOD_STUDIO_INSTANCETYPE_COMMANDREPLAY
C/C++ Syntax
typedef enum {
FMOD_STUDIO_LOADING_STATE_UNLOADING,
FMOD_STUDIO_LOADING_STATE_UNLOADED,
FMOD_STUDIO_LOADING_STATE_LOADING,
FMOD_STUDIO_LOADING_STATE_LOADED,
FMOD_STUDIO_LOADING_STATE_ERROR
} FMOD_STUDIO_LOADING_STATE;
JavaScript Syntax
FMOD.STUDIO_LOADING_STATE_UNLOADING
FMOD.STUDIO_LOADING_STATE_UNLOADED
FMOD.STUDIO_LOADING_STATE_LOADING
FMOD.STUDIO_LOADING_STATE_LOADED
FMOD.STUDIO_LOADING_STATE_ERROR
FMOD.STUDIO_LOADING_STATE_FORCEINT
Values
FMOD_STUDIO_LOADING_STATE_UNLOADING
Currently unloading.
FMOD_STUDIO_LOADING_STATE_UNLOADED
Not loaded.
FMOD_STUDIO_LOADING_STATE_LOADING
Loading in progress.
FMOD_STUDIO_LOADING_STATE_LOADED
FMOD_STUDIO_LOADING_STATE_ERROR
Calling Studio::EventDescription::loadSampleData,
Studio::EventDescription::createInstance or Studio::Bank::loadSampleData may
trigger asynchronous loading of sample data.
See Also
Studio::EventDescription::getSampleLoadingState
Studio::Bank::getLoadingState
Studio::Bank::getSampleLoadingState
C/C++ Syntax
typedef enum {
FMOD_STUDIO_LOAD_MEMORY,
FMOD_STUDIO_LOAD_MEMORY_POINT
} FMOD_STUDIO_LOAD_MEMORY_MODE;
JavaScript Syntax
FMOD.STUDIO_LOAD_MEMORY
FMOD.STUDIO_LOAD_MEMORY_POINT
FMOD.STUDIO_LOAD_MEMORY_FORCEINT
Values
FMOD_STUDIO_LOAD_MEMORY
Duplicates the memory into its own buffers, memory can be freed after
Studio::System::loadBankMemory returns.
FMOD_STUDIO_LOAD_MEMORY_POINT
Copies the memory pointer without duplicating the memory into its own buffers,
memory can be freed after receiving a
FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD callback.
See Also
Studio::System::loadBankMemory
Studio::Bank::unload
C/C++ Syntax
typedef enum {
FMOD_STUDIO_PARAMETER_GAME_CONTROLLED,
FMOD_STUDIO_PARAMETER_AUTOMATIC_DISTANCE,
FMOD_STUDIO_PARAMETER_AUTOMATIC_EVENT_CONE_ANGLE,
FMOD_STUDIO_PARAMETER_AUTOMATIC_EVENT_ORIENTATION,
FMOD_STUDIO_PARAMETER_AUTOMATIC_DIRECTION,
FMOD_STUDIO_PARAMETER_AUTOMATIC_ELEVATION,
FMOD_STUDIO_PARAMETER_AUTOMATIC_LISTENER_ORIENTATION,
FMOD_STUDIO_PARAMETER_MAX
} FMOD_STUDIO_PARAMETER_TYPE;
JavaScript Syntax
FMOD.STUDIO_PARAMETER_GAME_CONTROLLED
FMOD.STUDIO_PARAMETER_AUTOMATIC_DISTANCE
FMOD.STUDIO_PARAMETER_AUTOMATIC_EVENT_CONE_ANGLE
FMOD.STUDIO_PARAMETER_AUTOMATIC_EVENT_ORIENTATION
FMOD.STUDIO_PARAMETER_AUTOMATIC_DIRECTION
FMOD.STUDIO_PARAMETER_AUTOMATIC_ELEVATION
FMOD.STUDIO_PARAMETER_AUTOMATIC_LISTENER_ORIENTATION
FMOD.STUDIO_PARAMETER_MAX
FMOD.STUDIO_PARAMETER_FORCEINT
Values
FMOD_STUDIO_PARAMETER_GAME_CONTROLLED
FMOD_STUDIO_PARAMETER_AUTOMATIC_DISTANCE
FMOD_STUDIO_PARAMETER_AUTOMATIC_EVENT_CONE_ANGLE
Angle between the event's forward vector and the vector pointing from the event
to the listener (0 to 180 degrees).
FMOD_STUDIO_PARAMETER_AUTOMATIC_EVENT_ORIENTATION
Horizontal angle between the event's forward vector and listener's forward
vector (-180 to 180 degrees).
FMOD_STUDIO_PARAMETER_AUTOMATIC_DIRECTION
Horizontal angle between the listener's forward vector and the vector pointing
from the listener to the event (-180 to 180 degrees).
FMOD_STUDIO_PARAMETER_AUTOMATIC_ELEVATION
Angle between the listener's XZ plane and the vector pointing from the listener
to the event (-90 to 90 degrees).
FMOD_STUDIO_PARAMETER_AUTOMATIC_LISTENER_ORIENTATION
Horizontal angle between the listener's forward vector and the global positive Z
axis (-180 to 180 degrees).
FMOD_STUDIO_PARAMETER_MAX
Horizontal angle means the angle between vectors projected onto the listener's
XZ plane (for the EVENT_ORIENTATION and DIRECTION parameters) or the
global XZ plane (for the LISTENER_ORIENTATION parameter).
See Also
FMOD_STUDIO_PARAMETER_DESCRIPTION
Studio::EventInstance::setParameterValue
Studio::EventInstance::set3DAttributes
Studio::System::setListenerAttributes
C/C++ Syntax
typedef enum {
FMOD_STUDIO_PLAYBACK_PLAYING,
FMOD_STUDIO_PLAYBACK_SUSTAINING,
FMOD_STUDIO_PLAYBACK_STOPPED,
FMOD_STUDIO_PLAYBACK_STARTING,
FMOD_STUDIO_PLAYBACK_STOPPING
} FMOD_STUDIO_PLAYBACK_STATE;
JavaScript Syntax
FMOD.STUDIO_PLAYBACK_PLAYING
FMOD.STUDIO_PLAYBACK_SUSTAINING
FMOD.STUDIO_PLAYBACK_STOPPED
FMOD.STUDIO_PLAYBACK_STARTING
FMOD.STUDIO_PLAYBACK_STOPPING
FMOD.STUDIO_PLAYBACK_FORCEINT
Values
FMOD_STUDIO_PLAYBACK_PLAYING
Currently playing.
FMOD_STUDIO_PLAYBACK_SUSTAINING
FMOD_STUDIO_PLAYBACK_STOPPED
Not playing.
FMOD_STUDIO_PLAYBACK_STARTING
Start has been called but the instance is not fully started yet.
FMOD_STUDIO_PLAYBACK_STOPPING
Stop has been called but the instance is not fully stopped yet.
See Also
Studio::EventInstance::getPlaybackState
Studio::EventInstance::start
Studio::EventInstance::stop
FMOD_STUDIO_EVENT_CALLBACK_TYPE
C/C++ Syntax
typedef enum {
FMOD_STUDIO_STOP_ALLOWFADEOUT,
FMOD_STUDIO_STOP_IMMEDIATE
} FMOD_STUDIO_STOP_MODE;
JavaScript Syntax
FMOD.STUDIO_STOP_ALLOWFADEOUT
FMOD.STUDIO_STOP_IMMEDIATE
FMOD.STUDIO_STOP_FORCEINT
Values
FMOD_STUDIO_STOP_ALLOWFADEOUT
Allows AHDSR modulators to complete their release, and DSP effect tails to
play out.
FMOD_STUDIO_STOP_IMMEDIATE
C/C++ Syntax
typedef enum {
FMOD_STUDIO_USER_PROPERTY_TYPE_INTEGER,
FMOD_STUDIO_USER_PROPERTY_TYPE_BOOLEAN,
FMOD_STUDIO_USER_PROPERTY_TYPE_FLOAT,
FMOD_STUDIO_USER_PROPERTY_TYPE_STRING
} FMOD_STUDIO_USER_PROPERTY_TYPE;
JavaScript Syntax
FMOD.STUDIO_USER_PROPERTY_TYPE_INTEGER
FMOD.STUDIO_USER_PROPERTY_TYPE_BOOLEAN
FMOD.STUDIO_USER_PROPERTY_TYPE_FLOAT
FMOD.STUDIO_USER_PROPERTY_TYPE_STRING
FMOD.STUDIO_USER_PROPERTY_TYPE_FORCEINT
Values
FMOD_STUDIO_USER_PROPERTY_TYPE_INTEGER
Integer property
FMOD_STUDIO_USER_PROPERTY_TYPE_BOOLEAN
Boolean property
FMOD_STUDIO_USER_PROPERTY_TYPE_FLOAT
Float property
FMOD_STUDIO_USER_PROPERTY_TYPE_STRING
String property
See Also
FMOD_STUDIO_USER_PROPERTY
FMOD provides a C++ API and also a C API. They are functional identical, and
in fact the C++ and C functions can be mixed interchangeably, with the C++ and
C classes being able to be casted back and forth. The following examples only
show the C++ version.
Initialization
FMOD Studio API Initialization
When using the Studio API, you can create a FMOD Studio System and then
call Studio::System::initialize. That function will also initialize the in-built low
level FMOD system as well. Here is a simple example:
FMOD_RESULT result;
FMOD::Studio::System* system = NULL;
// Initialize FMOD Studio, which will also initialize FMOD Low Level
result = system->initialize(512, FMOD_STUDIO_INIT_NORMAL, FMOD_INIT_NORMAL
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
exit(-1);
}
FMOD Low Level API Initialization (Do not use this if using
FMOD Studio API Initialization)
The FMOD Low Level API can be used without needing to use the FMOD
Studio API at all. Using the Low Level API gives access to the fundamental
abilities of loading and playing sounds, creating DSP effects, setting up FMOD
channel groups, and setting sample-accurate fade points and start/stop times.
However, when just using the Low Level API, it will not be possible to load
Studio banks or load and play Studio events that sound artists have set up in the
Studio tool. To initialize FMOD Low Level directly:
FMOD_RESULT result;
FMOD::System *system = NULL;
Streams
Loading a sound as a streaming, gives the ability to take a large file, and
read/play it in realtime in small chunks at a time, avoiding the need to load the
entire file into memory. This is typically reserved for Music / Voice over /
dialogue or Long ambience tracks. The user can simply play a sound as a
‘stream’ by adding the FMOD_CREATESTREAM flag to the
System::createSound function, or using the System::createStream function. The
2 options equate to the same end behaviour.
Compressed Samples
Because compressed samples are more complicated, they have larger contexts to
deal with (for example vorbis decode information), so there is a constant per
voice overhead (up to a fixed limit) for a playing sound.
This allocation is typically incurred at System::init time if the user calls
System::setAdvancedSettings and sets a maxCodecs value, or it could happen
the first time a sound is loaded with the
FMOD_CREATECOMPRESSEDSAMPLE flag. This will not be configured by
the user so uses the default of 32 codecs for the allocation.
As an example: the vorbis codec has an overhead of 16kb per voice, so the
default of 32 vorbis codecs will consume 512kb of memory. This is adjustable
by the user to reduce or increase the default of 32, using the
System::setAdvancedSettings function as mentioned. The user would adjust the
FMOD_ADVANCEDSETTINGS maxVorbisCodecs value for the vorbis case.
Other supported codecs are adjustable as well.
The best cross platform codec to used as a compressed sample is Vorbis (from an
FSB file) but if it uses too much CPU for your platform (ie mobile), the
FADPCM codec is a good second option. It is less compressed, and uses far less
CPU cycles to decode, while giving good quality and 4:1 compression. For PS4
or Xbox One, it is better to use the AT9 and XMA codec format respectively, as
the decoding of these formats are handled by separate media chips, taking the
load off the CPU.
Update
FMOD should be ticked once per game update. When using FMOD Studio, call
Studio::System::update, which internally will also update the Low Level system.
If using Low Level directly, instead call System::update.
Immediately a sound handle is returned to the user. The status of the sound being
loaded can then be checked with Sound::getOpenState. If a function is called on
a sound that is still loading (besides getOpenState), it will typically return
FMOD_ERR_NOTREADY. Wait until the sound is ready to play it. The state
would be FMOD_OPENSTATE_READY.
To avoid a stall on a streaming sound when trying to free/release it, check that
the state is FMOD_OPENSTATE_READY before calling Sound::release.
Firelight Technologies FMOD Studio API
Play Sound Example
This example shows how to simply load and play multiple sounds, the simplest
usage of FMOD. By default FMOD will decode the entire file into memory
when it loads. If the sounds are big and possibly take up a lot of RAM it would
be better to use the FMOD_CREATESTREAM flag, this will stream the file in
realtime as it plays.
Location
Location
C/C++ Syntax
#define FSBANK_INIT_NORMAL 0x00000000
#define FSBANK_INIT_IGNOREERRORS 0x00000001
#define FSBANK_INIT_WARNINGSASERRORS 0x00000002
#define FSBANK_INIT_CREATEINCLUDEHEADER 0x00000004
#define FSBANK_INIT_DONTLOADCACHEFILES 0x00000008
#define FSBANK_INIT_GENERATEPROGRESSITEMS 0x00000010
Values
FSBANK_INIT_NORMAL
Initialize normally.
FSBANK_INIT_IGNOREERRORS
FSBANK_INIT_WARNINGSASERRORS
FSBANK_INIT_CREATEINCLUDEHEADER
Create C header files with #defines defining indices for each member of the
FSB.
FSBANK_INIT_DONTLOADCACHEFILES
FSBANK_INIT_GENERATEPROGRESSITEMS
Generate status items that can be queried by another thread to monitor the build
progress and give detailed error messages.
See Also
FSBank_Init
C/C++ Syntax
#define FSBANK_BUILD_DEFAULT 0x00000000
#define FSBANK_BUILD_DISABLESYNCPOINTS 0x00000001
#define FSBANK_BUILD_DONTLOOP 0x00000002
#define FSBANK_BUILD_FILTERHIGHFREQ 0x00000004
#define FSBANK_BUILD_DISABLESEEKING 0x00000008
#define FSBANK_BUILD_OPTIMIZESAMPLERATE 0x00000010
#define FSBANK_BUILD_FSB5_DONTWRITENAMES 0x00000080
#define FSBANK_BUILD_NOGUID 0x00000100
#define FSBANK_BUILD_WRITEPEAKVOLUME 0x00000200
#define FSBANK_BUILD_OVERRIDE_MASK (FSBANK_BUILD_DISABLESYNCPOINTS | FSBANK_BUI
#define FSBANK_BUILD_CACHE_VALIDATION_MASK (FSBANK_BUILD_DONTLOOP | FSBANK_BUIL
Values
FSBANK_BUILD_DEFAULT
FSBANK_BUILD_DISABLESYNCPOINTS
FSBANK_BUILD_DONTLOOP
Disable perfect loop encoding and sound stretching. Removes chirps from the
start of oneshot MP2, MP3 and IMAADPCM sounds.
FSBANK_BUILD_FILTERHIGHFREQ
FSBANK_BUILD_DISABLESEEKING
FSBANK_BUILD_OPTIMIZESAMPLERATE
Attempt to optimize the sample rate down. Ignored if format is MP2, MP3 or if
FSB4 basic headers flag is used.
FSBANK_BUILD_FSB5_DONTWRITENAMES
FSB5 format only. Do not write out a names chunk to the FSB to reduce file
size.
FSBANK_BUILD_NOGUID
FSB5 format only. Write out a null GUID for the FSB header. The runtime will
not use header caching for these FSB files.
FSBANK_BUILD_WRITEPEAKVOLUME
FSB5 format only. Write peak volume for all subsounds.
FSBANK_BUILD_OVERRIDE_MASK
Build flag mask that specifies which settings can be overridden per subsound.
FSBANK_BUILD_CACHE_VALIDATION_MASK
Build flag mask that specifies which settings (when changed) invalidate a cache
file.
See Also
FSBank_Init
FSBANK_SUBSOUND
Settings
Voice count: 64
Sample rate: 48KHz
Speaker mode: Stereo
DSP block size: 1024 samples
Test Device
Results
Location
FMOD Studio Runtime library (used in conjunction with low level library)
If you fail to initialize COM, FMOD will perform this on-demand for you
issuing a warning. FMOD will not uninitialize COM in this case so it will be
considered a memory leak.
To ensure correct behavior FMOD assumes when using the WASAPI output
mode (default for Windows Vita and newer) that you call output related
functions from your UI thread. This ensures that any platform specific dialogs
that need to be presented can do so. This recommendation comes from the
IAudioClient interface docs on MSDN which state:
Due to the CPU governor that controls the power saving features of the device,
getting accurate CPU numbers requires rooting the device and setting the CPU
frequency to maximum.
Settings
Voice count: 32
Sample rate: 24KHz
Speaker mode: Stereo
DSP block size: 512 samples
Test Device: A
Results: A
Test Device: B
Results: B
Settings
Voice count: 32
Sample rate: 24KHz
Speaker mode: Stereo
DSP block size: 1024 samples
Test Device: A
Results: A
Test Device: B
Results: B
Settings
Voice count: 64
Sample rate: 48KHz
Speaker mode: Stereo
DSP block size: 512 samples
Test Device
CPU: Intel Core i7 3615QM @ 2.3 GHz (Late 2012 Mac Mini)
OS: 10.8.5
Results
Settings
Voice count: 64
Sample rate: 48KHz
Speaker mode: Stereo
DSP block size: 1024 samples
Test Device
Results
Settings
Voice count: 64
Sample rate: 48KHz
Speaker mode: Stereo
DSP block size: 1024 samples
Test Device
Results
Settings
Voice count: 32
Sample rate: 24KHz
Speaker mode: Stereo
DSP block size: 1024 samples
Test Device
Results
Settings
Voice count: 64
Sample rate: 48KHz
Speaker mode: Stereo
DSP block size: 1024 samples
Test Device
Results
C Syntax
FSBANK_RESULT FSBank_Init(
FSBANK_FSBVERSION version,
FSBANK_INITFLAGS flags,
unsigned int numSimultaneousJobs,
const char *cacheDirectory
);
Parameters
version
flags
numSimultaneousJobs
The maximum number of threads to create for parallel encoding. Set this to your
number of CPU 'cores' for best performance.
cacheDirectory
Optional location to store the temporary cache files, default is a directory off the
current working directory.
Return Values
If the function succeeds then the return value is FSBANK_OK.
If the function fails then the return value will be one of the values defined in the
FSBANK_RESULT enumeration.
See Also
FSBANK_FSBVERSION
FSBANK_INITFLAGS
FSBank_Release
C Syntax
FSBANK_RESULT FSBank_Build(
const FSBANK_SUBSOUND *subSounds,
unsigned int numSubSounds,
FSBANK_FORMAT encodeFormat,
FSBANK_BUILDFLAGS buildFlags,
unsigned int quality,
const char *encryptKey,
const char *outputFileName
);
Parameters
subSounds
An array of subsound descriptions each defining one subsound for the final FSB.
numSubSounds
encodeFormat
buildFlags
quality
Controls the quality level after compression. From 1 (high compression / low
quality) to 100 (high quality / low compression), use 0 for default quality. See
remarks for format specific usage.
encryptKey
Optional string 'key' used to encrypt the FSB, same key is required at runtime for
decryption.
outputFileName
C/C++ Syntax
typedef struct {
const char* const *fileNames;
const void* const *fileData;
const unsigned int *fileDataLengths;
unsigned int numFiles;
FSBANK_BUILDFLAGS overrideFlags;
unsigned int overrideQuality;
float desiredSampleRate;
float percentOptimizedRate;
} FSBANK_SUBSOUND;
Members
fileNames
fileData
fileDataLengths
numFiles
overrideFlags
overrideQuality
desiredSampleRate
percentOptimizedRate
C/C++ Syntax
typedef enum {
FSBANK_FSBVERSION_FSB5,
FSBANK_FSBVERSION_MAX
} FSBANK_FSBVERSION;
Values
FSBANK_FSBVERSION_FSB5
FSBANK_FSBVERSION_MAX
C/C++ Syntax
typedef enum {
FSBANK_OK,
FSBANK_ERR_CACHE_CHUNKNOTFOUND,
FSBANK_ERR_CANCELLED,
FSBANK_ERR_CANNOT_CONTINUE,
FSBANK_ERR_ENCODER,
FSBANK_ERR_ENCODER_INIT,
FSBANK_ERR_ENCODER_NOTSUPPORTED,
FSBANK_ERR_FILE_OS,
FSBANK_ERR_FILE_NOTFOUND,
FSBANK_ERR_FMOD,
FSBANK_ERR_INITIALIZED,
FSBANK_ERR_INVALID_FORMAT,
FSBANK_ERR_INVALID_PARAM,
FSBANK_ERR_MEMORY,
FSBANK_ERR_UNINITIALIZED,
FSBANK_ERR_WRITER_FORMAT,
FSBANK_WARN_CANNOTLOOP,
FSBANK_WARN_IGNORED_FILTERHIGHFREQ,
FSBANK_WARN_IGNORED_DISABLESEEKING,
FSBANK_WARN_FORCED_DONTWRITENAMES,
FSBANK_ERR_ENCODER_FILE_NOTFOUND,
FSBANK_ERR_ENCODER_FILE_BAD
} FSBANK_RESULT;
Values
FSBANK_OK
No errors.
FSBANK_ERR_CACHE_CHUNKNOTFOUND
An expected chunk is missing from the cache, perhaps try deleting cache files.
FSBANK_ERR_CANCELLED
FSBANK_ERR_CANNOT_CONTINUE
FSBANK_ERR_ENCODER
FSBANK_ERR_ENCODER_INIT
FSBANK_ERR_ENCODER_NOTSUPPORTED
FSBANK_ERR_FILE_OS
FSBANK_ERR_FILE_NOTFOUND
FSBANK_ERR_FMOD
Internal error from FMOD sub-system.
FSBANK_ERR_INITIALIZED
Already initialized.
FSBANK_ERR_INVALID_FORMAT
FSBANK_ERR_INVALID_PARAM
FSBANK_ERR_MEMORY
FSBANK_ERR_UNINITIALIZED
FSBANK_ERR_WRITER_FORMAT
FSBANK_WARN_CANNOTLOOP
FSBANK_WARN_IGNORED_FILTERHIGHFREQ
FSBANK_WARN_IGNORED_DISABLESEEKING
FSBANK_WARN_FORCED_DONTWRITENAMES
FSBANK_BUILD_FSB5_DONTWRITENAMES flag forced: cannot write
names when source is from memory.
FSBANK_ERR_ENCODER_FILE_NOTFOUND
FSBANK_ERR_ENCODER_FILE_BAD
External encoder dynamic library could not be loaded, possibly incorrect binary
format, incorrect architecture, file corruption
C Syntax
FSBANK_RESULT FSBank_Release();
Return Values
If the function succeeds then the return value is FSBANK_OK.
If the function fails then the return value will be one of the values defined in the
FSBANK_RESULT enumeration.
Remarks
All progress items retrieved with FSBank_FetchNextProgressItem will be
released by this function.
See Also
FSBank_Init
FSBank_FetchNextProgressItem
C/C++ Syntax
typedef enum {
FSBANK_FORMAT_PCM,
FSBANK_FORMAT_PCM_BIGENDIAN,
FSBANK_FORMAT_XMA,
FSBANK_FORMAT_AT9_PSVITA,
FSBANK_FORMAT_AT9_PS4,
FSBANK_FORMAT_VORBIS,
FSBANK_FORMAT_FADPCM,
FSBANK_FORMAT_MAX
} FSBANK_FORMAT;
Values
FSBANK_FORMAT_PCM
FSBANK_FORMAT_PCM_BIGENDIAN
FSBANK_FORMAT_XMA
FSBANK_FORMAT_AT9_PSVITA
FSBANK_FORMAT_AT9_PS4
FSBANK_FORMAT_VORBIS
FSBANK_FORMAT_FADPCM
FSBANK_FORMAT_MAX
C Syntax
FSBANK_RESULT FSBank_FetchNextProgressItem(
const FSBANK_PROGRESSITEM **progressItem
);
Parameters
progressItem