1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
// SPDX-License-Identifier: MIT
use crate::*;

impl SndMotuRegisterDspParameter {
    /// Get the array with elements for the data of input flags. The data consists of bit flags below:
    ///
    /// - 0x01: whether to make paired input
    /// - 0x02: whether to enable phantom powering
    /// - 0x04: whether to enable attenuation pad
    /// - 0x08: whether to detect plug insert to jack
    ///
    /// # Returns
    ///
    ///
    /// ## `flag`
    /// The array with elements for the data of input flags.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_input_flag")]
    pub fn input_flag(&self) -> &[u8; 10] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 10];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_input_flag(
                self.to_glib_none().0,
                &mut ptr,
            );
            &*ptr
        }
    }

    /// Get the array with elements for input gain and invert flags. The interpretation of data is
    /// different in below two groups:
    ///
    /// - Ultralite
    ///     - 0x1f: the gain.
    ///     - 0x20: whether to invert phase of the input
    /// - Audio Express and 4 pre
    ///     - 0x3f: the gain
    ///     - 0x40: whether to invert phase of the input
    ///
    /// # Returns
    ///
    ///
    /// ## `gain_and_invert`
    /// The array with elements for the data of input gain and invert flags.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_input_gain_and_invert")]
    pub fn input_gain_and_invert(&self) -> &[u8; 10] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 10];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_input_gain_and_invert(
                self.to_glib_none().0,
                &mut ptr,
            );
            &*ptr
        }
    }

    /// Get the array with elements for the data of paired output flags in indicated mixer. The data
    /// consists of bit flags and masks below:
    ///
    ///  - 0x0f: the mask for destination of paired output
    ///  - 0x10: whether to enable mute for paired output
    ///
    /// # Returns
    ///
    ///
    /// ## `flag`
    /// The array with elements for the data of paired output flag.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_mixer_output_paired_flag")]
    pub fn mixer_output_paired_flag(&self) -> &[u8; 4] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 4];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_mixer_output_paired_flag(
                self.to_glib_none().0,
                &mut ptr,
            );
            &*ptr
        }
    }

    /// Get the array with elements for the data of paired output volume in indicated mixer. The data
    /// has gain value between 0x00 and 0x80.
    ///
    /// # Returns
    ///
    ///
    /// ## `volume`
    /// The array with elements for the data of paired output volume.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_mixer_output_paired_volume")]
    pub fn mixer_output_paired_volume(&self) -> &[u8; 4] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 4];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_mixer_output_paired_volume(
                self.to_glib_none().0,
                &mut ptr,
            );
            &*ptr
        }
    }

    /// Get the array with elements for the data of source flags in indicated mixer. The data consists of
    /// bit flags below:
    ///
    ///  - 0x01: whether to enable mute function for the source.
    ///  - 0x02: whether to enable solo function for the source.
    /// ## `mixer`
    /// the numeric index of mixer, up to 4.
    ///
    /// # Returns
    ///
    ///
    /// ## `flag`
    /// The array with elements for the data of source flag.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_mixer_source_flag")]
    pub fn mixer_source_flag(&self, mixer: usize) -> &[u8; 20] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 20];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_mixer_source_flag(
                self.to_glib_none().0,
                mixer,
                &mut ptr,
            );
            &*ptr
        }
    }

    /// Get the array with elements for the data of source gains in indicated mixer. The data has gain
    /// value between 0x00 and 0x80.
    /// ## `mixer`
    /// the numeric index of mixer, up to 4.
    ///
    /// # Returns
    ///
    ///
    /// ## `gain`
    /// The array with elements for the data of source gains.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_mixer_source_gain")]
    pub fn mixer_source_gain(&self, mixer: usize) -> &[u8; 20] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 20];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_mixer_source_gain(
                self.to_glib_none().0,
                mixer,
                &mut ptr,
            );
            &*ptr
        }
    }

    /// Get the array with elements for the data of paired source L/R balance in indicated mixer. The
    /// data has L/R balance value between 0x00 and 0x80.
    /// ## `mixer`
    /// the numeric index of mixer, up to 4.
    ///
    /// # Returns
    ///
    ///
    /// ## `balance`
    /// The array with elements for the data of paired source L/R balance.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_mixer_source_paired_balance")]
    pub fn mixer_source_paired_balance(&self, mixer: usize) -> &[u8; 20] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 20];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_mixer_source_paired_balance(
                self.to_glib_none().0,
                mixer,
                &mut ptr,
            );
            &*ptr
        }
    }

    /// Get the array with elements for the data of paired source width in indicated mixer. The data
    /// has width value between 0x00 and 0x80.
    /// ## `mixer`
    /// the numeric index of mixer, up to 4.
    ///
    /// # Returns
    ///
    ///
    /// ## `width`
    /// The array with elements for the data of paired source width.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_mixer_source_paired_width")]
    pub fn mixer_source_paired_width(&self, mixer: usize) -> &[u8; 20] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 20];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_mixer_source_paired_width(
                self.to_glib_none().0,
                mixer,
                &mut ptr,
            );
            &*ptr
        }
    }

    /// Get the array with elements for the data of source pans in indicated mixer. The data has pan
    /// value between 0x00 and 0x80.
    /// ## `mixer`
    /// the numeric index of mixer, up to 4.
    ///
    /// # Returns
    ///
    ///
    /// ## `pan`
    /// The array with elements for the data of source pan.
    #[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_mixer_source_pan")]
    pub fn mixer_source_pan(&self, mixer: usize) -> &[u8; 20] {
        unsafe {
            let mut ptr = std::ptr::null_mut() as *const [u8; 20];
            ffi::hitaki_snd_motu_register_dsp_parameter_get_mixer_source_pan(
                self.to_glib_none().0,
                mixer,
                &mut ptr,
            );
            &*ptr
        }
    }
}