mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Fix out by one error with instrument samples
This commit is contained in:
parent
fa4b2ebd5d
commit
9d299f3e66
|
@ -124,7 +124,8 @@ pub fn parse_module(module: &Module) -> TokenStream {
|
||||||
if let InstrumentType::Default(ref instrument) =
|
if let InstrumentType::Default(ref instrument) =
|
||||||
module.instrument[instrument_index].instr_type
|
module.instrument[instrument_index].instr_type
|
||||||
{
|
{
|
||||||
let sample_slot = instrument.sample_for_note[slot.note as usize] as usize;
|
let sample_slot =
|
||||||
|
instrument.sample_for_note[slot.note as usize - 1] as usize;
|
||||||
instruments_map
|
instruments_map
|
||||||
.get(&(instrument_index, sample_slot))
|
.get(&(instrument_index, sample_slot))
|
||||||
.map(|sample_idx| sample_idx + 1)
|
.map(|sample_idx| sample_idx + 1)
|
||||||
|
|
Loading…
Reference in a new issue