clap_sys/ext/
surround.rs

1use crate::{cstr, host::*, plugin::*};
2
3use std::ffi::CStr;
4
5pub const CLAP_EXT_SURROUND: &CStr = cstr!("clap.surround/4");
6pub const CLAP_EXT_SURROUND_COMPAT: &CStr = cstr!("clap.surround.draft/4");
7
8pub const CLAP_PORT_SURROUND: &CStr = cstr!("surround");
9
10pub const CLAP_SURROUND_FL: u32 = 0;
11pub const CLAP_SURROUND_FR: u32 = 1;
12pub const CLAP_SURROUND_FC: u32 = 2;
13pub const CLAP_SURROUND_LFE: u32 = 3;
14pub const CLAP_SURROUND_BL: u32 = 4;
15pub const CLAP_SURROUND_BR: u32 = 5;
16pub const CLAP_SURROUND_FLC: u32 = 6;
17pub const CLAP_SURROUND_FRC: u32 = 7;
18pub const CLAP_SURROUND_BC: u32 = 8;
19pub const CLAP_SURROUND_SL: u32 = 9;
20pub const CLAP_SURROUND_SR: u32 = 10;
21pub const CLAP_SURROUND_TC: u32 = 11;
22pub const CLAP_SURROUND_TFL: u32 = 12;
23pub const CLAP_SURROUND_TFC: u32 = 13;
24pub const CLAP_SURROUND_TFR: u32 = 14;
25pub const CLAP_SURROUND_TBL: u32 = 15;
26pub const CLAP_SURROUND_TBC: u32 = 16;
27pub const CLAP_SURROUND_TBR: u32 = 17;
28
29#[repr(C)]
30#[derive(Debug, Copy, Clone)]
31pub struct clap_plugin_surround {
32    pub is_channel_mask_supported:
33        Option<unsafe extern "C" fn(plugin: *const clap_plugin, channel_mask: u64) -> bool>,
34    pub get_channel_map: Option<
35        unsafe extern "C" fn(
36            plugin: *const clap_plugin,
37            is_input: bool,
38            port_index: u32,
39            channel_map: *mut u8,
40            channel_map_capacity: u32,
41        ) -> u32,
42    >,
43}
44
45#[repr(C)]
46#[derive(Debug, Copy, Clone)]
47pub struct clap_host_surround {
48    pub changed: Option<unsafe extern "C" fn(host: *const clap_host)>,
49}