FMExConfig Class
This class is a container for FMOD Ex configuration parameters and constants. To use this class, create a new FMExConfig instance and assign the desired values to its properties, then pass it to FMEx.StartUp. FMOD Ex's currently active settings can also be read by retrieving an FMExConfig instance with the FMEx.GetActiveSettings function. This can be useful to compare the requested settings with the actual settings.
Constants
Expand All | Collapse All
-
kOutputTypeAuto = 0
Used to choose the most appropriate output for the current operating system. -
kOutputTypeLinuxALSA = 12
Specifies ALSA (Advanced Linux Sound Architecture) output for Linux targets. This is the default on Linux. -
kOutputTypeLinuxESD = 13
Specifies ESD (Enlightened Sound Daemon) output for Linux targets. -
kOutputTypeLinuxOSS = 11
Specifies OSS (Open Sound System) output for Linux targets. -
kOutputTypeMacCoreAudio = 15
Specifies Core Audio output for Mac OS X targets. This is the default on Mac OS X. -
kOutputTypeMacSoundManager = 14
Specifies Sound Manager output for Mac OS X targets. Note that Sound Manager is deprecated technology and should only be used on older systems if Core Audio output fails. -
kOutputTypeNoSound = 2
Specifies a "no sound" output on all systems. FMOD Ex functions will work as normal but will not make any sound when using this output type. This is mostly useful for debugging or profiling purposes. -
kOutputTypeWindowsASIO = 10
Specifies ASIO output for Windows targets. ASIO is the Audio Stream Input/Output specification by Steinberg, and is typically only used by 3rd party hardware drivers. ASIO output will typically achieve the lowest possible latency on Windows systems. -
kOutputTypeWindowsDirectSound = 6
Specifies Direct Sound output for Windows targets. This is the default on Windows systems prior to Vista. -
kOutputTypeWindowsMultimedia = 7
Specifies the Windows Multimedia output for Windows targets. -
kOutputTypeWindowsOpenAL = 8
Specifies OpenAL output for Windows targets. OpenAL output may perform better than the default output in some cases but requires the 3rd party OpenAL library. -
kOutputTypeWindowsWASAPI = 9
Specifies WASAPI (Windows Audio Session API) output for Windows targets. This is the default for Windows Vista. -
kResamplerCubic = 2
Specifies cubic resampling interpolation (for use with the ResamplerMethod property). This is slower than kResamplerLinear but better quality. -
kResamplerLinear = 1
Specifies linear resampling interpolation (for use with the ResamplerMethod property). This is the default resampling method - its relatively fast and good quality. -
kResamplerNoInterpolation = 0
Specifies no resampling interpolation (for use with the ResamplerMethod property). This is the fastest resampling method, but may result in audible aliasing artifacts. -
kResamplerSpline = 3
Specifies 5 point spline resampling interpolation (for use with the ResamplerMethod property). This is the highest quality, but most CPU-intensive resampling method. -
kSoundFormatAuto = -1
Used to choose a sound format automatically. Normally FMOD Ex will use kSoundFormatPCM16 in this case, but overrides are in place for known buggy drivers where kSoundFormatPCMFloat may be used instead. -
kSoundFormatPCM16 = 2
Specifies signed 16 bit integer audio format, where each sample on each channel is 2 bytes long. -
kSoundFormatPCM24 = 3
Specifies signed 24 bit integer audio format, where each sample on each channel is 3 bytes long.
Note: FMOD Ex always packs 24 bit PCM data in little-endian format regardless of the platform's native endianness. -
kSoundFormatPCM32 = 4
Specifies signed 32 bit integer audio format, where each sample on each channel is 4 bytes long. -
kSoundFormatPCM8 = 1
Specifies signed 8 bit integer audio format, where each sample on each channel is 1 byte long. -
kSoundFormatPCMFloat = 5
Specifies 32 bit floating point audio format, where each sample on each channel is 4 bytes long. -
kSpeakerIndexBackLeft = 4
Specifies the rear-left surround speaker. -
kSpeakerIndexBackRight = 5
Specifies the rear-right surround speaker. -
kSpeakerIndexFrontCenter = 2
Specifies the center (voice-channel) surround speaker. -
kSpeakerIndexFrontLeft = 0
Specifies a the front-left speaker. -
kSpeakerIndexFrontRight = 1
Specifies the front-right speaker. -
kSpeakerIndexLowFreqency = 3
Specifies the low-frequency (sub woofer) speaker. -
kSpeakerIndexMono = 0
Specifies a single mono speaker (same as the kSpeakerIndexFrontLeft). -
kSpeakerIndexSideLeft = 6
Specifies the middle-left surround speaker. -
kSpeakerIndexSideRight = 7
Specifies the middle-right surround speaker. -
kSpeakerMode5Point1 = 5
Specifies 5.1 (6 channel) surround speaker mode. -
kSpeakerMode7Point1 = 6
Specifies 7.1 (8 channel) surround speaker mode. -
kSpeakerModeAuto = -1
Used to choose a speaker mode matching the current audio driver's reported capabilities. -
kSpeakerModeMono = 1
Specifies mono (1 channel) speaker mode. -
kSpeakerModePrologic = 7
Specifies Prologic (2 channel) speaker mode. Prologic encodes surround sound information on 2 channels and typically requires an external decoder. -
kSpeakerModeQuad = 3
Specifies quadraphonic (4 channel) speaker mode. -
kSpeakerModeRaw = 0
Specifies raw (16 channel) speaker mode. Note that FMEx.OutputsAvailable will report 16 output channels when using this raw mode regardless of the hardware capabilities. The exception is kOutputTypeWindowsASIO, which will report the actual number of output channels to a maximum of 16. -
kSpeakerModeStereo = 2
Specifies stereo (2 channel) speaker mode. This is the fallback speaker mode if kSpeakerModeAuto fails. -
kSpeakerModeSurround = 4
Specifies surround (5 channel) speaker mode. This is similar to kSpeakerMode5Point1 but lacks a low-frequency sub woofer output.
Properties
Expand All | Collapse All
-
BufferLength As Integer
This property should only be tweaked as a last resort on problematic hardware. FMOD Ex will generally choose the best buffer size for the given output type (typically 1024), and in some cases the driver will override this value (e.g. Core Audio and ASIO). These classes will also enforce a minimum BufferLength of 1024 for drivers that report FMExDriver.HardwareEmulated as recommended in the FMOD Ex SDK documentation. -
DriverId As Integer
Set this to a driver index or FMExDriver.Index for a given output type. The default of zero will use the (first) default driver for the chosen output type. Note that FMEx.StartUp will fail if the specified driver is invalid. -
Flag3DOcclusion As Boolean = True
When set to True (default) this will enable 3D audio geometry occlusion and behind-the-listener low-pass filtering.
Note: These classes do not currently wrap FMOD Ex's 3D geometry APIs, but custom declares can be used to utilize this functionality. -
Flag3DRightHanded As Boolean = True
When set to True (default) this tells fmod to use a right-handed 3D system (flip Z coordinates so +Z points out of the screen). Set to False to use a left-handed system. -
MaxVoices As Integer
This property controls the maximum number sounds (voices) FMOD Ex can mix and play simultaneously. The default is of zero will use FMOD Ex's internal default setting (usually 64). High voice counts can increase CPU and memory requirements, while lower counts increase the chance of sounds being prematurely truncated. -
NumBuffers As Integer
Should only be tweaked as a last resort on problematic hardware. This is will have a minimum value of 10 for drivers that report FMExDriver.HardwareEmulated on Windows as recommended in the FMOD Ex SDK documentation.
Note: This setting is ignored on Linux. -
OutputType As Integer = kOutputTypeAuto
Set this to request a specific output type. The default setting will cause FMEx.StartUp to use the best output available, which may include one or more fallbacks if the first choice fails. Note that no fallbacks are used if this property is modified, the start-up will simply fail if the chosen output type fails.
Note: You can use the FMEx.OutputTypeAvailable function prior to starting up FMOD Ex to test for the availability of an output type.
Output Type Constants: -
ResamplerMethod As Integer = kResamplerLinear
Set this to override the default (linear interpolation) resampling method. The resampler DSP kicks in whenever audio uses a different sampling rate (frequency) than the FMOD Ex mixer.
Resampler Method Constants: -
SampleRate As Integer
Set this to request a specific master sample rate in Hz. The default value of zero will use FMOD Ex's internal default (usually 48000) but note that the actual rate may be limited by the output hardware regardless of this setting. -
SoundFormat As Integer = kSoundFormatAuto
Set this to request a specific master sound format. The default value of kSoundFormatAuto will usually end up using kSoundFormatPCM16 but this may be overridden internally, or for problem drivers as recommended by the FMOD Ex SDK documentation.
Sound Format Constants: -
SpeakerMode As Integer = kSpeakerModeAuto
Set this to request a specific output speaker mode. This is usually best left as kSpeakerModeAuto unless the raw speaker mode is required for pro-level multichannel hardware.
Note: At this time, FMOD Ex does not support surround-sounds modes other than kSpeakerModePrologic on Mac OS X or Linux.
Speaker Mode Constants: