mirror of
https://github.com/lightsoutgames/bevy_openal.git
synced 2024-11-21 08:55:56 +00:00
Make wave reading a bit clearer.
This commit is contained in:
parent
3dada2fd8d
commit
e053cfaa72
|
@ -101,8 +101,10 @@ impl AssetLoader for BufferAssetLoader {
|
|||
let reader = hound::WavReader::new(cursor);
|
||||
if let Ok(mut reader) = reader {
|
||||
let mut samples: Vec<i16> = vec![];
|
||||
for sample in reader.samples::<i16>().flatten() {
|
||||
samples.push(sample);
|
||||
for sample in reader.samples::<i16>() {
|
||||
if let Ok(sample) = sample {
|
||||
samples.push(sample);
|
||||
}
|
||||
}
|
||||
Some(Buffer {
|
||||
samples,
|
||||
|
|
Loading…
Reference in New Issue
Block a user