openmpt_sys/
lib.rs

1#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
2
3/* automatically generated by rust-bindgen 0.60.1 */
4
5pub const OPENMPT_API_VERSION_MAJOR: u32 = 0;
6pub const OPENMPT_API_VERSION_MINOR: u32 = 6;
7pub const OPENMPT_API_VERSION_PATCH: u32 = 5;
8pub const OPENMPT_API_VERSION_PREREL: &[u8; 1usize] = b"\0";
9pub const OPENMPT_API_VERSION_IS_PREREL: u32 = 0;
10pub const OPENMPT_STREAM_SEEK_SET: u32 = 0;
11pub const OPENMPT_STREAM_SEEK_CUR: u32 = 1;
12pub const OPENMPT_STREAM_SEEK_END: u32 = 2;
13pub const OPENMPT_ERROR_OK: u32 = 0;
14pub const OPENMPT_ERROR_BASE: u32 = 256;
15pub const OPENMPT_ERROR_UNKNOWN: u32 = 257;
16pub const OPENMPT_ERROR_EXCEPTION: u32 = 267;
17pub const OPENMPT_ERROR_OUT_OF_MEMORY: u32 = 277;
18pub const OPENMPT_ERROR_RUNTIME: u32 = 286;
19pub const OPENMPT_ERROR_RANGE: u32 = 287;
20pub const OPENMPT_ERROR_OVERFLOW: u32 = 288;
21pub const OPENMPT_ERROR_UNDERFLOW: u32 = 289;
22pub const OPENMPT_ERROR_LOGIC: u32 = 296;
23pub const OPENMPT_ERROR_DOMAIN: u32 = 297;
24pub const OPENMPT_ERROR_LENGTH: u32 = 298;
25pub const OPENMPT_ERROR_OUT_OF_RANGE: u32 = 299;
26pub const OPENMPT_ERROR_INVALID_ARGUMENT: u32 = 300;
27pub const OPENMPT_ERROR_GENERAL: u32 = 357;
28pub const OPENMPT_ERROR_INVALID_MODULE_POINTER: u32 = 358;
29pub const OPENMPT_ERROR_ARGUMENT_NULL_POINTER: u32 = 359;
30pub const OPENMPT_ERROR_FUNC_RESULT_NONE: u32 = 0;
31pub const OPENMPT_ERROR_FUNC_RESULT_LOG: u32 = 1;
32pub const OPENMPT_ERROR_FUNC_RESULT_STORE: u32 = 2;
33pub const OPENMPT_ERROR_FUNC_RESULT_DEFAULT: u32 = 3;
34pub const OPENMPT_PROBE_FILE_HEADER_FLAGS_MODULES: u32 = 1;
35pub const OPENMPT_PROBE_FILE_HEADER_FLAGS_CONTAINERS: u32 = 2;
36pub const OPENMPT_PROBE_FILE_HEADER_FLAGS_DEFAULT: u32 = 3;
37pub const OPENMPT_PROBE_FILE_HEADER_FLAGS_NONE: u32 = 0;
38pub const OPENMPT_PROBE_FILE_HEADER_RESULT_SUCCESS: u32 = 1;
39pub const OPENMPT_PROBE_FILE_HEADER_RESULT_FAILURE: u32 = 0;
40pub const OPENMPT_PROBE_FILE_HEADER_RESULT_WANTMOREDATA: i32 = -1;
41pub const OPENMPT_PROBE_FILE_HEADER_RESULT_ERROR: i32 = -255;
42pub const OPENMPT_MODULE_RENDER_MASTERGAIN_MILLIBEL: u32 = 1;
43pub const OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT: u32 = 2;
44pub const OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH: u32 = 3;
45pub const OPENMPT_MODULE_RENDER_VOLUMERAMPING_STRENGTH: u32 = 4;
46pub const OPENMPT_MODULE_COMMAND_NOTE: u32 = 0;
47pub const OPENMPT_MODULE_COMMAND_INSTRUMENT: u32 = 1;
48pub const OPENMPT_MODULE_COMMAND_VOLUMEEFFECT: u32 = 2;
49pub const OPENMPT_MODULE_COMMAND_EFFECT: u32 = 3;
50pub const OPENMPT_MODULE_COMMAND_VOLUME: u32 = 4;
51pub const OPENMPT_MODULE_COMMAND_PARAMETER: u32 = 5;
52pub const LIBOPENMPT_DEPRECATED_STRING_CONSTANT: ::std::os::raw::c_int = 0;
53extern "C" {
54    #[doc = " \\brief Get the libopenmpt version number"]
55    #[doc = ""]
56    #[doc = " Returns the libopenmpt version number."]
57    #[doc = " \\return The value represents (major << 24 + minor << 16 + patch << 0)."]
58    #[doc = " \\remarks libopenmpt < 0.3.0-pre used the following scheme: (major << 24 + minor << 16 + revision)."]
59    pub fn openmpt_get_library_version() -> u32;
60}
61extern "C" {
62    #[doc = " \\brief Get the core version number"]
63    #[doc = ""]
64    #[doc = " Return the OpenMPT core version number."]
65    #[doc = " \\return The value represents (majormajor << 24 + major << 16 + minor << 8 + minorminor)."]
66    pub fn openmpt_get_core_version() -> u32;
67}
68extern "C" {
69    #[doc = " \\brief Free a string returned by libopenmpt"]
70    #[doc = ""]
71    #[doc = " Frees any string that got returned by libopenmpt."]
72    pub fn openmpt_free_string(str_: *const ::std::os::raw::c_char);
73}
74extern "C" {
75    #[doc = " \\brief Get library related metadata."]
76    #[doc = ""]
77    #[doc = " \\param key Key to query."]
78    #[doc = "       Possible keys are:"]
79    #[doc = "        -  \"library_version\": verbose library version string"]
80    #[doc = "        -  \"library_version_is_release\": \"1\" if the version is an officially released version"]
81    #[doc = "        -  \"library_features\": verbose library features string"]
82    #[doc = "        -  \"core_version\": verbose OpenMPT core version string"]
83    #[doc = "        -  \"source_url\": original source code URL"]
84    #[doc = "        -  \"source_date\": original source code date"]
85    #[doc = "        -  \"source_revision\": original source code revision"]
86    #[doc = "        -  \"source_is_modified\": \"1\" if the original source has been modified"]
87    #[doc = "        -  \"source_has_mixed_revisions\": \"1\" if the original source has been compiled from different various revision"]
88    #[doc = "        -  \"source_is_package\": \"1\" if the original source has been obtained from a source pacakge instead of source code version control"]
89    #[doc = "        -  \"build\": information about the current build (e.g. the build date or compiler used)"]
90    #[doc = "        -  \"build_compiler\": information about the compiler used to build libopenmpt"]
91    #[doc = "        -  \"credits\": all contributors"]
92    #[doc = "        -  \"contact\": contact information about libopenmpt"]
93    #[doc = "        -  \"license\": the libopenmpt license"]
94    #[doc = "        -  \"url\": libopenmpt website URL"]
95    #[doc = "        -  \"support_forum_url\": libopenmpt support and discussions forum URL"]
96    #[doc = "        -  \"bugtracker_url\": libopenmpt bug and issue tracker URL"]
97    #[doc = " \\return A (possibly multi-line) string containing the queried information. If no information is available, the string is empty."]
98    pub fn openmpt_get_string(key: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char;
99}
100extern "C" {
101    #[doc = " \\brief Get a list of supported file extensions"]
102    #[doc = ""]
103    #[doc = " \\return The semicolon-separated list of extensions supported by this libopenmpt build. The extensions are returned lower-case without a leading dot."]
104    pub fn openmpt_get_supported_extensions() -> *const ::std::os::raw::c_char;
105}
106extern "C" {
107    #[doc = " \\brief Query whether a file extension is supported"]
108    #[doc = ""]
109    #[doc = " \\param extension file extension to query without a leading dot. The case is ignored."]
110    #[doc = " \\return 1 if the extension is supported by libopenmpt, 0 otherwise."]
111    pub fn openmpt_is_extension_supported(
112        extension: *const ::std::os::raw::c_char,
113    ) -> ::std::os::raw::c_int;
114}
115#[doc = " \\brief Read bytes from stream"]
116#[doc = ""]
117#[doc = " Read bytes data from stream to dst."]
118#[doc = " \\param stream Stream to read data from"]
119#[doc = " \\param dst Target where to copy data."]
120#[doc = " \\param bytes Number of bytes to read."]
121#[doc = " \\return Number of bytes actually read and written to dst."]
122#[doc = " \\retval 0 End of stream or error."]
123#[doc = " \\remarks Short reads are allowed as long as they return at least 1 byte if EOF is not reached."]
124pub type openmpt_stream_read_func = ::std::option::Option<
125    unsafe extern "C" fn(
126        stream: *mut ::std::os::raw::c_void,
127        dst: *mut ::std::os::raw::c_void,
128        bytes: usize,
129    ) -> usize,
130>;
131#[doc = " \\brief Seek stream position"]
132#[doc = ""]
133#[doc = " Seek to stream position offset at whence."]
134#[doc = " \\param stream Stream to operate on."]
135#[doc = " \\param offset Offset to seek to."]
136#[doc = " \\param whence OPENMPT_STREAM_SEEK_SET, OPENMPT_STREAM_SEEK_CUR, OPENMPT_STREAM_SEEK_END. See C89 documentation."]
137#[doc = " \\return Returns 0 on success."]
138#[doc = " \\retval 0 Success."]
139#[doc = " \\retval -1 Failure. Position does not get updated."]
140#[doc = " \\remarks libopenmpt will not try to seek beyond the file size, thus it is not important whether you allow for virtual positioning after the file end, or return an error in that case. The position equal to the file size needs to be seekable to."]
141pub type openmpt_stream_seek_func = ::std::option::Option<
142    unsafe extern "C" fn(
143        stream: *mut ::std::os::raw::c_void,
144        offset: i64,
145        whence: ::std::os::raw::c_int,
146    ) -> ::std::os::raw::c_int,
147>;
148#[doc = " \\brief Tell stream position"]
149#[doc = ""]
150#[doc = " Tell position of stream."]
151#[doc = " \\param stream Stream to operate on."]
152#[doc = " \\return Current position in stream."]
153#[doc = " \\retval -1 Failure."]
154pub type openmpt_stream_tell_func =
155    ::std::option::Option<unsafe extern "C" fn(stream: *mut ::std::os::raw::c_void) -> i64>;
156#[doc = " \\brief Stream callbacks"]
157#[doc = ""]
158#[doc = " Stream callbacks used by libopenmpt for stream operations."]
159#[doc = " \\sa openmpt_stream_get_file_callbacks"]
160#[doc = " \\sa openmpt_stream_get_fd_callbacks"]
161#[doc = " \\sa openmpt_stream_get_buffer_callbacks"]
162#[repr(C)]
163#[derive(Debug, Copy, Clone)]
164pub struct openmpt_stream_callbacks {
165    #[doc = " \\brief Read callback."]
166    #[doc = ""]
167    #[doc = " \\sa openmpt_stream_read_func"]
168    pub read: openmpt_stream_read_func,
169    #[doc = " \\brief Seek callback."]
170    #[doc = ""]
171    #[doc = " Seek callback can be NULL if seeking is not supported."]
172    #[doc = " \\sa openmpt_stream_seek_func"]
173    pub seek: openmpt_stream_seek_func,
174    #[doc = " \\brief Tell callback."]
175    #[doc = ""]
176    #[doc = " Tell callback can be NULL if seeking is not supported."]
177    #[doc = " \\sa openmpt_stream_tell_func"]
178    pub tell: openmpt_stream_tell_func,
179}
180#[test]
181fn bindgen_test_layout_openmpt_stream_callbacks() {
182    assert_eq!(
183        ::std::mem::size_of::<openmpt_stream_callbacks>(),
184        24usize,
185        concat!("Size of: ", stringify!(openmpt_stream_callbacks))
186    );
187    assert_eq!(
188        ::std::mem::align_of::<openmpt_stream_callbacks>(),
189        8usize,
190        concat!("Alignment of ", stringify!(openmpt_stream_callbacks))
191    );
192    fn test_field_read() {
193        assert_eq!(
194            unsafe {
195                let uninit = ::std::mem::MaybeUninit::<openmpt_stream_callbacks>::uninit();
196                let ptr = uninit.as_ptr();
197                ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize
198            },
199            0usize,
200            concat!(
201                "Offset of field: ",
202                stringify!(openmpt_stream_callbacks),
203                "::",
204                stringify!(read)
205            )
206        );
207    }
208    test_field_read();
209    fn test_field_seek() {
210        assert_eq!(
211            unsafe {
212                let uninit = ::std::mem::MaybeUninit::<openmpt_stream_callbacks>::uninit();
213                let ptr = uninit.as_ptr();
214                ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize
215            },
216            8usize,
217            concat!(
218                "Offset of field: ",
219                stringify!(openmpt_stream_callbacks),
220                "::",
221                stringify!(seek)
222            )
223        );
224    }
225    test_field_seek();
226    fn test_field_tell() {
227        assert_eq!(
228            unsafe {
229                let uninit = ::std::mem::MaybeUninit::<openmpt_stream_callbacks>::uninit();
230                let ptr = uninit.as_ptr();
231                ::std::ptr::addr_of!((*ptr).tell) as usize - ptr as usize
232            },
233            16usize,
234            concat!(
235                "Offset of field: ",
236                stringify!(openmpt_stream_callbacks),
237                "::",
238                stringify!(tell)
239            )
240        );
241    }
242    test_field_tell();
243}
244#[doc = " \\brief Logging function"]
245#[doc = ""]
246#[doc = " \\param message UTF-8 encoded log message."]
247#[doc = " \\param user User context that was passed to openmpt_module_create2(), openmpt_module_create_from_memory2() or openmpt_could_open_probability2()."]
248pub type openmpt_log_func = ::std::option::Option<
249    unsafe extern "C" fn(message: *const ::std::os::raw::c_char, user: *mut ::std::os::raw::c_void),
250>;
251extern "C" {
252    #[doc = " \\brief Default logging function"]
253    #[doc = ""]
254    #[doc = " Default logging function that logs anything to stderr."]
255    pub fn openmpt_log_func_default(
256        message: *const ::std::os::raw::c_char,
257        user: *mut ::std::os::raw::c_void,
258    );
259}
260extern "C" {
261    #[doc = " \\brief Silent logging function"]
262    #[doc = ""]
263    #[doc = " Silent logging function that throws any log message away."]
264    pub fn openmpt_log_func_silent(
265        message: *const ::std::os::raw::c_char,
266        user: *mut ::std::os::raw::c_void,
267    );
268}
269extern "C" {
270    #[doc = " \\brief Check whether the error is transient"]
271    #[doc = ""]
272    #[doc = " Checks whether an error code represents a transient error which may not occur again in a later try if for example memory has been freed up after an out-of-memory error."]
273    #[doc = " \\param error Error code."]
274    #[doc = " \\retval 0 Error is not transient."]
275    #[doc = " \\retval 1 Error is transient."]
276    #[doc = " \\sa OPENMPT_ERROR_OUT_OF_MEMORY"]
277    #[doc = " \\since 0.3.0"]
278    pub fn openmpt_error_is_transient(error: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
279}
280extern "C" {
281    #[doc = " \\brief Convert error code to text"]
282    #[doc = ""]
283    #[doc = " Converts an error code into a text string describing the error."]
284    #[doc = " \\param error Error code."]
285    #[doc = " \\return Allocated string describing the error."]
286    #[doc = " \\retval NULL Not enough memory to allocate the string."]
287    #[doc = " \\since 0.3.0"]
288    pub fn openmpt_error_string(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
289}
290#[doc = " \\brief Error function"]
291#[doc = ""]
292#[doc = " \\param error Error code."]
293#[doc = " \\param user User context that was passed to openmpt_module_create2(), openmpt_module_create_from_memory2() or openmpt_could_open_probability2()."]
294#[doc = " \\return Mask of OPENMPT_ERROR_FUNC_RESULT_LOG and OPENMPT_ERROR_FUNC_RESULT_STORE."]
295#[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_NONE Do not log or store the error."]
296#[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_LOG Log the error."]
297#[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_STORE Store the error."]
298#[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_DEFAULT Log and store the error."]
299#[doc = " \\sa OPENMPT_ERROR_FUNC_RESULT_NONE"]
300#[doc = " \\sa OPENMPT_ERROR_FUNC_RESULT_LOG"]
301#[doc = " \\sa OPENMPT_ERROR_FUNC_RESULT_STORE"]
302#[doc = " \\sa OPENMPT_ERROR_FUNC_RESULT_DEFAULT"]
303#[doc = " \\sa openmpt_error_func_default"]
304#[doc = " \\sa openmpt_error_func_log"]
305#[doc = " \\sa openmpt_error_func_store"]
306#[doc = " \\sa openmpt_error_func_ignore"]
307#[doc = " \\sa openmpt_error_func_errno"]
308#[doc = " \\since 0.3.0"]
309pub type openmpt_error_func = ::std::option::Option<
310    unsafe extern "C" fn(
311        error: ::std::os::raw::c_int,
312        user: *mut ::std::os::raw::c_void,
313    ) -> ::std::os::raw::c_int,
314>;
315extern "C" {
316    #[doc = " \\brief Default error function"]
317    #[doc = ""]
318    #[doc = " Causes all errors to be logged and stored."]
319    #[doc = " \\param error Error code."]
320    #[doc = " \\param user Ignored."]
321    #[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_DEFAULT Always."]
322    #[doc = " \\since 0.3.0"]
323    pub fn openmpt_error_func_default(
324        error: ::std::os::raw::c_int,
325        user: *mut ::std::os::raw::c_void,
326    ) -> ::std::os::raw::c_int;
327}
328extern "C" {
329    #[doc = " \\brief Log error function"]
330    #[doc = ""]
331    #[doc = " Causes all errors to be logged."]
332    #[doc = " \\param error Error code."]
333    #[doc = " \\param user Ignored."]
334    #[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_LOG Always."]
335    #[doc = " \\since 0.3.0"]
336    pub fn openmpt_error_func_log(
337        error: ::std::os::raw::c_int,
338        user: *mut ::std::os::raw::c_void,
339    ) -> ::std::os::raw::c_int;
340}
341extern "C" {
342    #[doc = " \\brief Store error function"]
343    #[doc = ""]
344    #[doc = " Causes all errors to be stored."]
345    #[doc = " \\param error Error code."]
346    #[doc = " \\param user Ignored."]
347    #[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_STORE Always."]
348    #[doc = " \\since 0.3.0"]
349    pub fn openmpt_error_func_store(
350        error: ::std::os::raw::c_int,
351        user: *mut ::std::os::raw::c_void,
352    ) -> ::std::os::raw::c_int;
353}
354extern "C" {
355    #[doc = " \\brief Ignore error function"]
356    #[doc = ""]
357    #[doc = " Causes all errors to be neither logged nor stored."]
358    #[doc = " \\param error Error code."]
359    #[doc = " \\param user Ignored."]
360    #[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_NONE Always."]
361    #[doc = " \\since 0.3.0"]
362    pub fn openmpt_error_func_ignore(
363        error: ::std::os::raw::c_int,
364        user: *mut ::std::os::raw::c_void,
365    ) -> ::std::os::raw::c_int;
366}
367extern "C" {
368    #[doc = " \\brief Errno error function"]
369    #[doc = ""]
370    #[doc = " Causes all errors to be stored in the pointer passed in as user."]
371    #[doc = " \\param error Error code."]
372    #[doc = " \\param user Pointer to an int as generated by openmpt_error_func_errno_userdata."]
373    #[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_NONE user is not NULL."]
374    #[doc = " \\retval OPENMPT_ERROR_FUNC_RESULT_DEFAULT user is NULL."]
375    #[doc = " \\since 0.3.0"]
376    pub fn openmpt_error_func_errno(
377        error: ::std::os::raw::c_int,
378        user: *mut ::std::os::raw::c_void,
379    ) -> ::std::os::raw::c_int;
380}
381extern "C" {
382    #[doc = " \\brief User pointer for openmpt_error_func_errno"]
383    #[doc = ""]
384    #[doc = " Provides a suitable user pointer argument for openmpt_error_func_errno."]
385    #[doc = " \\param error Pointer to an integer value to be used as output by openmpt_error_func_errno."]
386    #[doc = " \\retval (void*)error."]
387    #[doc = " \\since 0.3.0"]
388    pub fn openmpt_error_func_errno_userdata(
389        error: *mut ::std::os::raw::c_int,
390    ) -> *mut ::std::os::raw::c_void;
391}
392extern "C" {
393    #[doc = " \\brief Roughly scan the input stream to find out whether libopenmpt might be able to open it"]
394    #[doc = ""]
395    #[doc = " \\param stream_callbacks Input stream callback operations."]
396    #[doc = " \\param stream Input stream to scan."]
397    #[doc = " \\param effort Effort to make when validating stream. Effort 0.0 does not even look at stream at all and effort 1.0 completely loads the file from stream. A lower effort requires less data to be loaded but only gives a rough estimate answer. Use an effort of 0.25 to only verify the header data of the module file."]
398    #[doc = " \\param logfunc Logging function where warning and errors are written. May be NULL."]
399    #[doc = " \\param user Logging function user context. Used to pass any user-defined data associated with this module to the logging function."]
400    #[doc = " \\return Probability between 0.0 and 1.0."]
401    #[doc = " \\remarks openmpt_could_open_probability() can return any value between 0.0 and 1.0. Only 0.0 and 1.0 are definitive answers, all values in between are just estimates. In general, any return value >0.0 means that you should try loading the file, and any value below 1.0 means that loading may fail. If you want a threshold above which you can be reasonably sure that libopenmpt will be able to load the file, use >=0.5. If you see the need for a threshold below which you could reasonably outright reject a file, use <0.25 (Note: Such a threshold for rejecting on the lower end is not recommended, but may be required for better integration into some other framework's probe scoring.)."]
402    #[doc = " \\remarks openmpt_could_open_probability() expects the complete file data to be eventually available to it, even if it is asked to just parse the header. Verification will be unreliable (both false positives and false negatives), if you pretend that the file is just some few bytes of initial data threshold in size. In order to really just access the first bytes of a file, check in your callback functions whether data or seeking is requested beyond your initial data threshold, and in that case, return an error. openmpt_could_open_probability() will treat this as any other I/O error and return 0.0. You must not expect the correct result in this case. You instead must remember that it asked for more data than you currently want to provide to it and treat this situation as if openmpt_could_open_probability() returned 0.5."]
403    #[doc = " \\sa \\ref libopenmpt_c_fileio"]
404    #[doc = " \\sa openmpt_stream_callbacks"]
405    #[doc = " \\deprecated Please use openmpt_could_open_probability2()."]
406    #[doc = " \\since 0.3.0"]
407    pub fn openmpt_could_open_probability(
408        stream_callbacks: openmpt_stream_callbacks,
409        stream: *mut ::std::os::raw::c_void,
410        effort: f64,
411        logfunc: openmpt_log_func,
412        user: *mut ::std::os::raw::c_void,
413    ) -> f64;
414}
415extern "C" {
416    #[doc = " \\brief Roughly scan the input stream to find out whether libopenmpt might be able to open it"]
417    #[doc = ""]
418    #[doc = " \\param stream_callbacks Input stream callback operations."]
419    #[doc = " \\param stream Input stream to scan."]
420    #[doc = " \\param effort Effort to make when validating stream. Effort 0.0 does not even look at stream at all and effort 1.0 completely loads the file from stream. A lower effort requires less data to be loaded but only gives a rough estimate answer. Use an effort of 0.25 to only verify the header data of the module file."]
421    #[doc = " \\param logfunc Logging function where warning and errors are written. May be NULL."]
422    #[doc = " \\param user Logging function user context. Used to pass any user-defined data associated with this module to the logging function."]
423    #[doc = " \\return Probability between 0.0 and 1.0."]
424    #[doc = " \\remarks openmpt_could_open_probability() can return any value between 0.0 and 1.0. Only 0.0 and 1.0 are definitive answers, all values in between are just estimates. In general, any return value >0.0 means that you should try loading the file, and any value below 1.0 means that loading may fail. If you want a threshold above which you can be reasonably sure that libopenmpt will be able to load the file, use >=0.5. If you see the need for a threshold below which you could reasonably outright reject a file, use <0.25 (Note: Such a threshold for rejecting on the lower end is not recommended, but may be required for better integration into some other framework's probe scoring.)."]
425    #[doc = " \\remarks openmpt_could_open_probability() expects the complete file data to be eventually available to it, even if it is asked to just parse the header. Verification will be unreliable (both false positives and false negatives), if you pretend that the file is just some few bytes of initial data threshold in size. In order to really just access the first bytes of a file, check in your callback functions whether data or seeking is requested beyond your initial data threshold, and in that case, return an error. openmpt_could_open_probability() will treat this as any other I/O error and return 0.0. You must not expect the correct result in this case. You instead must remember that it asked for more data than you currently want to provide to it and treat this situation as if openmpt_could_open_probability() returned 0.5."]
426    #[doc = " \\sa \\ref libopenmpt_c_fileio"]
427    #[doc = " \\sa openmpt_stream_callbacks"]
428    #[doc = " \\deprecated Please use openmpt_could_open_probability2()."]
429    pub fn openmpt_could_open_propability(
430        stream_callbacks: openmpt_stream_callbacks,
431        stream: *mut ::std::os::raw::c_void,
432        effort: f64,
433        logfunc: openmpt_log_func,
434        user: *mut ::std::os::raw::c_void,
435    ) -> f64;
436}
437extern "C" {
438    #[doc = " \\brief Roughly scan the input stream to find out whether libopenmpt might be able to open it"]
439    #[doc = ""]
440    #[doc = " \\param stream_callbacks Input stream callback operations."]
441    #[doc = " \\param stream Input stream to scan."]
442    #[doc = " \\param effort Effort to make when validating stream. Effort 0.0 does not even look at stream at all and effort 1.0 completely loads the file from stream. A lower effort requires less data to be loaded but only gives a rough estimate answer. Use an effort of 0.25 to only verify the header data of the module file."]
443    #[doc = " \\param logfunc Logging function where warning and errors are written. May be NULL."]
444    #[doc = " \\param loguser Logging function user context. Used to pass any user-defined data associated with this module to the logging function."]
445    #[doc = " \\param errfunc Error function to define error behaviour. May be NULL."]
446    #[doc = " \\param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function."]
447    #[doc = " \\param error Pointer to an integer where an error may get stored. May be NULL."]
448    #[doc = " \\param error_message Pointer to a string pointer where an error message may get stored. May be NULL."]
449    #[doc = " \\return Probability between 0.0 and 1.0."]
450    #[doc = " \\remarks openmpt_probe_file_header() or openmpt_probe_file_header_without_filesize() provide a simpler and faster interface that fits almost all use cases better. It is recommended to use openmpt_probe_file_header() or openmpt_probe_file_header_without_filesize() instead of openmpt_could_open_probability()."]
451    #[doc = " \\remarks openmpt_could_open_probability2() can return any value between 0.0 and 1.0. Only 0.0 and 1.0 are definitive answers, all values in between are just estimates. In general, any return value >0.0 means that you should try loading the file, and any value below 1.0 means that loading may fail. If you want a threshold above which you can be reasonably sure that libopenmpt will be able to load the file, use >=0.5. If you see the need for a threshold below which you could reasonably outright reject a file, use <0.25 (Note: Such a threshold for rejecting on the lower end is not recommended, but may be required for better integration into some other framework's probe scoring.)."]
452    #[doc = " \\remarks openmpt_could_open_probability2() expects the complete file data to be eventually available to it, even if it is asked to just parse the header. Verification will be unreliable (both false positives and false negatives), if you pretend that the file is just some few bytes of initial data threshold in size. In order to really just access the first bytes of a file, check in your callback functions whether data or seeking is requested beyond your initial data threshold, and in that case, return an error. openmpt_could_open_probability2() will treat this as any other I/O error and return 0.0. You must not expect the correct result in this case. You instead must remember that it asked for more data than you currently want to provide to it and treat this situation as if openmpt_could_open_probability2() returned 0.5. \\include libopenmpt_example_c_probe.c"]
453    #[doc = " \\sa \\ref libopenmpt_c_fileio"]
454    #[doc = " \\sa openmpt_stream_callbacks"]
455    #[doc = " \\sa openmpt_probe_file_header"]
456    #[doc = " \\sa openmpt_probe_file_header_without_filesize"]
457    #[doc = " \\since 0.3.0"]
458    pub fn openmpt_could_open_probability2(
459        stream_callbacks: openmpt_stream_callbacks,
460        stream: *mut ::std::os::raw::c_void,
461        effort: f64,
462        logfunc: openmpt_log_func,
463        loguser: *mut ::std::os::raw::c_void,
464        errfunc: openmpt_error_func,
465        erruser: *mut ::std::os::raw::c_void,
466        error: *mut ::std::os::raw::c_int,
467        error_message: *mut *const ::std::os::raw::c_char,
468    ) -> f64;
469}
470extern "C" {
471    #[doc = " \\brief Get recommended header size for successfull format probing"]
472    #[doc = ""]
473    #[doc = " \\sa openmpt_probe_file_header()"]
474    #[doc = " \\sa openmpt_probe_file_header_without_filesize()"]
475    #[doc = " \\since 0.3.0"]
476    pub fn openmpt_probe_file_header_get_recommended_size() -> usize;
477}
478extern "C" {
479    #[doc = " \\brief Probe the provided bytes from the beginning of a file for supported file format headers to find out whether libopenmpt might be able to open it"]
480    #[doc = ""]
481    #[doc = " \\param flags Bit mask of OPENMPT_PROBE_FILE_HEADER_FLAGS_MODULES and OPENMPT_PROBE_FILE_HEADER_FLAGS_CONTAINERS, or OPENMPT_PROBE_FILE_HEADER_FLAGS_DEFAULT."]
482    #[doc = " \\param data Beginning of the file data."]
483    #[doc = " \\param size Size of the beginning of the file data."]
484    #[doc = " \\param filesize Full size of the file data on disk."]
485    #[doc = " \\param logfunc Logging function where warning and errors are written. May be NULL."]
486    #[doc = " \\param loguser Logging function user context. Used to pass any user-defined data associated with this module to the logging function."]
487    #[doc = " \\param errfunc Error function to define error behaviour. May be NULL."]
488    #[doc = " \\param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function."]
489    #[doc = " \\param error Pointer to an integer where an error may get stored. May be NULL."]
490    #[doc = " \\param error_message Pointer to a string pointer where an error message may get stored. May be NULL."]
491    #[doc = " \\remarks It is recommended to provide openmpt_probe_file_header_get_recommended_size() bytes of data for data and size. If the file is smaller, only provide the filesize amount and set size and filesize to the file's size."]
492    #[doc = " \\remarks openmpt_could_open_probability2() provides a more elaborate interface that might be required for special use cases. It is recommended to use openmpt_probe_file_header() though, if possible."]
493    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_SUCCESS The file will most likely be supported by libopenmpt."]
494    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_FAILURE The file is not supported by libopenmpt."]
495    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_WANTMOREDATA An answer could not be determined with the amount of data provided."]
496    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_ERROR An internal error occurred."]
497    #[doc = " \\sa openmpt_probe_file_header_get_recommended_size()"]
498    #[doc = " \\sa openmpt_probe_file_header_without_filesize()"]
499    #[doc = " \\sa openmpt_probe_file_header_from_stream()"]
500    #[doc = " \\sa openmpt_could_open_probability2()"]
501    #[doc = " \\since 0.3.0"]
502    pub fn openmpt_probe_file_header(
503        flags: u64,
504        data: *const ::std::os::raw::c_void,
505        size: usize,
506        filesize: u64,
507        logfunc: openmpt_log_func,
508        loguser: *mut ::std::os::raw::c_void,
509        errfunc: openmpt_error_func,
510        erruser: *mut ::std::os::raw::c_void,
511        error: *mut ::std::os::raw::c_int,
512        error_message: *mut *const ::std::os::raw::c_char,
513    ) -> ::std::os::raw::c_int;
514}
515extern "C" {
516    #[doc = " \\brief Probe the provided bytes from the beginning of a file for supported file format headers to find out whether libopenmpt might be able to open it"]
517    #[doc = ""]
518    #[doc = " \\param flags Bit mask of OPENMPT_PROBE_FILE_HEADER_FLAGS_MODULES and OPENMPT_PROBE_FILE_HEADER_FLAGS_CONTAINERS, or OPENMPT_PROBE_FILE_HEADER_FLAGS_DEFAULT."]
519    #[doc = " \\param data Beginning of the file data."]
520    #[doc = " \\param size Size of the beginning of the file data."]
521    #[doc = " \\param logfunc Logging function where warning and errors are written. May be NULL."]
522    #[doc = " \\param loguser Logging function user context. Used to pass any user-defined data associated with this module to the logging function."]
523    #[doc = " \\param errfunc Error function to define error behaviour. May be NULL."]
524    #[doc = " \\param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function."]
525    #[doc = " \\param error Pointer to an integer where an error may get stored. May be NULL."]
526    #[doc = " \\param error_message Pointer to a string pointer where an error message may get stored. May be NULL."]
527    #[doc = " \\remarks It is recommended to use openmpt_probe_file_header() and provide the acutal file's size as a parameter if at all possible. libopenmpt can provide more accurate answers if the filesize is known."]
528    #[doc = " \\remarks It is recommended to provide openmpt_probe_file_header_get_recommended_size() bytes of data for data and size. If the file is smaller, only provide the filesize amount and set size to the file's size."]
529    #[doc = " \\remarks openmpt_could_open_probability2() provides a more elaborate interface that might be required for special use cases. It is recommended to use openmpt_probe_file_header() though, if possible."]
530    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_SUCCESS The file will most likely be supported by libopenmpt."]
531    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_FAILURE The file is not supported by libopenmpt."]
532    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_WANTMOREDATA An answer could not be determined with the amount of data provided."]
533    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_ERROR An internal error occurred."]
534    #[doc = " \\sa openmpt_probe_file_header_get_recommended_size()"]
535    #[doc = " \\sa openmpt_probe_file_header()"]
536    #[doc = " \\sa openmpt_probe_file_header_from_stream()"]
537    #[doc = " \\sa openmpt_could_open_probability2()"]
538    #[doc = " \\since 0.3.0"]
539    pub fn openmpt_probe_file_header_without_filesize(
540        flags: u64,
541        data: *const ::std::os::raw::c_void,
542        size: usize,
543        logfunc: openmpt_log_func,
544        loguser: *mut ::std::os::raw::c_void,
545        errfunc: openmpt_error_func,
546        erruser: *mut ::std::os::raw::c_void,
547        error: *mut ::std::os::raw::c_int,
548        error_message: *mut *const ::std::os::raw::c_char,
549    ) -> ::std::os::raw::c_int;
550}
551extern "C" {
552    #[doc = " \\brief Probe the provided bytes from the beginning of a file for supported file format headers to find out whether libopenmpt might be able to open it"]
553    #[doc = ""]
554    #[doc = " \\param flags Bit mask of OPENMPT_PROBE_FILE_HEADER_FLAGS_MODULES and OPENMPT_PROBE_FILE_HEADER_FLAGS_CONTAINERS, or OPENMPT_PROBE_FILE_HEADER_FLAGS_DEFAULT."]
555    #[doc = " \\param stream_callbacks Input stream callback operations."]
556    #[doc = " \\param stream Input stream to scan."]
557    #[doc = " \\param logfunc Logging function where warning and errors are written. May be NULL."]
558    #[doc = " \\param loguser Logging function user context. Used to pass any user-defined data associated with this module to the logging function."]
559    #[doc = " \\param errfunc Error function to define error behaviour. May be NULL."]
560    #[doc = " \\param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function."]
561    #[doc = " \\param error Pointer to an integer where an error may get stored. May be NULL."]
562    #[doc = " \\param error_message Pointer to a string pointer where an error message may get stored. May be NULL."]
563    #[doc = " \\remarks The stream is left in an unspecified state when this function returns."]
564    #[doc = " \\remarks It is recommended to provide openmpt_probe_file_header_get_recommended_size() bytes of data for data and size. If the file is smaller, only provide the filesize amount and set size and filesize to the file's size."]
565    #[doc = " \\remarks openmpt_could_open_probability2() provides a more elaborate interface that might be required for special use cases. It is recommended to use openmpt_probe_file_header() though, if possible."]
566    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_SUCCESS The file will most likely be supported by libopenmpt."]
567    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_FAILURE The file is not supported by libopenmpt."]
568    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_WANTMOREDATA An answer could not be determined with the amount of data provided."]
569    #[doc = " \\retval OPENMPT_PROBE_FILE_HEADER_RESULT_ERROR An internal error occurred."]
570    #[doc = " \\sa openmpt_probe_file_header_get_recommended_size()"]
571    #[doc = " \\sa openmpt_probe_file_header()"]
572    #[doc = " \\sa openmpt_probe_file_header_without_filesize()"]
573    #[doc = " \\sa openmpt_could_open_probability2()"]
574    #[doc = " \\since 0.3.0"]
575    pub fn openmpt_probe_file_header_from_stream(
576        flags: u64,
577        stream_callbacks: openmpt_stream_callbacks,
578        stream: *mut ::std::os::raw::c_void,
579        logfunc: openmpt_log_func,
580        loguser: *mut ::std::os::raw::c_void,
581        errfunc: openmpt_error_func,
582        erruser: *mut ::std::os::raw::c_void,
583        error: *mut ::std::os::raw::c_int,
584        error_message: *mut *const ::std::os::raw::c_char,
585    ) -> ::std::os::raw::c_int;
586}
587#[repr(C)]
588#[derive(Debug, Copy, Clone)]
589pub struct openmpt_module {
590    _unused: [u8; 0],
591}
592#[repr(C)]
593#[derive(Debug, Copy, Clone)]
594pub struct openmpt_module_initial_ctl {
595    pub ctl: *const ::std::os::raw::c_char,
596    pub value: *const ::std::os::raw::c_char,
597}
598#[test]
599fn bindgen_test_layout_openmpt_module_initial_ctl() {
600    assert_eq!(
601        ::std::mem::size_of::<openmpt_module_initial_ctl>(),
602        16usize,
603        concat!("Size of: ", stringify!(openmpt_module_initial_ctl))
604    );
605    assert_eq!(
606        ::std::mem::align_of::<openmpt_module_initial_ctl>(),
607        8usize,
608        concat!("Alignment of ", stringify!(openmpt_module_initial_ctl))
609    );
610    fn test_field_ctl() {
611        assert_eq!(
612            unsafe {
613                let uninit = ::std::mem::MaybeUninit::<openmpt_module_initial_ctl>::uninit();
614                let ptr = uninit.as_ptr();
615                ::std::ptr::addr_of!((*ptr).ctl) as usize - ptr as usize
616            },
617            0usize,
618            concat!(
619                "Offset of field: ",
620                stringify!(openmpt_module_initial_ctl),
621                "::",
622                stringify!(ctl)
623            )
624        );
625    }
626    test_field_ctl();
627    fn test_field_value() {
628        assert_eq!(
629            unsafe {
630                let uninit = ::std::mem::MaybeUninit::<openmpt_module_initial_ctl>::uninit();
631                let ptr = uninit.as_ptr();
632                ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize
633            },
634            8usize,
635            concat!(
636                "Offset of field: ",
637                stringify!(openmpt_module_initial_ctl),
638                "::",
639                stringify!(value)
640            )
641        );
642    }
643    test_field_value();
644}
645extern "C" {
646    #[doc = " \\brief Construct an openmpt_module"]
647    #[doc = ""]
648    #[doc = " \\param stream_callbacks Input stream callback operations."]
649    #[doc = " \\param stream Input stream to load the module from."]
650    #[doc = " \\param logfunc Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module. May be NULL."]
651    #[doc = " \\param loguser User-defined data associated with this module. This value will be passed to the logging callback function (logfunc)"]
652    #[doc = " \\param ctls A map of initial ctl values. See openmpt_module_get_ctls()"]
653    #[doc = " \\return A pointer to the constructed openmpt_module, or NULL on failure."]
654    #[doc = " \\remarks The input data can be discarded after an openmpt_module has been constructed successfully."]
655    #[doc = " \\sa openmpt_stream_callbacks"]
656    #[doc = " \\sa \\ref libopenmpt_c_fileio"]
657    #[doc = " \\deprecated Please use openmpt_module_create2()."]
658    pub fn openmpt_module_create(
659        stream_callbacks: openmpt_stream_callbacks,
660        stream: *mut ::std::os::raw::c_void,
661        logfunc: openmpt_log_func,
662        loguser: *mut ::std::os::raw::c_void,
663        ctls: *const openmpt_module_initial_ctl,
664    ) -> *mut openmpt_module;
665}
666extern "C" {
667    #[doc = " \\brief Construct an openmpt_module"]
668    #[doc = ""]
669    #[doc = " \\param stream_callbacks Input stream callback operations."]
670    #[doc = " \\param stream Input stream to load the module from."]
671    #[doc = " \\param logfunc Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module. May be NULL."]
672    #[doc = " \\param loguser User-defined data associated with this module. This value will be passed to the logging callback function (logfunc)"]
673    #[doc = " \\param errfunc Error function to define error behaviour. May be NULL."]
674    #[doc = " \\param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function."]
675    #[doc = " \\param error Pointer to an integer where an error may get stored. May be NULL."]
676    #[doc = " \\param error_message Pointer to a string pointer where an error message may get stored. May be NULL."]
677    #[doc = " \\param ctls A map of initial ctl values. See openmpt_module_get_ctls()"]
678    #[doc = " \\return A pointer to the constructed openmpt_module, or NULL on failure."]
679    #[doc = " \\remarks The input data can be discarded after an openmpt_module has been constructed successfully."]
680    #[doc = " \\sa openmpt_stream_callbacks"]
681    #[doc = " \\sa \\ref libopenmpt_c_fileio"]
682    #[doc = " \\since 0.3.0"]
683    pub fn openmpt_module_create2(
684        stream_callbacks: openmpt_stream_callbacks,
685        stream: *mut ::std::os::raw::c_void,
686        logfunc: openmpt_log_func,
687        loguser: *mut ::std::os::raw::c_void,
688        errfunc: openmpt_error_func,
689        erruser: *mut ::std::os::raw::c_void,
690        error: *mut ::std::os::raw::c_int,
691        error_message: *mut *const ::std::os::raw::c_char,
692        ctls: *const openmpt_module_initial_ctl,
693    ) -> *mut openmpt_module;
694}
695extern "C" {
696    #[doc = " \\brief Construct an openmpt_module"]
697    #[doc = ""]
698    #[doc = " \\param filedata Data to load the module from."]
699    #[doc = " \\param filesize Amount of data available."]
700    #[doc = " \\param logfunc Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module."]
701    #[doc = " \\param loguser User-defined data associated with this module. This value will be passed to the logging callback function (logfunc)"]
702    #[doc = " \\param ctls A map of initial ctl values. See openmpt_module_get_ctls()"]
703    #[doc = " \\return A pointer to the constructed openmpt_module, or NULL on failure."]
704    #[doc = " \\remarks The input data can be discarded after an openmpt_module has been constructed successfully."]
705    #[doc = " \\sa \\ref libopenmpt_c_fileio"]
706    #[doc = " \\deprecated Please use openmpt_module_create_from_memory2()."]
707    pub fn openmpt_module_create_from_memory(
708        filedata: *const ::std::os::raw::c_void,
709        filesize: usize,
710        logfunc: openmpt_log_func,
711        loguser: *mut ::std::os::raw::c_void,
712        ctls: *const openmpt_module_initial_ctl,
713    ) -> *mut openmpt_module;
714}
715extern "C" {
716    #[doc = " \\brief Construct an openmpt_module"]
717    #[doc = ""]
718    #[doc = " \\param filedata Data to load the module from."]
719    #[doc = " \\param filesize Amount of data available."]
720    #[doc = " \\param logfunc Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module."]
721    #[doc = " \\param loguser User-defined data associated with this module. This value will be passed to the logging callback function (logfunc)"]
722    #[doc = " \\param errfunc Error function to define error behaviour. May be NULL."]
723    #[doc = " \\param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function."]
724    #[doc = " \\param error Pointer to an integer where an error may get stored. May be NULL."]
725    #[doc = " \\param error_message Pointer to a string pointer where an error message may get stored. May be NULL."]
726    #[doc = " \\param ctls A map of initial ctl values. See openmpt_module_get_ctls()"]
727    #[doc = " \\return A pointer to the constructed openmpt_module, or NULL on failure."]
728    #[doc = " \\remarks The input data can be discarded after an openmpt_module has been constructed successfully."]
729    #[doc = " \\sa \\ref libopenmpt_c_fileio"]
730    #[doc = " \\since 0.3.0"]
731    pub fn openmpt_module_create_from_memory2(
732        filedata: *const ::std::os::raw::c_void,
733        filesize: usize,
734        logfunc: openmpt_log_func,
735        loguser: *mut ::std::os::raw::c_void,
736        errfunc: openmpt_error_func,
737        erruser: *mut ::std::os::raw::c_void,
738        error: *mut ::std::os::raw::c_int,
739        error_message: *mut *const ::std::os::raw::c_char,
740        ctls: *const openmpt_module_initial_ctl,
741    ) -> *mut openmpt_module;
742}
743extern "C" {
744    #[doc = " \\brief Unload a previously created openmpt_module from memory."]
745    #[doc = ""]
746    #[doc = " \\param mod The module to unload."]
747    pub fn openmpt_module_destroy(mod_: *mut openmpt_module);
748}
749extern "C" {
750    #[doc = " \\brief Set logging function."]
751    #[doc = ""]
752    #[doc = " Set the logging function of an already constructed openmpt_module."]
753    #[doc = " \\param mod The module handle to work on."]
754    #[doc = " \\param logfunc Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module."]
755    #[doc = " \\param loguser User-defined data associated with this module. This value will be passed to the logging callback function (logfunc)"]
756    #[doc = " \\since 0.3.0"]
757    pub fn openmpt_module_set_log_func(
758        mod_: *mut openmpt_module,
759        logfunc: openmpt_log_func,
760        loguser: *mut ::std::os::raw::c_void,
761    );
762}
763extern "C" {
764    #[doc = " \\brief Set error function."]
765    #[doc = ""]
766    #[doc = " Set the error function of an already constructed openmpt_module."]
767    #[doc = " \\param mod The module handle to work on."]
768    #[doc = " \\param errfunc Error function to define error behaviour. May be NULL."]
769    #[doc = " \\param erruser Error function user context."]
770    #[doc = " \\since 0.3.0"]
771    pub fn openmpt_module_set_error_func(
772        mod_: *mut openmpt_module,
773        errfunc: openmpt_error_func,
774        erruser: *mut ::std::os::raw::c_void,
775    );
776}
777extern "C" {
778    #[doc = " \\brief Get last error."]
779    #[doc = ""]
780    #[doc = " Return the error currently stored in an openmpt_module. The stored error is not cleared."]
781    #[doc = " \\param mod The module handle to work on."]
782    #[doc = " \\return The error currently stored."]
783    #[doc = " \\sa openmpt_module_error_get_last_message"]
784    #[doc = " \\sa openmpt_module_error_set_last"]
785    #[doc = " \\sa openmpt_module_error_clear"]
786    #[doc = " \\since 0.3.0"]
787    pub fn openmpt_module_error_get_last(mod_: *mut openmpt_module) -> ::std::os::raw::c_int;
788}
789extern "C" {
790    #[doc = " \\brief Get last error message."]
791    #[doc = ""]
792    #[doc = " Return the error message currently stored in an openmpt_module. The stored error is not cleared."]
793    #[doc = " \\param mod The module handle to work on."]
794    #[doc = " \\return The error message currently stored."]
795    #[doc = " \\sa openmpt_module_error_set_last"]
796    #[doc = " \\sa openmpt_module_error_clear"]
797    #[doc = " \\since 0.3.0"]
798    pub fn openmpt_module_error_get_last_message(
799        mod_: *mut openmpt_module,
800    ) -> *const ::std::os::raw::c_char;
801}
802extern "C" {
803    #[doc = " \\brief Set last error."]
804    #[doc = ""]
805    #[doc = " Set the error currently stored in an openmpt_module."]
806    #[doc = " \\param mod The module handle to work on."]
807    #[doc = " \\param error Error to be stored."]
808    #[doc = " \\sa openmpt_module_error_get_last"]
809    #[doc = " \\sa openmpt_module_error_clear"]
810    #[doc = " \\since 0.3.0"]
811    pub fn openmpt_module_error_set_last(mod_: *mut openmpt_module, error: ::std::os::raw::c_int);
812}
813extern "C" {
814    #[doc = " \\brief Clear last error."]
815    #[doc = ""]
816    #[doc = " Set the error currently stored in an openmpt_module to OPPENMPT_ERROR_OK."]
817    #[doc = " \\param mod The module handle to work on."]
818    #[doc = " \\sa openmpt_module_error_get_last"]
819    #[doc = " \\sa openmpt_module_error_set_last"]
820    #[doc = " \\since 0.3.0"]
821    pub fn openmpt_module_error_clear(mod_: *mut openmpt_module);
822}
823extern "C" {
824    #[doc = " \\brief Select a sub-song from a multi-song module"]
825    #[doc = ""]
826    #[doc = " \\param mod The module handle to work on."]
827    #[doc = " \\param subsong Index of the sub-song. -1 plays all sub-songs consecutively."]
828    #[doc = " \\return 1 on success, 0 on failure."]
829    #[doc = " \\sa openmpt_module_get_num_subsongs, openmpt_module_get_selected_subsong, openmpt_module_get_subsong_name"]
830    #[doc = " \\remarks Whether subsong -1 (all subsongs consecutively), subsong 0 or some other subsong is selected by default, is an implementation detail and subject to change. If you do not want to care about subsongs, it is recommended to just not call openmpt_module_select_subsong() at all."]
831    pub fn openmpt_module_select_subsong(
832        mod_: *mut openmpt_module,
833        subsong: i32,
834    ) -> ::std::os::raw::c_int;
835}
836extern "C" {
837    #[doc = " \\brief Get currently selected sub-song from a multi-song module"]
838    #[doc = ""]
839    #[doc = " \\param mod The module handle to work on."]
840    #[doc = " \\return Currently selected sub-song. -1 for all subsongs consecutively, 0 or greater for the current sub-song index."]
841    #[doc = " \\sa openmpt_module_get_num_subsongs, openmpt_module_select_subsong, openmpt_module_get_subsong_name"]
842    #[doc = " \\since 0.3.0"]
843    pub fn openmpt_module_get_selected_subsong(mod_: *mut openmpt_module) -> i32;
844}
845extern "C" {
846    #[doc = " \\brief Set Repeat Count"]
847    #[doc = ""]
848    #[doc = " \\param mod The module handle to work on."]
849    #[doc = " \\param repeat_count Repeat Count"]
850    #[doc = "   - -1: repeat forever"]
851    #[doc = "   - 0: play once, repeat zero times (the default)"]
852    #[doc = "   - n>0: play once and repeat n times after that"]
853    #[doc = " \\return 1 on success, 0 on failure."]
854    #[doc = " \\sa openmpt_module_get_repeat_count"]
855    pub fn openmpt_module_set_repeat_count(
856        mod_: *mut openmpt_module,
857        repeat_count: i32,
858    ) -> ::std::os::raw::c_int;
859}
860extern "C" {
861    #[doc = " \\brief Get Repeat Count"]
862    #[doc = ""]
863    #[doc = " \\param mod The module handle to work on."]
864    #[doc = " \\return Repeat Count"]
865    #[doc = "   - -1: repeat forever"]
866    #[doc = "   - 0: play once, repeat zero times (the default)"]
867    #[doc = "   - n>0: play once and repeat n times after that"]
868    #[doc = " \\sa openmpt_module_set_repeat_count"]
869    pub fn openmpt_module_get_repeat_count(mod_: *mut openmpt_module) -> i32;
870}
871extern "C" {
872    #[doc = " \\brief approximate song duration"]
873    #[doc = ""]
874    #[doc = " \\param mod The module handle to work on."]
875    #[doc = " \\return Approximate duration of current sub-song in seconds."]
876    #[doc = " \\remarks The function may return infinity if the pattern data is too complex to evaluate."]
877    pub fn openmpt_module_get_duration_seconds(mod_: *mut openmpt_module) -> f64;
878}
879extern "C" {
880    #[doc = " \\brief Set approximate current song position"]
881    #[doc = ""]
882    #[doc = " \\param mod The module handle to work on."]
883    #[doc = " \\param seconds Seconds to seek to. If seconds is out of range, the position gets set to song start or end respectively."]
884    #[doc = " \\return Approximate new song position in seconds."]
885    #[doc = " \\sa openmpt_module_get_position_seconds"]
886    pub fn openmpt_module_set_position_seconds(mod_: *mut openmpt_module, seconds: f64) -> f64;
887}
888extern "C" {
889    #[doc = " \\brief Get current song position"]
890    #[doc = ""]
891    #[doc = " \\param mod The module handle to work on."]
892    #[doc = " \\return Current song position in seconds."]
893    #[doc = " \\sa openmpt_module_set_position_seconds"]
894    pub fn openmpt_module_get_position_seconds(mod_: *mut openmpt_module) -> f64;
895}
896extern "C" {
897    #[doc = " \\brief Set approximate current song position"]
898    #[doc = ""]
899    #[doc = " If order or row are out of range, to position is not modified and the current position is returned."]
900    #[doc = " \\param mod The module handle to work on."]
901    #[doc = " \\param order Pattern order number to seek to."]
902    #[doc = " \\param row Pattern row number to seek to."]
903    #[doc = " \\return Approximate new song position in seconds."]
904    #[doc = " \\sa openmpt_module_set_position_seconds"]
905    #[doc = " \\sa openmpt_module_get_position_seconds"]
906    pub fn openmpt_module_set_position_order_row(
907        mod_: *mut openmpt_module,
908        order: i32,
909        row: i32,
910    ) -> f64;
911}
912extern "C" {
913    #[doc = " \\brief Get render parameter"]
914    #[doc = ""]
915    #[doc = " \\param mod The module handle to work on."]
916    #[doc = " \\param param Parameter to query. See \\ref openmpt_module_render_param"]
917    #[doc = " \\param value Pointer to the variable that receives the current value of the parameter."]
918    #[doc = " \\return 1 on success, 0 on failure (invalid param or value is NULL)."]
919    #[doc = " \\sa OPENMPT_MODULE_RENDER_MASTERGAIN_MILLIBEL"]
920    #[doc = " \\sa OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT"]
921    #[doc = " \\sa OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH"]
922    #[doc = " \\sa OPENMPT_MODULE_RENDER_VOLUMERAMPING_STRENGTH"]
923    #[doc = " \\sa openmpt_module_set_render_param"]
924    pub fn openmpt_module_get_render_param(
925        mod_: *mut openmpt_module,
926        param: ::std::os::raw::c_int,
927        value: *mut i32,
928    ) -> ::std::os::raw::c_int;
929}
930extern "C" {
931    #[doc = " \\brief Set render parameter"]
932    #[doc = ""]
933    #[doc = " \\param mod The module handle to work on."]
934    #[doc = " \\param param Parameter to set. See \\ref openmpt_module_render_param"]
935    #[doc = " \\param value The value to set param to."]
936    #[doc = " \\return 1 on success, 0 on failure (invalid param)."]
937    #[doc = " \\sa OPENMPT_MODULE_RENDER_MASTERGAIN_MILLIBEL"]
938    #[doc = " \\sa OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT"]
939    #[doc = " \\sa OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH"]
940    #[doc = " \\sa OPENMPT_MODULE_RENDER_VOLUMERAMPING_STRENGTH"]
941    #[doc = " \\sa openmpt_module_get_render_param"]
942    pub fn openmpt_module_set_render_param(
943        mod_: *mut openmpt_module,
944        param: ::std::os::raw::c_int,
945        value: i32,
946    ) -> ::std::os::raw::c_int;
947}
948extern "C" {
949    #[doc = " \\brief Render audio data"]
950    #[doc = ""]
951    #[doc = " \\param mod The module handle to work on."]
952    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
953    #[doc = " \\param count Number of audio frames to render per channel."]
954    #[doc = " \\param mono Pointer to a buffer of at least count elements that receives the mono/center output."]
955    #[doc = " \\return The number of frames actually rendered."]
956    #[doc = " \\retval 0 The end of song has been reached."]
957    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
958    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
959    #[doc = " \\remarks It is recommended to use the floating point API because of the greater dynamic range and no implied clipping."]
960    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
961    pub fn openmpt_module_read_mono(
962        mod_: *mut openmpt_module,
963        samplerate: i32,
964        count: usize,
965        mono: *mut i16,
966    ) -> usize;
967}
968extern "C" {
969    #[doc = " \\brief Render audio data"]
970    #[doc = ""]
971    #[doc = " \\param mod The module handle to work on."]
972    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
973    #[doc = " \\param count Number of audio frames to render per channel."]
974    #[doc = " \\param left Pointer to a buffer of at least count elements that receives the left output."]
975    #[doc = " \\param right Pointer to a buffer of at least count elements that receives the right output."]
976    #[doc = " \\return The number of frames actually rendered."]
977    #[doc = " \\retval 0 The end of song has been reached."]
978    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
979    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
980    #[doc = " \\remarks It is recommended to use the floating point API because of the greater dynamic range and no implied clipping."]
981    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
982    pub fn openmpt_module_read_stereo(
983        mod_: *mut openmpt_module,
984        samplerate: i32,
985        count: usize,
986        left: *mut i16,
987        right: *mut i16,
988    ) -> usize;
989}
990extern "C" {
991    #[doc = " \\brief Render audio data"]
992    #[doc = ""]
993    #[doc = " \\param mod The module handle to work on."]
994    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
995    #[doc = " \\param count Number of audio frames to render per channel."]
996    #[doc = " \\param left Pointer to a buffer of at least count elements that receives the left output."]
997    #[doc = " \\param right Pointer to a buffer of at least count elements that receives the right output."]
998    #[doc = " \\param rear_left Pointer to a buffer of at least count elements that receives the rear left output."]
999    #[doc = " \\param rear_right Pointer to a buffer of at least count elements that receives the rear right output."]
1000    #[doc = " \\return The number of frames actually rendered."]
1001    #[doc = " \\retval 0 The end of song has been reached."]
1002    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
1003    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
1004    #[doc = " \\remarks It is recommended to use the floating point API because of the greater dynamic range and no implied clipping."]
1005    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
1006    pub fn openmpt_module_read_quad(
1007        mod_: *mut openmpt_module,
1008        samplerate: i32,
1009        count: usize,
1010        left: *mut i16,
1011        right: *mut i16,
1012        rear_left: *mut i16,
1013        rear_right: *mut i16,
1014    ) -> usize;
1015}
1016extern "C" {
1017    #[doc = " \\brief Render audio data"]
1018    #[doc = ""]
1019    #[doc = " \\param mod The module handle to work on."]
1020    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
1021    #[doc = " \\param count Number of audio frames to render per channel."]
1022    #[doc = " \\param mono Pointer to a buffer of at least count elements that receives the mono/center output."]
1023    #[doc = " \\return The number of frames actually rendered."]
1024    #[doc = " \\retval 0 The end of song has been reached."]
1025    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
1026    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
1027    #[doc = " \\remarks Floating point samples are in the [-1.0..1.0] nominal range. They are not clipped to that range though and thus might overshoot."]
1028    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
1029    pub fn openmpt_module_read_float_mono(
1030        mod_: *mut openmpt_module,
1031        samplerate: i32,
1032        count: usize,
1033        mono: *mut f32,
1034    ) -> usize;
1035}
1036extern "C" {
1037    #[doc = " \\brief Render audio data"]
1038    #[doc = ""]
1039    #[doc = " \\param mod The module handle to work on."]
1040    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
1041    #[doc = " \\param count Number of audio frames to render per channel."]
1042    #[doc = " \\param left Pointer to a buffer of at least count elements that receives the left output."]
1043    #[doc = " \\param right Pointer to a buffer of at least count elements that receives the right output."]
1044    #[doc = " \\return The number of frames actually rendered."]
1045    #[doc = " \\retval 0 The end of song has been reached."]
1046    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
1047    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
1048    #[doc = " \\remarks Floating point samples are in the [-1.0..1.0] nominal range. They are not clipped to that range though and thus might overshoot."]
1049    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
1050    pub fn openmpt_module_read_float_stereo(
1051        mod_: *mut openmpt_module,
1052        samplerate: i32,
1053        count: usize,
1054        left: *mut f32,
1055        right: *mut f32,
1056    ) -> usize;
1057}
1058extern "C" {
1059    #[doc = " \\brief Render audio data"]
1060    #[doc = ""]
1061    #[doc = " \\param mod The module handle to work on."]
1062    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
1063    #[doc = " \\param count Number of audio frames to render per channel."]
1064    #[doc = " \\param left Pointer to a buffer of at least count elements that receives the left output."]
1065    #[doc = " \\param right Pointer to a buffer of at least count elements that receives the right output."]
1066    #[doc = " \\param rear_left Pointer to a buffer of at least count elements that receives the rear left output."]
1067    #[doc = " \\param rear_right Pointer to a buffer of at least count elements that receives the rear right output."]
1068    #[doc = " \\return The number of frames actually rendered."]
1069    #[doc = " \\retval 0 The end of song has been reached."]
1070    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
1071    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
1072    #[doc = " \\remarks Floating point samples are in the [-1.0..1.0] nominal range. They are not clipped to that range though and thus might overshoot."]
1073    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
1074    pub fn openmpt_module_read_float_quad(
1075        mod_: *mut openmpt_module,
1076        samplerate: i32,
1077        count: usize,
1078        left: *mut f32,
1079        right: *mut f32,
1080        rear_left: *mut f32,
1081        rear_right: *mut f32,
1082    ) -> usize;
1083}
1084extern "C" {
1085    #[doc = " \\brief Render audio data"]
1086    #[doc = ""]
1087    #[doc = " \\param mod The module handle to work on."]
1088    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
1089    #[doc = " \\param count Number of audio frames to render per channel."]
1090    #[doc = " \\param interleaved_stereo Pointer to a buffer of at least count*2 elements that receives the interleaved stereo output in the order (L,R)."]
1091    #[doc = " \\return The number of frames actually rendered."]
1092    #[doc = " \\retval 0 The end of song has been reached."]
1093    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
1094    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
1095    #[doc = " \\remarks It is recommended to use the floating point API because of the greater dynamic range and no implied clipping."]
1096    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
1097    pub fn openmpt_module_read_interleaved_stereo(
1098        mod_: *mut openmpt_module,
1099        samplerate: i32,
1100        count: usize,
1101        interleaved_stereo: *mut i16,
1102    ) -> usize;
1103}
1104extern "C" {
1105    #[doc = " \\brief Render audio data"]
1106    #[doc = ""]
1107    #[doc = " \\param mod The module handle to work on."]
1108    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
1109    #[doc = " \\param count Number of audio frames to render per channel."]
1110    #[doc = " \\param interleaved_quad Pointer to a buffer of at least count*4 elements that receives the interleaved quad surround output in the order (L,R,RL,RR)."]
1111    #[doc = " \\return The number of frames actually rendered."]
1112    #[doc = " \\retval 0 The end of song has been reached."]
1113    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
1114    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
1115    #[doc = " \\remarks It is recommended to use the floating point API because of the greater dynamic range and no implied clipping."]
1116    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
1117    pub fn openmpt_module_read_interleaved_quad(
1118        mod_: *mut openmpt_module,
1119        samplerate: i32,
1120        count: usize,
1121        interleaved_quad: *mut i16,
1122    ) -> usize;
1123}
1124extern "C" {
1125    #[doc = " \\brief Render audio data"]
1126    #[doc = ""]
1127    #[doc = " \\param mod The module handle to work on."]
1128    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
1129    #[doc = " \\param count Number of audio frames to render per channel."]
1130    #[doc = " \\param interleaved_stereo Pointer to a buffer of at least count*2 elements that receives the interleaved stereo output in the order (L,R)."]
1131    #[doc = " \\return The number of frames actually rendered."]
1132    #[doc = " \\retval 0 The end of song has been reached."]
1133    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
1134    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
1135    #[doc = " \\remarks Floating point samples are in the [-1.0..1.0] nominal range. They are not clipped to that range though and thus might overshoot."]
1136    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
1137    pub fn openmpt_module_read_interleaved_float_stereo(
1138        mod_: *mut openmpt_module,
1139        samplerate: i32,
1140        count: usize,
1141        interleaved_stereo: *mut f32,
1142    ) -> usize;
1143}
1144extern "C" {
1145    #[doc = " \\brief Render audio data"]
1146    #[doc = ""]
1147    #[doc = " \\param mod The module handle to work on."]
1148    #[doc = " \\param samplerate Sample rate to render output. Should be in [8000,192000], but this is not enforced."]
1149    #[doc = " \\param count Number of audio frames to render per channel."]
1150    #[doc = " \\param interleaved_quad Pointer to a buffer of at least count*4 elements that receives the interleaved quad surround output in the order (L,R,RL,RR)."]
1151    #[doc = " \\return The number of frames actually rendered."]
1152    #[doc = " \\retval 0 The end of song has been reached."]
1153    #[doc = " \\remarks The output buffers are only written to up to the returned number of elements."]
1154    #[doc = " \\remarks You can freely switch between any of the \"openmpt_module_read*\" variants if you see a need to do so. libopenmpt tries to introduce as little switching annoyances as possible. Normally, you would only use a single one of these functions for rendering a particular module."]
1155    #[doc = " \\remarks Floating point samples are in the [-1.0..1.0] nominal range. They are not clipped to that range though and thus might overshoot."]
1156    #[doc = " \\sa \\ref libopenmpt_c_outputformat"]
1157    pub fn openmpt_module_read_interleaved_float_quad(
1158        mod_: *mut openmpt_module,
1159        samplerate: i32,
1160        count: usize,
1161        interleaved_quad: *mut f32,
1162    ) -> usize;
1163}
1164extern "C" {
1165    #[doc = " \\brief Get the list of supported metadata item keys"]
1166    #[doc = ""]
1167    #[doc = " \\param mod The module handle to work on."]
1168    #[doc = " \\return Metadata item keys supported by openmpt_module_get_metadata, as a semicolon-separated list."]
1169    #[doc = " \\sa openmpt_module_get_metadata"]
1170    pub fn openmpt_module_get_metadata_keys(
1171        mod_: *mut openmpt_module,
1172    ) -> *const ::std::os::raw::c_char;
1173}
1174extern "C" {
1175    #[doc = " \\brief Get a metadata item value"]
1176    #[doc = ""]
1177    #[doc = " \\param mod The module handle to work on."]
1178    #[doc = " \\param key Metadata item key to query. Use openmpt_module_get_metadata_keys to check for available keys."]
1179    #[doc = "          Possible keys are:"]
1180    #[doc = "          - type: Module format extension (e.g. it) or another similar identifier for modules formats that typically do not use a file extension"]
1181    #[doc = "          - type_long: Format name associated with the module format (e.g. Impulse Tracker)"]
1182    #[doc = "          - originaltype: Module format extension (e.g. it) of the original module in case the actual type is a converted format (e.g. mo3 or gdm)"]
1183    #[doc = "          - originaltype_long: Format name associated with the module format (e.g. Impulse Tracker) of the original module in case the actual type is a converted format (e.g. mo3 or gdm)"]
1184    #[doc = "          - container: Container format the module file is embedded in, if any (e.g. umx)"]
1185    #[doc = "          - container_long: Full container name if the module is embedded in a container (e.g. Unreal Music)"]
1186    #[doc = "          - tracker: Tracker that was (most likely) used to save the module file, if known"]
1187    #[doc = "          - artist: Author of the module"]
1188    #[doc = "          - title: Module title"]
1189    #[doc = "          - date: Date the module was last saved, in ISO-8601 format."]
1190    #[doc = "          - message: Song message. If the song message is empty or the module format does not support song messages, a list of instrument and sample names is returned instead."]
1191    #[doc = "          - message_raw: Song message. If the song message is empty or the module format does not support song messages, an empty string is returned."]
1192    #[doc = "          - warnings: A list of warnings that were generated while loading the module."]
1193    #[doc = " \\return The associated value for key."]
1194    #[doc = " \\sa openmpt_module_get_metadata_keys"]
1195    pub fn openmpt_module_get_metadata(
1196        mod_: *mut openmpt_module,
1197        key: *const ::std::os::raw::c_char,
1198    ) -> *const ::std::os::raw::c_char;
1199}
1200extern "C" {
1201    #[doc = " Get the current estimated beats per minute (BPM)."]
1202    #[doc = ""]
1203    #[doc = " \\param mod The module handle to work on."]
1204    #[doc = " \\remarks Many module formats lack time signature metadata. It is common that this estimate is off by a factor of two, but other multipliers are also possible."]
1205    #[doc = " \\remarks Due to the nature of how module tempo works, the estimate may change slightly after switching libopenmpt's output to a different sample rate."]
1206    #[doc = " \\return The current estimated BPM."]
1207    pub fn openmpt_module_get_current_estimated_bpm(mod_: *mut openmpt_module) -> f64;
1208}
1209extern "C" {
1210    #[doc = " \\brief Get the current speed"]
1211    #[doc = ""]
1212    #[doc = " \\param mod The module handle to work on."]
1213    #[doc = " \\return The current speed in ticks per row."]
1214    pub fn openmpt_module_get_current_speed(mod_: *mut openmpt_module) -> i32;
1215}
1216extern "C" {
1217    #[doc = " \\brief Get the current tempo"]
1218    #[doc = ""]
1219    #[doc = " \\param mod The module handle to work on."]
1220    #[doc = " \\return The current tempo in tracker units. The exact meaning of this value depends on the tempo mode being used."]
1221    pub fn openmpt_module_get_current_tempo(mod_: *mut openmpt_module) -> i32;
1222}
1223extern "C" {
1224    #[doc = " \\brief Get the current order"]
1225    #[doc = ""]
1226    #[doc = " \\param mod The module handle to work on."]
1227    #[doc = " \\return The current order at which the module is being played back."]
1228    pub fn openmpt_module_get_current_order(mod_: *mut openmpt_module) -> i32;
1229}
1230extern "C" {
1231    #[doc = " \\brief Get the current pattern"]
1232    #[doc = ""]
1233    #[doc = " \\param mod The module handle to work on."]
1234    #[doc = " \\return The current pattern that is being played."]
1235    pub fn openmpt_module_get_current_pattern(mod_: *mut openmpt_module) -> i32;
1236}
1237extern "C" {
1238    #[doc = " \\brief Get the current row"]
1239    #[doc = ""]
1240    #[doc = " \\param mod The module handle to work on."]
1241    #[doc = " \\return The current row at which the current pattern is being played."]
1242    pub fn openmpt_module_get_current_row(mod_: *mut openmpt_module) -> i32;
1243}
1244extern "C" {
1245    #[doc = " \\brief Get the current amount of playing channels."]
1246    #[doc = ""]
1247    #[doc = " \\param mod The module handle to work on."]
1248    #[doc = " \\return The amount of sample channels that are currently being rendered."]
1249    pub fn openmpt_module_get_current_playing_channels(mod_: *mut openmpt_module) -> i32;
1250}
1251extern "C" {
1252    #[doc = " \\brief Get an approximate indication of the channel volume."]
1253    #[doc = ""]
1254    #[doc = " \\param mod The module handle to work on."]
1255    #[doc = " \\param channel The channel whose volume should be retrieved."]
1256    #[doc = " \\return The approximate channel volume."]
1257    #[doc = " \\remarks The returned value is solely based on the note velocity and does not take the actual waveform of the playing sample into account."]
1258    pub fn openmpt_module_get_current_channel_vu_mono(
1259        mod_: *mut openmpt_module,
1260        channel: i32,
1261    ) -> f32;
1262}
1263extern "C" {
1264    #[doc = " \\brief Get an approximate indication of the channel volume on the front-left speaker."]
1265    #[doc = ""]
1266    #[doc = " \\param mod The module handle to work on."]
1267    #[doc = " \\param channel The channel whose volume should be retrieved."]
1268    #[doc = " \\return The approximate channel volume."]
1269    #[doc = " \\remarks The returned value is solely based on the note velocity and does not take the actual waveform of the playing sample into account."]
1270    pub fn openmpt_module_get_current_channel_vu_left(
1271        mod_: *mut openmpt_module,
1272        channel: i32,
1273    ) -> f32;
1274}
1275extern "C" {
1276    #[doc = " \\brief Get an approximate indication of the channel volume on the front-right speaker."]
1277    #[doc = ""]
1278    #[doc = " \\param mod The module handle to work on."]
1279    #[doc = " \\param channel The channel whose volume should be retrieved."]
1280    #[doc = " \\return The approximate channel volume."]
1281    #[doc = " \\remarks The returned value is solely based on the note velocity and does not take the actual waveform of the playing sample into account."]
1282    pub fn openmpt_module_get_current_channel_vu_right(
1283        mod_: *mut openmpt_module,
1284        channel: i32,
1285    ) -> f32;
1286}
1287extern "C" {
1288    #[doc = " \\brief Get an approximate indication of the channel volume on the rear-left speaker."]
1289    #[doc = ""]
1290    #[doc = " \\param mod The module handle to work on."]
1291    #[doc = " \\param channel The channel whose volume should be retrieved."]
1292    #[doc = " \\return The approximate channel volume."]
1293    #[doc = " \\remarks The returned value is solely based on the note velocity and does not take the actual waveform of the playing sample into account."]
1294    pub fn openmpt_module_get_current_channel_vu_rear_left(
1295        mod_: *mut openmpt_module,
1296        channel: i32,
1297    ) -> f32;
1298}
1299extern "C" {
1300    #[doc = " \\brief Get an approximate indication of the channel volume on the rear-right speaker."]
1301    #[doc = ""]
1302    #[doc = " \\param mod The module handle to work on."]
1303    #[doc = " \\param channel The channel whose volume should be retrieved."]
1304    #[doc = " \\return The approximate channel volume."]
1305    #[doc = " \\remarks The returned value is solely based on the note velocity and does not take the actual waveform of the playing sample into account."]
1306    pub fn openmpt_module_get_current_channel_vu_rear_right(
1307        mod_: *mut openmpt_module,
1308        channel: i32,
1309    ) -> f32;
1310}
1311extern "C" {
1312    #[doc = " \\brief Get the number of sub-songs"]
1313    #[doc = ""]
1314    #[doc = " \\param mod The module handle to work on."]
1315    #[doc = " \\return The number of sub-songs in the module. This includes any \"hidden\" songs (songs that share the same sequence, but start at different order indices) and \"normal\" sub-songs or \"sequences\" (if the format supports them)."]
1316    #[doc = " \\sa openmpt_module_get_subsong_name, openmpt_module_select_subsong, openmpt_module_get_selected_subsong"]
1317    pub fn openmpt_module_get_num_subsongs(mod_: *mut openmpt_module) -> i32;
1318}
1319extern "C" {
1320    #[doc = " \\brief Get the number of pattern channels"]
1321    #[doc = ""]
1322    #[doc = " \\param mod The module handle to work on."]
1323    #[doc = " \\return The number of pattern channels in the module. Not all channels do necessarily contain data."]
1324    #[doc = " \\remarks The number of pattern channels is completely independent of the number of output channels. libopenmpt can render modules in mono, stereo or quad surround, but the choice of which of the three modes to use must not be made based on the return value of this function, which may be any positive integer amount. Only use this function for informational purposes."]
1325    pub fn openmpt_module_get_num_channels(mod_: *mut openmpt_module) -> i32;
1326}
1327extern "C" {
1328    #[doc = " \\brief Get the number of orders"]
1329    #[doc = ""]
1330    #[doc = " \\param mod The module handle to work on."]
1331    #[doc = " \\return The number of orders in the current sequence of the module."]
1332    pub fn openmpt_module_get_num_orders(mod_: *mut openmpt_module) -> i32;
1333}
1334extern "C" {
1335    #[doc = " \\brief Get the number of patterns"]
1336    #[doc = ""]
1337    #[doc = " \\param mod The module handle to work on."]
1338    #[doc = " \\return The number of distinct patterns in the module."]
1339    pub fn openmpt_module_get_num_patterns(mod_: *mut openmpt_module) -> i32;
1340}
1341extern "C" {
1342    #[doc = " \\brief Get the number of instruments"]
1343    #[doc = ""]
1344    #[doc = " \\param mod The module handle to work on."]
1345    #[doc = " \\return The number of instrument slots in the module. Instruments are a layer on top of samples, and are not supported by all module formats."]
1346    pub fn openmpt_module_get_num_instruments(mod_: *mut openmpt_module) -> i32;
1347}
1348extern "C" {
1349    #[doc = " \\brief Get the number of samples"]
1350    #[doc = ""]
1351    #[doc = " \\param mod The module handle to work on."]
1352    #[doc = " \\return The number of sample slots in the module."]
1353    pub fn openmpt_module_get_num_samples(mod_: *mut openmpt_module) -> i32;
1354}
1355extern "C" {
1356    #[doc = " \\brief Get a sub-song name"]
1357    #[doc = ""]
1358    #[doc = " \\param mod The module handle to work on."]
1359    #[doc = " \\param index The sub-song whose name should be retrieved"]
1360    #[doc = " \\return The sub-song name."]
1361    #[doc = " \\sa openmpt_module_get_num_subsongs, openmpt_module_select_subsong, openmpt_module_get_selected_subsong"]
1362    pub fn openmpt_module_get_subsong_name(
1363        mod_: *mut openmpt_module,
1364        index: i32,
1365    ) -> *const ::std::os::raw::c_char;
1366}
1367extern "C" {
1368    #[doc = " \\brief Get a channel name"]
1369    #[doc = ""]
1370    #[doc = " \\param mod The module handle to work on."]
1371    #[doc = " \\param index The channel whose name should be retrieved"]
1372    #[doc = " \\return The channel name."]
1373    #[doc = " \\sa openmpt_module_get_num_channels"]
1374    pub fn openmpt_module_get_channel_name(
1375        mod_: *mut openmpt_module,
1376        index: i32,
1377    ) -> *const ::std::os::raw::c_char;
1378}
1379extern "C" {
1380    #[doc = " \\brief Get an order name"]
1381    #[doc = ""]
1382    #[doc = " \\param mod The module handle to work on."]
1383    #[doc = " \\param index The order whose name should be retrieved"]
1384    #[doc = " \\return The order name."]
1385    #[doc = " \\sa openmpt_module_get_num_orders"]
1386    pub fn openmpt_module_get_order_name(
1387        mod_: *mut openmpt_module,
1388        index: i32,
1389    ) -> *const ::std::os::raw::c_char;
1390}
1391extern "C" {
1392    #[doc = " \\brief Get a pattern name"]
1393    #[doc = ""]
1394    #[doc = " \\param mod The module handle to work on."]
1395    #[doc = " \\param index The pattern whose name should be retrieved"]
1396    #[doc = " \\return The pattern name."]
1397    #[doc = " \\sa openmpt_module_get_num_patterns"]
1398    pub fn openmpt_module_get_pattern_name(
1399        mod_: *mut openmpt_module,
1400        index: i32,
1401    ) -> *const ::std::os::raw::c_char;
1402}
1403extern "C" {
1404    #[doc = " \\brief Get an instrument name"]
1405    #[doc = ""]
1406    #[doc = " \\param mod The module handle to work on."]
1407    #[doc = " \\param index The instrument whose name should be retrieved"]
1408    #[doc = " \\return The instrument name."]
1409    #[doc = " \\sa openmpt_module_get_num_instruments"]
1410    pub fn openmpt_module_get_instrument_name(
1411        mod_: *mut openmpt_module,
1412        index: i32,
1413    ) -> *const ::std::os::raw::c_char;
1414}
1415extern "C" {
1416    #[doc = " \\brief Get a sample name"]
1417    #[doc = ""]
1418    #[doc = " \\param mod The module handle to work on."]
1419    #[doc = " \\param index The sample whose name should be retrieved"]
1420    #[doc = " \\return The sample name."]
1421    #[doc = " \\sa openmpt_module_get_num_samples"]
1422    pub fn openmpt_module_get_sample_name(
1423        mod_: *mut openmpt_module,
1424        index: i32,
1425    ) -> *const ::std::os::raw::c_char;
1426}
1427extern "C" {
1428    #[doc = " \\brief Get pattern at order position"]
1429    #[doc = ""]
1430    #[doc = " \\param mod The module handle to work on."]
1431    #[doc = " \\param order The order item whose pattern index should be retrieved."]
1432    #[doc = " \\return The pattern index found at the given order position of the current sequence."]
1433    pub fn openmpt_module_get_order_pattern(mod_: *mut openmpt_module, order: i32) -> i32;
1434}
1435extern "C" {
1436    #[doc = " \\brief Get the number of rows in a pattern"]
1437    #[doc = ""]
1438    #[doc = " \\param mod The module handle to work on."]
1439    #[doc = " \\param pattern The pattern whose row count should be retrieved."]
1440    #[doc = " \\return The number of rows in the given pattern. If the pattern does not exist, 0 is returned."]
1441    pub fn openmpt_module_get_pattern_num_rows(mod_: *mut openmpt_module, pattern: i32) -> i32;
1442}
1443extern "C" {
1444    #[doc = " \\brief Get raw pattern content"]
1445    #[doc = ""]
1446    #[doc = " \\param mod The module handle to work on."]
1447    #[doc = " \\param pattern The pattern whose data should be retrieved."]
1448    #[doc = " \\param row The row from which the data should be retrieved."]
1449    #[doc = " \\param channel The channel from which the data should be retrieved."]
1450    #[doc = " \\param command The cell index at which the data should be retrieved. See \\ref openmpt_module_command_index"]
1451    #[doc = " \\return The internal, raw pattern data at the given pattern position."]
1452    pub fn openmpt_module_get_pattern_row_channel_command(
1453        mod_: *mut openmpt_module,
1454        pattern: i32,
1455        row: i32,
1456        channel: i32,
1457        command: ::std::os::raw::c_int,
1458    ) -> u8;
1459}
1460extern "C" {
1461    #[doc = " \\brief Get formatted (human-readable) pattern content"]
1462    #[doc = ""]
1463    #[doc = " \\param mod The module handle to work on."]
1464    #[doc = " \\param pattern The pattern whose data should be retrieved."]
1465    #[doc = " \\param row The row from which the data should be retrieved."]
1466    #[doc = " \\param channel The channel from which the data should be retrieved."]
1467    #[doc = " \\param command The cell index at which the data should be retrieved."]
1468    #[doc = " \\return The formatted pattern data at the given pattern position. See \\ref openmpt_module_command_index"]
1469    #[doc = " \\sa openmpt_module_highlight_pattern_row_channel_command"]
1470    pub fn openmpt_module_format_pattern_row_channel_command(
1471        mod_: *mut openmpt_module,
1472        pattern: i32,
1473        row: i32,
1474        channel: i32,
1475        command: ::std::os::raw::c_int,
1476    ) -> *const ::std::os::raw::c_char;
1477}
1478extern "C" {
1479    #[doc = " \\brief Get highlighting information for formatted pattern content"]
1480    #[doc = ""]
1481    #[doc = " \\param mod The module handle to work on."]
1482    #[doc = " \\param pattern The pattern whose data should be retrieved."]
1483    #[doc = " \\param row The row from which the data should be retrieved."]
1484    #[doc = " \\param channel The channel from which the data should be retrieved."]
1485    #[doc = " \\param command The cell index at which the data should be retrieved. See \\ref openmpt_module_command_index"]
1486    #[doc = " \\return The highlighting string for the formatted pattern data as retrieved by openmpt_module_get_pattern_row_channel_command at the given pattern position."]
1487    #[doc = " \\remarks The returned string will map each character position of the string returned by openmpt_module_get_pattern_row_channel_command to a highlighting instruction."]
1488    #[doc = "          Possible highlighting characters are:"]
1489    #[doc = "          - \" \" : empty/space"]
1490    #[doc = "          - \".\" : empty/dot"]
1491    #[doc = "          - \"n\" : generic note"]
1492    #[doc = "          - \"m\" : special note"]
1493    #[doc = "          - \"i\" : generic instrument"]
1494    #[doc = "          - \"u\" : generic volume column effect"]
1495    #[doc = "          - \"v\" : generic volume column parameter"]
1496    #[doc = "          - \"e\" : generic effect column effect"]
1497    #[doc = "          - \"f\" : generic effect column parameter"]
1498    #[doc = " \\sa openmpt_module_get_pattern_row_channel_command"]
1499    pub fn openmpt_module_highlight_pattern_row_channel_command(
1500        mod_: *mut openmpt_module,
1501        pattern: i32,
1502        row: i32,
1503        channel: i32,
1504        command: ::std::os::raw::c_int,
1505    ) -> *const ::std::os::raw::c_char;
1506}
1507extern "C" {
1508    #[doc = " \\brief Get formatted (human-readable) pattern content"]
1509    #[doc = ""]
1510    #[doc = " \\param mod The module handle to work on."]
1511    #[doc = " \\param pattern The pattern whose data should be retrieved."]
1512    #[doc = " \\param row The row from which the data should be retrieved."]
1513    #[doc = " \\param channel The channel from which the data should be retrieved."]
1514    #[doc = " \\param width The maximum number of characters the string should contain. 0 means no limit."]
1515    #[doc = " \\param pad If true, the string will be resized to the exact length provided in the width parameter."]
1516    #[doc = " \\return The formatted pattern data at the given pattern position."]
1517    #[doc = " \\sa openmpt_module_highlight_pattern_row_channel"]
1518    pub fn openmpt_module_format_pattern_row_channel(
1519        mod_: *mut openmpt_module,
1520        pattern: i32,
1521        row: i32,
1522        channel: i32,
1523        width: usize,
1524        pad: ::std::os::raw::c_int,
1525    ) -> *const ::std::os::raw::c_char;
1526}
1527extern "C" {
1528    #[doc = " \\brief Get highlighting information for formatted pattern content"]
1529    #[doc = ""]
1530    #[doc = " \\param mod The module handle to work on."]
1531    #[doc = " \\param pattern The pattern whose data should be retrieved."]
1532    #[doc = " \\param row The row from which the data should be retrieved."]
1533    #[doc = " \\param channel The channel from which the data should be retrieved."]
1534    #[doc = " \\param width The maximum number of characters the string should contain. 0 means no limit."]
1535    #[doc = " \\param pad If true, the string will be resized to the exact length provided in the width parameter."]
1536    #[doc = " \\return The highlighting string for the formatted pattern data as retrieved by openmpt_module_format_pattern_row_channel at the given pattern position."]
1537    #[doc = " \\sa openmpt_module_format_pattern_row_channel"]
1538    pub fn openmpt_module_highlight_pattern_row_channel(
1539        mod_: *mut openmpt_module,
1540        pattern: i32,
1541        row: i32,
1542        channel: i32,
1543        width: usize,
1544        pad: ::std::os::raw::c_int,
1545    ) -> *const ::std::os::raw::c_char;
1546}
1547extern "C" {
1548    #[doc = " \\brief Retrieve supported ctl keys"]
1549    #[doc = ""]
1550    #[doc = " \\param mod The module handle to work on."]
1551    #[doc = " \\return A semicolon-separated list containing all supported ctl keys."]
1552    #[doc = " \\remarks Currently supported ctl values are:"]
1553    #[doc = "          - load.skip_samples (boolean): Set to \"1\" to avoid loading samples into memory"]
1554    #[doc = "          - load.skip_patterns (boolean): Set to \"1\" to avoid loading patterns into memory"]
1555    #[doc = "          - load.skip_plugins (boolean): Set to \"1\" to avoid loading plugins"]
1556    #[doc = "          - load.skip_subsongs_init (boolean): Set to \"1\" to avoid pre-initializing sub-songs. Skipping results in faster module loading but slower seeking."]
1557    #[doc = "          - seek.sync_samples (boolean): Set to \"1\" to sync sample playback when using openmpt_module_set_position_seconds or openmpt_module_set_position_order_row."]
1558    #[doc = "          - subsong (integer): The current subsong. Setting it has identical semantics as openmpt_module_select_subsong(), getting it returns the currently selected subsong."]
1559    #[doc = "          - play.at_end (text): Chooses the behaviour when the end of song is reached:"]
1560    #[doc = "                         - \"fadeout\": Fades the module out for a short while. Subsequent reads after the fadeout will return 0 rendered frames."]
1561    #[doc = "                         - \"continue\": Returns 0 rendered frames when the song end is reached. Subsequent reads will continue playing from the song start or loop start."]
1562    #[doc = "                         - \"stop\": Returns 0 rendered frames when the song end is reached. Subsequent reads will return 0 rendered frames."]
1563    #[doc = "          - play.tempo_factor (floatingpoint): Set a floating point tempo factor. \"1.0\" is the default tempo."]
1564    #[doc = "          - play.pitch_factor (floatingpoint): Set a floating point pitch factor. \"1.0\" is the default pitch."]
1565    #[doc = "          - render.resampler.emulate_amiga (boolean): Set to \"1\" to enable the Amiga resampler for Amiga modules. This emulates the sound characteristics of the Paula chip and overrides the selected interpolation filter. Non-Amiga module formats are not affected by this setting."]
1566    #[doc = "          - render.resampler.emulate_amiga_type (string): Configures the filter type to use for the Amiga resampler. Supported values are:"]
1567    #[doc = "                    - \"auto\": Filter type is chosen by the library and might change. This is the default."]
1568    #[doc = "                    - \"a500\": Amiga A500 filter."]
1569    #[doc = "                    - \"a1200\": Amiga A1200 filter."]
1570    #[doc = "                    - \"unfiltered\": BLEP synthesis without model-specific filters. The LED filter is ignored by this setting. This filter mode is considered to be experimental and might change in the future."]
1571    #[doc = "          - render.opl.volume_factor (floatingpoint): Set volume factor applied to synthesized OPL sounds, relative to the default OPL volume."]
1572    #[doc = "          - dither (integer): Set the dither algorithm that is used for the 16 bit versions of openmpt_module_read. Supported values are:"]
1573    #[doc = "                    - 0: No dithering."]
1574    #[doc = "                    - 1: Default mode. Chosen by OpenMPT code, might change."]
1575    #[doc = "                    - 2: Rectangular, 0.5 bit depth, no noise shaping (original ModPlug Tracker)."]
1576    #[doc = "                    - 3: Rectangular, 1 bit depth, simple 1st order noise shaping"]
1577    pub fn openmpt_module_get_ctls(mod_: *mut openmpt_module) -> *const ::std::os::raw::c_char;
1578}
1579extern "C" {
1580    #[doc = " \\brief Get current ctl value"]
1581    #[doc = ""]
1582    #[doc = " \\param mod The module handle to work on."]
1583    #[doc = " \\param ctl The ctl key whose value should be retrieved."]
1584    #[doc = " \\return The associated ctl value, or NULL on failure."]
1585    #[doc = " \\sa openmpt_module_get_ctls"]
1586    #[doc = " \\deprecated Please use openmpt_module_ctl_get_boolean(), openmpt_module_ctl_get_integer(), openmpt_module_ctl_get_floatingpoint(), or openmpt_module_ctl_get_text()."]
1587    pub fn openmpt_module_ctl_get(
1588        mod_: *mut openmpt_module,
1589        ctl: *const ::std::os::raw::c_char,
1590    ) -> *const ::std::os::raw::c_char;
1591}
1592extern "C" {
1593    #[doc = " \\brief Get current ctl boolean value"]
1594    #[doc = ""]
1595    #[doc = " \\param mod The module handle to work on."]
1596    #[doc = " \\param ctl The ctl key whose value should be retrieved."]
1597    #[doc = " \\return The associated ctl value, or NULL on failure."]
1598    #[doc = " \\sa openmpt_module_get_ctls"]
1599    #[doc = " \\since 0.5.0"]
1600    pub fn openmpt_module_ctl_get_boolean(
1601        mod_: *mut openmpt_module,
1602        ctl: *const ::std::os::raw::c_char,
1603    ) -> ::std::os::raw::c_int;
1604}
1605extern "C" {
1606    #[doc = " \\brief Get current ctl integer value"]
1607    #[doc = ""]
1608    #[doc = " \\param mod The module handle to work on."]
1609    #[doc = " \\param ctl The ctl key whose value should be retrieved."]
1610    #[doc = " \\return The associated ctl value, or NULL on failure."]
1611    #[doc = " \\sa openmpt_module_get_ctls"]
1612    #[doc = " \\since 0.5.0"]
1613    pub fn openmpt_module_ctl_get_integer(
1614        mod_: *mut openmpt_module,
1615        ctl: *const ::std::os::raw::c_char,
1616    ) -> i64;
1617}
1618extern "C" {
1619    #[doc = " \\brief Get current ctl floatingpoint value"]
1620    #[doc = ""]
1621    #[doc = " \\param mod The module handle to work on."]
1622    #[doc = " \\param ctl The ctl key whose value should be retrieved."]
1623    #[doc = " \\return The associated ctl value, or NULL on failure."]
1624    #[doc = " \\sa openmpt_module_get_ctls"]
1625    #[doc = " \\since 0.5.0"]
1626    pub fn openmpt_module_ctl_get_floatingpoint(
1627        mod_: *mut openmpt_module,
1628        ctl: *const ::std::os::raw::c_char,
1629    ) -> f64;
1630}
1631extern "C" {
1632    #[doc = " \\brief Get current ctl string value"]
1633    #[doc = ""]
1634    #[doc = " \\param mod The module handle to work on."]
1635    #[doc = " \\param ctl The ctl key whose value should be retrieved."]
1636    #[doc = " \\return The associated ctl value, or NULL on failure."]
1637    #[doc = " \\sa openmpt_module_get_ctls"]
1638    #[doc = " \\since 0.5.0"]
1639    pub fn openmpt_module_ctl_get_text(
1640        mod_: *mut openmpt_module,
1641        ctl: *const ::std::os::raw::c_char,
1642    ) -> *const ::std::os::raw::c_char;
1643}
1644extern "C" {
1645    #[doc = " \\brief Set ctl value"]
1646    #[doc = ""]
1647    #[doc = " \\param mod The module handle to work on."]
1648    #[doc = " \\param ctl The ctl key whose value should be set."]
1649    #[doc = " \\param value The value that should be set."]
1650    #[doc = " \\return 1 if successful, 0 in case the value is not sensible (e.g. negative tempo factor) or the ctl is not recognized."]
1651    #[doc = " \\sa openmpt_module_get_ctls"]
1652    #[doc = " \\deprecated Please use openmpt_module_ctl_set_boolean(), openmpt_module_ctl_set_integer(), openmpt_module_ctl_set_floatingpoint(), or openmpt_module_ctl_set_text()."]
1653    pub fn openmpt_module_ctl_set(
1654        mod_: *mut openmpt_module,
1655        ctl: *const ::std::os::raw::c_char,
1656        value: *const ::std::os::raw::c_char,
1657    ) -> ::std::os::raw::c_int;
1658}
1659extern "C" {
1660    #[doc = " \\brief Set ctl boolean value"]
1661    #[doc = ""]
1662    #[doc = " \\param mod The module handle to work on."]
1663    #[doc = " \\param ctl The ctl key whose value should be set."]
1664    #[doc = " \\param value The value that should be set."]
1665    #[doc = " \\return 1 if successful, 0 in case the value is not sensible (e.g. negative tempo factor) or the ctl is not recognized."]
1666    #[doc = " \\sa openmpt_module_get_ctls"]
1667    #[doc = " \\since 0.5.0"]
1668    pub fn openmpt_module_ctl_set_boolean(
1669        mod_: *mut openmpt_module,
1670        ctl: *const ::std::os::raw::c_char,
1671        value: ::std::os::raw::c_int,
1672    ) -> ::std::os::raw::c_int;
1673}
1674extern "C" {
1675    #[doc = " \\brief Set ctl integer value"]
1676    #[doc = ""]
1677    #[doc = " \\param mod The module handle to work on."]
1678    #[doc = " \\param ctl The ctl key whose value should be set."]
1679    #[doc = " \\param value The value that should be set."]
1680    #[doc = " \\return 1 if successful, 0 in case the value is not sensible (e.g. negative tempo factor) or the ctl is not recognized."]
1681    #[doc = " \\sa openmpt_module_get_ctls"]
1682    #[doc = " \\since 0.5.0"]
1683    pub fn openmpt_module_ctl_set_integer(
1684        mod_: *mut openmpt_module,
1685        ctl: *const ::std::os::raw::c_char,
1686        value: i64,
1687    ) -> ::std::os::raw::c_int;
1688}
1689extern "C" {
1690    #[doc = " \\brief Set ctl floatingpoint value"]
1691    #[doc = ""]
1692    #[doc = " \\param mod The module handle to work on."]
1693    #[doc = " \\param ctl The ctl key whose value should be set."]
1694    #[doc = " \\param value The value that should be set."]
1695    #[doc = " \\return 1 if successful, 0 in case the value is not sensible (e.g. negative tempo factor) or the ctl is not recognized."]
1696    #[doc = " \\sa openmpt_module_get_ctls"]
1697    #[doc = " \\since 0.5.0"]
1698    pub fn openmpt_module_ctl_set_floatingpoint(
1699        mod_: *mut openmpt_module,
1700        ctl: *const ::std::os::raw::c_char,
1701        value: f64,
1702    ) -> ::std::os::raw::c_int;
1703}
1704extern "C" {
1705    #[doc = " \\brief Set ctl string value"]
1706    #[doc = ""]
1707    #[doc = " \\param mod The module handle to work on."]
1708    #[doc = " \\param ctl The ctl key whose value should be set."]
1709    #[doc = " \\param value The value that should be set."]
1710    #[doc = " \\return 1 if successful, 0 in case the value is not sensible (e.g. negative tempo factor) or the ctl is not recognized."]
1711    #[doc = " \\sa openmpt_module_get_ctls"]
1712    #[doc = " \\since 0.5.0"]
1713    pub fn openmpt_module_ctl_set_text(
1714        mod_: *mut openmpt_module,
1715        ctl: *const ::std::os::raw::c_char,
1716        value: *const ::std::os::raw::c_char,
1717    ) -> ::std::os::raw::c_int;
1718}