@@ -1488,9 +1488,11 @@ static void S_LoadSound3D(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
14881488
14891489 DPrintf (DMSG_NOTIFY, " Loading monoized sound \" %s\" (%td)\n " , sfx->name .GetChars (), sfx - &S_sfx[0 ]);
14901490
1491+ std::pair<SoundHandle, bool > snd;
1492+
14911493 if (pBuffer->mBuffer .Size () > 0 )
14921494 {
1493- GSnd->LoadSoundBuffered (pBuffer, true );
1495+ snd = GSnd->LoadSoundBuffered (pBuffer, true );
14941496 }
14951497 else
14961498 {
@@ -1501,7 +1503,6 @@ static void S_LoadSound3D(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
15011503 uint8_t *sfxdata = new uint8_t [size];
15021504 wlump.Read (sfxdata, size);
15031505 int32_t dmxlen = LittleLong (((int32_t *)sfxdata)[1 ]);
1504- std::pair<SoundHandle, bool > snd;
15051506
15061507 // If the sound is voc, use the custom loader.
15071508 if (strncmp ((const char *)sfxdata, " Creative Voice File" , 19 ) == 0 )
@@ -1526,9 +1527,9 @@ static void S_LoadSound3D(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
15261527 snd = GSnd->LoadSound (sfxdata, size, true , pBuffer);
15271528 }
15281529 delete[] sfxdata;
1529-
1530- sfx->data3d = snd.first ;
15311530 }
1531+
1532+ sfx->data3d = snd.first ;
15321533}
15331534
15341535// ==========================================================================
0 commit comments