Skip to content

Commit 989fce2

Browse files
committed
Fix vorbis file not used during convert.
1 parent f651c6d commit 989fce2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

game/assets-base/src/verify/ogg_vorbis.rs

+13
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,16 @@ pub fn verify_ogg_vorbis(file: &[u8]) -> anyhow::Result<()> {
4949
Err(anyhow!("Vorbis verify check failed."))
5050
}
5151
}
52+
53+
#[cfg(test)]
54+
mod test {
55+
use super::verify_ogg_vorbis;
56+
57+
#[test]
58+
fn test_verify() {
59+
verify_ogg_vorbis(include_bytes!(
60+
"../../../../data/skins/default/audio/spawn_001.ogg"
61+
))
62+
.unwrap();
63+
}
64+
}

game/map-convert-lib/src/legacy_to_new.rs

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ pub async fn legacy_to_new_from_buf_async(
184184
res.ty = "ogg".into();
185185

186186
let hash = generate_hash_for(&transcoded_ogg);
187+
res.buf = transcoded_ogg;
187188
hashes.lock().unwrap().insert(old_hash, hash);
188189
anyhow::Ok((hash, res))
189190
})

0 commit comments

Comments
 (0)