pub struct AdvancedSettings {Show 20 fields
pub max_mpeg_codecs: c_int,
pub max_adpcm_codecs: c_int,
pub max_xma_codecs: c_int,
pub max_vorbis_codecs: c_int,
pub max_at9_codecs: c_int,
pub max_fadpcm_codecs: c_int,
pub max_opus_codecs: c_int,
pub asio_channel_list: Option<Vec<Utf8CString>>,
pub asio_speaker_list: Option<Vec<Speaker>>,
pub vol0_virtual_vol: c_float,
pub default_decode_buffer_size: c_uint,
pub profile_port: c_ushort,
pub geometry_max_fade_time: c_uint,
pub distance_filter_center_freq: c_float,
pub reverb_3d_instance: c_int,
pub dsp_buffer_pool_size: c_int,
pub resampler_method: Resampler,
pub random_seed: c_uint,
pub max_convolution_threads: c_int,
pub max_spatial_objects: c_int,
}Expand description
Advanced configuration settings.
Structure to allow configuration of lesser used system level settings. These tweaks generally allow the user to set resource limits and customize settings to better fit their application.
Fields§
§max_mpeg_codecs: c_intMaximum MPEG Sounds created as FMOD_CREATECOMPRESSEDSAMPLE.
max_adpcm_codecs: c_intMaximum IMA-ADPCM Sounds created as FMOD_CREATECOMPRESSEDSAMPLE.
max_xma_codecs: c_intMaximum XMA Sounds created as FMOD_CREATECOMPRESSEDSAMPLE.
max_vorbis_codecs: c_intMaximum Vorbis Sounds created as FMOD_CREATECOMPRESSEDSAMPLE.
max_at9_codecs: c_intMaximum AT9 Sounds created as FMOD_CREATECOMPRESSEDSAMPLE.
max_fadpcm_codecs: c_intMaximum FADPCM Sounds created as FMOD_CREATECOMPRESSEDSAMPLE.
max_opus_codecs: c_intMaximum Opus Sounds created as FMOD_CREATECOMPRESSEDSAMPLE.
asio_channel_list: Option<Vec<Utf8CString>>Read only list of strings representing ASIO channel names (UTF-8 string).
asio_speaker_list: Option<Vec<Speaker>>List of speakers that represent each ASIO channel used for remapping.
Use FMOD_SPEAKER_NONE to indicate no output for a given speaker.
vol0_virtual_vol: c_floatFor use with FMOD_INIT_VOL0_BECOMES_VIRTUAL,
Channels with audibility below this will become virtual.
See the Virtual Voices guide for more information.
default_decode_buffer_size: c_uintFor use with Streams, the default size of the double buffer.
profile_port: c_ushortFor use with FMOD_INIT_PROFILE_ENABLE,
specify the port to listen on for connections by FMOD Studio or FMOD Profiler.
geometry_max_fade_time: c_uintFor use with Geometry,
the maximum time it takes for a Channel to fade to the new volume level when its occlusion changes.
distance_filter_center_freq: c_floatFor use with FMOD_INIT_CHANNEL_DISTANCEFILTER,
the default center frequency for the distance filter.
reverb_3d_instance: c_intFor use with Reverb3D, selects which global reverb instance to use.
dsp_buffer_pool_size: c_intNumber of intermediate mixing buffers in the DSP buffer pool.
Each buffer in bytes is dsp_buffer_pool_size (See System::get_dsp_buffer_size) * sizeof(float) * output mode speaker count.
ie 7.1 @ 1024 DSP block size = 1024 * 4 * 8 = 32KB.
resampler_method: ResamplerResampling method used by Channels.
random_seed: c_uintSeed value to initialize the internal random number generator.
max_convolution_threads: c_intMaximum number of CPU threads to use for FMOD_DSP_TYPE_CONVOLUTIONREVERB effect.
1 = effect is entirely processed inside the FMOD_THREAD_TYPE_MIXER thread.
2 and 3 offloads different parts of the convolution processing into different threads
(FMOD_THREAD_TYPE_CONVOLUTION1 and FMOD_THREAD_TYPE_CONVOLUTION2) to increase throughput.
max_spatial_objects: c_intMaximum Spatial Objects that can be reserved per FMOD system.
FMOD_OUTPUTTYPE_AUDIO3D is a special case where multiple FMOD systems are not allowed.
See the Object based approach section of the Spatial Audio white paper.
- A value of -1 means no Spatial Objects will be reserved.
- A value of 0 means all available Spatial Objects will be reserved.
- Any other value means it will reserve that many Spatial Objects.
Implementations§
Source§impl AdvancedSettings
impl AdvancedSettings
Sourcepub unsafe fn from_ffi(value: FMOD_ADVANCEDSETTINGS) -> Self
pub unsafe fn from_ffi(value: FMOD_ADVANCEDSETTINGS) -> Self
Due to how FMOD_ADVANCEDSETTINGS interacts with FMOD_System_GetAdvancedSettings this won’t read ASIOSpeakerList.
Usually ASIOSpeakerList won’t be filled out. If you’re 100% certain that’s not the case, you will have to convert it yourself.
let slice = unsafe { std::slice::from_raw_parts(value.ASIOSpeakerList, value.ASIONumChannels) };
let speakers: Result<Speaker, _> = slice.iter().copied().map(Speaker::try_from).collect();
let speakers = speakers.expect("invalid speaker value");§Safety
ASIOChannelList must be valid for reads up to ASIONumChannels.
Every pointer inside ASIOChannelList must be a null-terminated and must be valid for reads of bytes up to and including the nul terminator.
See Utf8CStr::from_ptr_unchecked for more information.
§Panics
This function will panic if resamplerMethod is not a valid user resampler.