[Orxonox-commit 1519] r6237 - code/branches/presentation2/src/orxonox/sound
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Dec 3 22:23:32 CET 2009
Author: rgrieder
Date: 2009-12-03 22:23:32 +0100 (Thu, 03 Dec 2009)
New Revision: 6237
Modified:
code/branches/presentation2/src/orxonox/sound/SoundManager.cc
code/branches/presentation2/src/orxonox/sound/SoundManager.h
Log:
Removed (commented) everything related to ALC (OpenAL library part).
This should fix the freeze problems when shutting down orxonox.
Modified: code/branches/presentation2/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/presentation2/src/orxonox/sound/SoundManager.cc 2009-12-03 20:36:22 UTC (rev 6236)
+++ code/branches/presentation2/src/orxonox/sound/SoundManager.cc 2009-12-03 21:23:32 UTC (rev 6237)
@@ -54,10 +54,18 @@
{
RegisterRootObject(SoundManager);
+/*
if (!alutInitWithoutContext(NULL, NULL))
+*/
+ if (!alutInit(NULL, NULL))
ThrowException(InitialisationFailed, "Sound: OpenAL ALUT error: " << alutGetErrorString(alutGetError()));
Loki::ScopeGuard alutExitGuard = Loki::MakeGuard(&alutExit);
+ // Note: Everything related to ALC has been commented because there seem to be
+ // very serious problems with the unloading sequence (complete freeze on Linux,
+ // sometimes really everything gone, including response to any signals).
+ // For the moment ALUT can do everything we need so far.
+/*
COUT(3) << "Sound: OpenAL: Opening sound device..." << std::endl;
this->device_ = alcOpenDevice(NULL);
if (this->device_ == NULL)
@@ -86,12 +94,15 @@
COUT(2) << "Sound: OpenAL ALUT error: " << alutGetErrorString(alutGetError()) << std::endl;
else
COUT(4) << "Sound: OpenAL ALUT supported MIME types: " << str << std::endl;
+*/
GameMode::setPlaysSound(true);
// Disarm guards
alutExitGuard.Dismiss();
+/*
closeDeviceGuard.Dismiss();
desroyContextGuard.Dismiss();
+*/
this->setVolumeInternal(1.0, SoundType::none);
this->setVolumeInternal(1.0, SoundType::ambient);
@@ -107,8 +118,10 @@
SoundManager::~SoundManager()
{
GameMode::setPlaysSound(false);
+/*
alcDestroyContext(this->context_);
alcCloseDevice(this->device_);
+*/
alutExit();
}
Modified: code/branches/presentation2/src/orxonox/sound/SoundManager.h
===================================================================
--- code/branches/presentation2/src/orxonox/sound/SoundManager.h 2009-12-03 20:36:22 UTC (rev 6236)
+++ code/branches/presentation2/src/orxonox/sound/SoundManager.h 2009-12-03 21:23:32 UTC (rev 6237)
@@ -110,8 +110,10 @@
void setVolumeInternal(float vol, SoundType::Value type);
float getVolumeInternal(SoundType::Value type);
+/*
ALCdevice* device_;
ALCcontext* context_;
+*/
typedef std::list<std::pair<AmbientSound*, bool> > AmbientList;
AmbientList ambientSounds_;
More information about the Orxonox-commit
mailing list