mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Specify that it is the volume envelope
This commit is contained in:
parent
826fdd881a
commit
d29a641a44
|
@ -22,7 +22,7 @@ pub struct Sample<'a> {
|
||||||
pub should_loop: bool,
|
pub should_loop: bool,
|
||||||
pub restart_point: u32,
|
pub restart_point: u32,
|
||||||
pub volume: Num<i16, 8>,
|
pub volume: Num<i16, 8>,
|
||||||
pub envelope: Option<usize>,
|
pub volume_envelope: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -176,10 +176,10 @@ impl<'a> quote::ToTokens for Sample<'a> {
|
||||||
should_loop,
|
should_loop,
|
||||||
restart_point,
|
restart_point,
|
||||||
volume,
|
volume,
|
||||||
envelope,
|
volume_envelope,
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
let envelope = match envelope {
|
let volume_envelope = match volume_envelope {
|
||||||
Some(index) => quote!(Some(#index)),
|
Some(index) => quote!(Some(#index)),
|
||||||
None => quote!(None),
|
None => quote!(None),
|
||||||
};
|
};
|
||||||
|
@ -198,7 +198,7 @@ impl<'a> quote::ToTokens for Sample<'a> {
|
||||||
should_loop: #should_loop,
|
should_loop: #should_loop,
|
||||||
restart_point: #restart_point,
|
restart_point: #restart_point,
|
||||||
volume: agb_tracker::__private::Num::from_raw(#volume),
|
volume: agb_tracker::__private::Num::from_raw(#volume),
|
||||||
envelope: #envelope,
|
volume_envelope: #volume_envelope,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -377,7 +377,7 @@ pub fn parse_module(module: &Module) -> TokenStream {
|
||||||
should_loop: sample.should_loop,
|
should_loop: sample.should_loop,
|
||||||
restart_point: sample.restart_point,
|
restart_point: sample.restart_point,
|
||||||
volume: sample.volume,
|
volume: sample.volume,
|
||||||
envelope: None,
|
volume_envelope: None,
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue