From 8cd51ae8961a63420540053bace1d48b9736b2f0 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 16 May 2015 17:11:15 +0400 Subject: [PATCH] (WaveAudio.TryOpen): reset sound position on embedded stream errors. --- GameRes/AudioWAV.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GameRes/AudioWAV.cs b/GameRes/AudioWAV.cs index 4ae0b524..c7c6caf6 100644 --- a/GameRes/AudioWAV.cs +++ b/GameRes/AudioWAV.cs @@ -120,7 +120,10 @@ namespace GameRes sound = embedded; } } - catch { /* ignore errors */ } + catch + { + sound.Position = 0; + } } return sound; }