jarikomppa / soloud

Free, easy, portable audio engine for games
http://soloud-audio.com
Other
1.76k stars 275 forks source link

crash when setting inaudible behaviour #327

Closed stohrendorf closed 3 years ago

stohrendorf commented 3 years ago

Steps to reproduce the problem: Call setInaudibleBehavior(voiceHandle, true, false);

SoLoud version, operating system, backend used, any other potentially useful information: SoLoud version 202002 Backend XAudio2 with 2 channels at 44100 Hz and buffer size 8192

Possibly caused from a voice played initially inaudible. Crash happens in soloud.cpp line 1469 because of a nullptr dereference in voice->mResampleData[0]. Removing the above statement resolves the crash.

ruby0x1 commented 3 years ago

see this thread, it links to a PR with a likely fix https://github.com/jarikomppa/soloud/issues/321

stohrendorf commented 3 years ago

Thanks, I guess this is a duplicate of #279 and can be closed.