Skip to content

Commit

Permalink
Log some tracing messages to stdout.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettle committed Jul 29, 2024
1 parent 6922df9 commit 1ae3177
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/webots/sound/WbSoundEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ static void init() {
gVolume = WbPreferences::instance()->value("Sound/volume", 80).toInt();
WbLog::toggle(stderr); // we want to disable stderr to avoid warnings in the console
try {
std::cout << "Calling alcGetString()" << std::endl;
const ALCchar *defaultDeviceName = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
if (defaultDeviceName == NULL)
throw QObject::tr("Cannot find OpenAL default device");
std::cout << "Calling alcOpenDevice()" << std::endl;
gDefaultDevice = alcOpenDevice(defaultDeviceName);
std::cout << "Called alcOpenDevice()" << std::endl;
if (gDefaultDevice == NULL)
throw QObject::tr("Cannot initialize OpenAL default device '%1'").arg(defaultDeviceName);
gContext = alcCreateContext(gDefaultDevice, NULL);
Expand Down

0 comments on commit 1ae3177

Please sign in to comment.