assets loaded by bank id instead of name (no more traps)
This commit is contained in:
@@ -183,10 +183,12 @@ impl Audio {
|
||||
}
|
||||
|
||||
// Resolve the sample from the hardware pools
|
||||
let sample = self
|
||||
.sound_banks
|
||||
.sound_bank_slot(bank_id as usize)
|
||||
.and_then(|bank| bank.samples.get(sample_id as usize).map(Arc::clone));
|
||||
let bank_slot = self.sound_banks.sound_bank_slot(bank_id as usize);
|
||||
if bank_slot.is_none() {
|
||||
return AudioOpStatus::BankInvalid;
|
||||
}
|
||||
|
||||
let sample = bank_slot.and_then(|bank| bank.samples.get(sample_id as usize).map(Arc::clone));
|
||||
|
||||
if let Some(s) = sample {
|
||||
// println!(
|
||||
|
||||
Reference in New Issue
Block a user