浏览代码

Fixed stream loop crash.

mOgg was resolving as true for mp3. Changed union to struct.
Brucey 1 年之前
父节点
当前提交
f625102318
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      soloud.mod/soloud/include/soloud_wavstream.h

+ 5 - 5
soloud.mod/soloud/include/soloud_wavstream.h

@@ -49,12 +49,12 @@ namespace SoLoud
 		WavStream *mParent;
 		WavStream *mParent;
 		unsigned int mOffset;
 		unsigned int mOffset;
 		File *mFile;
 		File *mFile;
-		union codec
+		struct codec
 		{
 		{
-			stb_vorbis *mOgg;
-			drflac *mFlac;
-			drmp3 *mMp3;
-			drwav *mWav;
+			stb_vorbis *mOgg = nullptr;
+			drflac *mFlac = nullptr;
+			drmp3 *mMp3 = nullptr;
+			drwav *mWav = nullptr;
 		} mCodec;
 		} mCodec;
 		unsigned int mOggFrameSize;
 		unsigned int mOggFrameSize;
 		unsigned int mOggFrameOffset;
 		unsigned int mOggFrameOffset;