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
#[derive(Copy, Clone, Debug, FromPrimitive, PartialEq)]
pub enum SampleSet {
None = 0,
Normal = 1,
Soft = 2,
Drum = 3,
}
#[allow(non_upper_case_globals)]
bitflags! {
pub struct Additions: u32 {
const WHISTLE = 1 << 1;
const FINISH = 1 << 2;
const CLAP = 1 << 3;
}
}
#[derive(Clone, Debug)]
pub struct SampleInfo {
pub sample_set: SampleSet,
pub addition_set: SampleSet,
pub custom_index: i32,
pub sample_volume: i32,
pub filename: String,
}
impl Default for SampleInfo {
fn default() -> SampleInfo {
SampleInfo {
sample_set: SampleSet::None,
addition_set: SampleSet::None,
custom_index: 0,
sample_volume: 0,
filename: "".to_owned(),
}
}
}