Melchior FRANZ:
At last I've found the reason why fgfs crashed routinely for me. When I still used KDE's artsdsp (preloads lib with OSS replacement functions) I saw this crash only occasionally. After letting OpenAl communicate with artsd directly (by means of ~/.openalrc setting), I got the crash always when I left fgfs. This bug may also have crashed fgfs when running with sound daemons other than aRts.
This commit is contained in:
@@ -69,7 +69,8 @@ SGSoundMgr::SGSoundMgr() {
|
|||||||
|
|
||||||
// initialize OpenAL
|
// initialize OpenAL
|
||||||
alutInit( 0, NULL );
|
alutInit( 0, NULL );
|
||||||
alGetError();
|
atexit(alutExit);
|
||||||
|
|
||||||
if ( alGetError() == AL_NO_ERROR) {
|
if ( alGetError() == AL_NO_ERROR) {
|
||||||
working = true;
|
working = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -119,8 +120,6 @@ SGSoundMgr::~SGSoundMgr() {
|
|||||||
SGSoundSample *sample = sample_current->second;
|
SGSoundSample *sample = sample_current->second;
|
||||||
delete sample;
|
delete sample;
|
||||||
}
|
}
|
||||||
|
|
||||||
alutExit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -80,11 +80,8 @@ SGXmlSound::~SGXmlSound()
|
|||||||
{
|
{
|
||||||
_sample->stop();
|
_sample->stop();
|
||||||
|
|
||||||
if (_property)
|
delete _property;
|
||||||
delete _property;
|
delete _condition;
|
||||||
|
|
||||||
if (_condition)
|
|
||||||
delete _condition;
|
|
||||||
|
|
||||||
_volume.clear();
|
_volume.clear();
|
||||||
_pitch.clear();
|
_pitch.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user