Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Yarn on July 06, 2015, 11:09:55 pm

Title: OpenAL info in fs2_open.log incorrect?
Post by: Yarn on July 06, 2015, 11:09:55 pm
Specifically, I'm referring to this part of the log:

Code: [Select]
Initializing OpenAL...
  OpenAL Vendor     : Creative Labs Inc.
  OpenAL Renderer   : SB X-Fi Audio [0001]
  OpenAL Version    : OpenAL version 1.1

This example is the information for my Sound Blaster X-Fi card, which has a hardware OpenAL renderer, but it's written to the log even if I use Generic Software or OpenAL Soft.

The game seems to be logging the information for the default OpenAL device, not the one that is actually being used (which doesn't get logged at all). I had a look in the code and found that this is indeed the case--the code the writes these lines is located in the openal_init_device function in openal.cpp just before the code that closes the default device.

To ensure that the info for the selected renderer gets written to the log, the lines of code that writes this info should be copied to a point in ds_init after the "alcMakeContextCurrent(ds_sound_context);" line, with the original code in openal_init_device being either removed or changed to indicate that the info is for the default device (e.g., by adding "Default" to the beginning of each line).
Title: Re: OpenAL info in fs2_open.log incorrect?
Post by: jg18 on July 07, 2015, 09:10:53 am
I am at a convention this week but can look into this when I get back. Thanks for pointing it out.

Similarly, Yarn, I can reply to your question in my test builds thread when I get back,
Title: Re: OpenAL info in fs2_open.log incorrect?
Post by: jg18 on August 07, 2015, 04:19:04 pm
This was fixed in pull request 253.

https://github.com/scp-fs2open/fs2open.github.com/pull/253