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
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::ffi;
use glib::translate::*;
glib::wrapper! {
/// A boxed object for parameters in MOTU register DSP model.
///
/// A [`SndMotuRegisterDspParameter`][crate::SndMotuRegisterDspParameter] is a boxed object for container of parameter in register
/// DSP model of Mark of the Unicorn (MOTU) FireWire series.
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SndMotuRegisterDspParameter(Boxed<ffi::HitakiSndMotuRegisterDspParameter>);
match fn {
copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::hitaki_snd_motu_register_dsp_parameter_get_type(), ptr as *mut _) as *mut ffi::HitakiSndMotuRegisterDspParameter,
free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::hitaki_snd_motu_register_dsp_parameter_get_type(), ptr as *mut _),
type_ => || ffi::hitaki_snd_motu_register_dsp_parameter_get_type(),
}
}
impl SndMotuRegisterDspParameter {
/// Instantiate [`SndMotuRegisterDspParameter`][crate::SndMotuRegisterDspParameter] object and return the instance.
///
/// # Returns
///
/// an instance of [`SndMotuRegisterDspParameter`][crate::SndMotuRegisterDspParameter].
#[doc(alias = "hitaki_snd_motu_register_dsp_parameter_new")]
pub fn new() -> SndMotuRegisterDspParameter {
unsafe { from_glib_full(ffi::hitaki_snd_motu_register_dsp_parameter_new()) }
}
/// Get the array with elements for the data of paired headphone output source. The data has index
/// value of source.
///
/// # Returns
///
///
/// ## `assignment`
/// The value of paired headphone assignment.
#[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_headphone_output_paired_assignment")]
#[doc(alias = "get_headphone_output_paired_assignment")]
pub fn headphone_output_paired_assignment(&self) -> u8 {
unsafe {
let mut assignment = std::mem::MaybeUninit::uninit();
ffi::hitaki_snd_motu_register_dsp_parameter_get_headphone_output_paired_assignment(
self.to_glib_none().0,
assignment.as_mut_ptr(),
);
assignment.assume_init()
}
}
/// Get the array with elements for the data of paired headphone output volume. The data has volume
/// value between 0x00 and 0x80.
///
/// # Returns
///
///
/// ## `volume`
/// The value of paired headphone output.
#[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_headphone_output_paired_volume")]
#[doc(alias = "get_headphone_output_paired_volume")]
pub fn headphone_output_paired_volume(&self) -> u8 {
unsafe {
let mut volume = std::mem::MaybeUninit::uninit();
ffi::hitaki_snd_motu_register_dsp_parameter_get_headphone_output_paired_volume(
self.to_glib_none().0,
volume.as_mut_ptr(),
);
volume.assume_init()
}
}
/// Get the data for flags of line input boost. The data consists of bit flags for corresponding line
/// input channel. When the flag stands, the input is boosted.
///
/// # Returns
///
///
/// ## `boost_flag`
/// The flag of boost for line input.
#[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_line_input_boost_flag")]
#[doc(alias = "get_line_input_boost_flag")]
pub fn line_input_boost_flag(&self) -> u8 {
unsafe {
let mut boost_flag = std::mem::MaybeUninit::uninit();
ffi::hitaki_snd_motu_register_dsp_parameter_get_line_input_boost_flag(
self.to_glib_none().0,
boost_flag.as_mut_ptr(),
);
boost_flag.assume_init()
}
}
/// Get the data for flags of line input nominal level. The data consists of bit flags for
/// corresponding line input channel. When the flag stands, the nominal level of input is +4 dBu,
/// else -10 dBV.
///
/// # Returns
///
///
/// ## `nominal_level_flag`
/// The flag of boost for line input.
#[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_line_input_nominal_level_flag")]
#[doc(alias = "get_line_input_nominal_level_flag")]
pub fn line_input_nominal_level_flag(&self) -> u8 {
unsafe {
let mut nominal_level_flag = std::mem::MaybeUninit::uninit();
ffi::hitaki_snd_motu_register_dsp_parameter_get_line_input_nominal_level_flag(
self.to_glib_none().0,
nominal_level_flag.as_mut_ptr(),
);
nominal_level_flag.assume_init()
}
}
/// Get the array with elements for the data of paired main output volume. The data has volume value
/// between 0x00 and 0x80.
///
/// # Returns
///
///
/// ## `volume`
/// The value of paired main output.
#[doc(alias = "hitaki_snd_motu_register_dsp_parameter_get_main_output_paired_volume")]
#[doc(alias = "get_main_output_paired_volume")]
pub fn main_output_paired_volume(&self) -> u8 {
unsafe {
let mut volume = std::mem::MaybeUninit::uninit();
ffi::hitaki_snd_motu_register_dsp_parameter_get_main_output_paired_volume(
self.to_glib_none().0,
volume.as_mut_ptr(),
);
volume.assume_init()
}
}
}
impl Default for SndMotuRegisterDspParameter {
fn default() -> Self {
Self::new()
}
}
unsafe impl Send for SndMotuRegisterDspParameter {}
unsafe impl Sync for SndMotuRegisterDspParameter {}