#[repr(C)]
pub struct projectm_settings_s {
Show 20 fields pub mesh_x: c_int, pub mesh_y: c_int, pub fps: c_int, pub texture_size: c_int, pub window_width: c_int, pub window_height: c_int, pub preset_url: *mut c_char, pub title_font_url: *mut c_char, pub menu_font_url: *mut c_char, pub data_dir: *mut c_char, pub preset_duration: f64, pub soft_cut_duration: f64, pub hard_cut_duration: f64, pub hard_cut_enabled: bool, pub hard_cut_sensitivity: f32, pub beat_sensitivity: f32, pub aspect_correction: bool, pub easter_egg: f32, pub shuffle_enabled: bool, pub soft_cut_ratings_enabled: bool,
}
Expand description

@brief projectM instance settings.

Use this struct to provide settings for projectM, for example if your application handles projectM configuration internally instead of using the default configuration file.

Always allocate the struct using the projectm_alloc_settings() and free it with the projectm_free_settings() function.

To allocate memory for char* members, always use projectm_alloc_string(). If any pointer is not NULL, projectm_free_settings() will automatically call projectm_free_string() on it. If you free it on your own, remember to reset the pointer to NULL after doing so!

Fields

mesh_x: c_int

!< Per-pixel mesh X resolution.

mesh_y: c_int

!< Per-pixel mesh Y resolution.

fps: c_int

!< Target rendering frames per second.

texture_size: c_int

!< Size of the render texture. Must be a power of 2.

window_width: c_int

!< Width of the rendering viewport.

window_height: c_int

!< Height of the rendering viewport.

preset_url: *mut c_char

!< Path to a preset playlist in XML format to be loaded. Use FLAG_DISABLE_PLAYLIST_LOAD to skip loading a playlist.

title_font_url: *mut c_char

!< Path to the “title” font that is used to render the preset name.

menu_font_url: *mut c_char

!< Path to the “menu” font that is used to render the built-in on-screen menu.

data_dir: *mut c_char

!< Path to data files like default fonts and presets.

preset_duration: f64

!< Display duration for each preset in seconds.

soft_cut_duration: f64

!< Blend-over duration between two presets in seconds.

hard_cut_duration: f64

!< Minimum time in seconds a preset is displayed before a hard cut can happen.

hard_cut_enabled: bool

!< Set to true to enable fast beat-driven preset switches.

hard_cut_sensitivity: f32

!< Beat sensitivity value that must be surpassed for a hard cut.

beat_sensitivity: f32

!< Beat sensitivity. Standard sensitivity is 1.0.

aspect_correction: bool

!< Use aspect ration correction in presets that support it.

easter_egg: f32

!< Used as the “sigma” value for a gaussian RNG to randomize preset duration. Unused on Windows.

shuffle_enabled: bool

!< Enable playlist shuffle, selecting a random preset on each switch instead of the next in list.

soft_cut_ratings_enabled: bool

!< If true, use soft cut ratings on soft cuts and hard cut ratings on hard cuts. If false, the hard cut rating is always used.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.