rigs-of-rods icon indicating copy to clipboard operation
rigs-of-rods copied to clipboard

SoundManager Error

Open WillyB1337 opened this issue 8 years ago • 13 comments

When I try to configure an audio device to RoR by the configurator, The CFG shows strange characters on the device's driver
RoR.txt

The RoR.log RoR.txt

Error shows at line 306 14:15:42: OpenAL Error: (null) (0xa004), @ D:\Jenkins\workspace\rigs-of-rods\source\main\audio\SoundManager.cpp:68 14:15:42: SoundScriptManager: Sound Manager is disabled

What I see ingame capture

WillyB1337 avatar Feb 13 '16 19:02 WillyB1337

Workaround: After saving the RoR.cfg from RoRConfig, use a text editor (Notepad in Windows is enough) to convert the file to UTF-8 encoding.

ohlidalp avatar Feb 13 '16 19:02 ohlidalp

UPDATE (RoR 4.6 Installer)

Still doing the same thing. Is this possible to fix this before the release? capture

WillyB1337 avatar Feb 19 '16 23:02 WillyB1337

For some reason, Unicode conversion doesn't do it's job in RoRConfig.

These are our conversion functions: https://github.com/RigsOfRods/rigs-of-rods/blob/86b6bc5f95b9abd937b270747b2c7e0137b65fe8/source/configurator/wxutils.h#L12-L35

And this is the code which searches for audio drivers: https://github.com/RigsOfRods/rigs-of-rods/blob/86b6bc5f95b9abd937b270747b2c7e0137b65fe8/source/configurator/Configurator.cpp#L1428-L1438 ~ it DOES use the conversion functions.

Something's not working right here

ohlidalp avatar Feb 22 '16 13:02 ohlidalp

Are you sure it's really UTF8, or UTF-8? 0.4.5.1 didn't have any issue like this Somebody modified something.

WillyB1337 avatar Feb 22 '16 13:02 WillyB1337

@WillyB1337 It's https://en.wikipedia.org/wiki/UTF-8, sorry for the ambiguity.

0.4.5.1 didn't have any issue like this

Are you sure? Please change your RoR.cfg using 0.4.5.1's RoRConfig and post it here. Also, run 0.4.5.1 and post me a screenshot of the settings dialog. Thanks. EDIT: Yes, there was a change. We updated our sound library (OpenAL Soft), and the detected names of drivers are different. 0.4.5.1 probably reported something without national characters, so there was no issue. Post me the RoR.cfg + screenshot anyway, please @WillyB1337 .

ohlidalp avatar Feb 22 '16 13:02 ohlidalp

RoR 4.5.1.0 uses OpenAL Soft 1.13. Not sure what newer builds use on Windows but probably something >= 1.16.

OpenAL Soft 1.16.0 is now available: [...] For Windows systems, device specifier strings are now UTF-8 and thus can support device names with Unicode characters. File paths that contain Unicode characters (such as the path to alsoft.ini, or a path specified for the hrtf_tables config option) also work.

http://openal.org/pipermail/openal/2014-August/000202.html

I guess the conversion is now unnecessary and could even break things.

Hiradur avatar Jul 18 '16 08:07 Hiradur

@Hiradur Thanks for the update.

RoR itself doesn't do any charset conversions, only sanitization via utf8cpp and utf-8/16 conversions for MyGUI.

RoRConfig, however, does some conversions IIRC. Needs inspection.

ohlidalp avatar Jul 20 '16 13:07 ohlidalp

Should be fixed with: https://github.com/RigsOfRods/rigs-of-rods/pull/1113

AnotherFoxGuy avatar Oct 22 '16 13:10 AnotherFoxGuy

I believe this is still unresolved.

ohlidalp avatar Oct 24 '16 11:10 ohlidalp

@WillyB1337 is this still an issue with imgui?

tritonas00 avatar Oct 05 '21 04:10 tritonas00

If the new UI handles utf8cpp and utf-8/16 correctly then I don't believe theres an issue anymore.

WillyB1337 avatar Oct 05 '21 12:10 WillyB1337

imgui and roboto font should handle this properly now, but will ask Petr to make sure

tritonas00 avatar Oct 06 '21 00:10 tritonas00

We query the audio device name from OpenALSoft, and it looks like we get it in ANSI encoding (OEM charset, like Windows-1250) but treat it as UTF-8 encoded (Unicode charset).

Imgui handles utf8 properly and our fonts have all Unicode support (thanks to @tritonas00), so this is definitely not an UI issue.

ohlidalp avatar Oct 06 '21 10:10 ohlidalp