5.1 sound for Windows #925
Comments
i-NoD commented O_o You're jocking, right? |
BlueMaxima commented ...what the hell. |
BlueMaxima <bluemaximax011@...> commented OK, now that I've had a moment to think about it - he wants 5.1 Surround Sound in the game. Which, in the state of the game's source, is as ridiculous as trying to travel backwards in time. |
cybersphinx changed status from |
cybersphinx set resolution to |
cybersphinx commented I think this is a configuration issue of OpenAL, on my Linux system it defaults to stereo (in /etc/openal/alsoft.conf). Afaik the game itself doesn't limit the sound channels and should do as many as OpenAL is configured to use. I don't know how to configure it in Windows, if you find out, please post it here or in the forums. |
anonymous commented Replying to [#925 anonymous]:
ROFLOL! Dude, your such a brownnoser, the title should be BRAIN NEED! :P Replying to Warzone2100/old-trac-import#925 (comment:4):
|
i-NoD changed type from |
i-NoD changed resolution from |
i-NoD edited the issue description |
i-NoD changed title from |
i-NoD commented Hmm... trollercoaster?! The problem with the multichannel (>2) sound on Windows is caused by a hack in sound wz system (lib/sound/openal_track.c). Current implementation is always using generic software renderer instead of using a system default one (excluding the case with some poor systems where only generic OpenAL renderer exists). And the |
i-NoD changed status from |
i-NoD uploaded file |
cybersphinx commented Hm, so it actually is Warzone's fault, with a Windows-specific hack... How about a generic OpenAl device selection? No need for system-specific hacks, and it isn't limited to hardcoded choices. Might also be useful on other systems, though most Linuxes configure OpenAL correctly these days. Also, you included some unrelated changes, at least the vertical text in the menus (which you could just commit separately). |
anonymous commented I tried this on Vista, nothing changed in the 5.1 area but it is worse when you have more than 16 sounds at once. All my games that are 5.1 in XP are stereo in Vista. The default should be like it is now with the generic software device to prevent sound corruption. |
i-NoD commented Replying to Warzone2100/old-trac-import#925 (comment:8):
If you can play 5.1 sound on your system, but can't hear 5.1 in WZ then I guess you just have a "Generic Software" renderer as a default one for OpenAL (not for the system). I just run into this with my new Radeon card. The only way to get 5.1 sound for me now is to force the wanted device by name. You can check currently selected device in wz log with my patch (using --debug all), smth like
If you have "Generic Software" device it explains why do you still have stereo... but I dunno how sound can be worse in that case.
Who is removing the joy of "Generic Software" renderer as a default one? |
Zarel commented Instead of calling the options "On (compatible)", "On", and "Off", we should call them "On (compatible)", "On (surround)", and "Off". |
cybersphinx uploaded file |
cybersphinx commented Above patch implements audio device selection. It basically works here, by saving the changed device on quit and using it on the next run (like the video options), problem with that is that some sound devices may hang on init, and then the config file has to be edited to change it. A better alternative would be switching sound in-game, then it might hang as well, but at least the non-working option isn't saved. Unfortunately the sound lib cannot be restarted, at least not in the simple way I used (by just doing "sound_Shutdown();sound_Init();"), after that any sounds fail with "sound |02:23:04: [sound_CheckTrack] Track number 2 outside max 0". |
cybersphinx commented Hm, actually sound still works after the sound engine restart once you load new sounds, just the already loaded menu blips don't work anymore (so in-game sounds work, and after that menu sounds work again as well). |
i-NoD uploaded file Reworked version. |
i-NoD changed milestone from |
i-NoD commented This version works with current trunk and MSVC. Gives used device name straight on start, no more need for default. Considering the current sound infrastructure I'd say we should force a restart on device change. A small nuisance for less bugs. If sound code would be less troublesome we can change this later on.
not the sound_... sub-calls... |
Zarel commented Just an invisible restart of the soundsystem, not like a restart of the game, right? |
i-NoD commented Nope, a complete quit game/launch game cycle, similar to resolution change. I don't see any problems here at all: a default device will be used by the vast majority... and should be switched only once in a while by advanced user. It takes <10 sec on my laptop... |
Zarel commented ...no way. People have to restart the game just to plug in headphones? That's ridiculous! What's wrong with the current way? |
i-NoD commented Headphones? We're are talking about endpoints at all... :-/ And I think we should n't touch them, let the system handle this matter. It seems to me that you're assumed something unrelated to device selection. Please define 'the current way' for you and try applying the patch then. |
Zarel commented Hmm. What do you mean by "device change", then? I can't really just apply the patch and see what's changed, if I don't know what's changed... |
Buginator commented Replying to Warzone2100/old-trac-import#925 (comment:17):
i-Nod, looks good. Commit it. |
Buginator commented Replying to [comment:19 Buginator]:
Actually, we talked about this on IRC, it might still have issues. |
Crymson commented I tried the patch and it does break the game when I moved the warzone folder to my other machine. |
Buginator changed priority from |
Buginator changed milestone from `` to |
Buginator commented Replying to [comment:21 Crymson]:
Not at this time. |
Ezio commented made simple patch to detect default audio device,
Compiled
|
Ezio uploaded file |
Ezio uploaded file edited i-nod patch |
Ezio uploaded file tiny change for patch above |
Ezio changed _comment0 which not transferred by tractive |
Ezio commented new patch added i edited i-nod patch, since i only have 1 sound device i only test save and load config. and if saved device can't be mounted 0001-added-windows-sound-device.patch only add a some line that i forgot :P |
clueless commented I am not sure if this is related or not but, on a windows laptop, the game's sound wouldn't work at all, until the supplied openAL file was installed. |
clueless commented oalinst.exe is the file that was required. |
klasskill commented doesn't openalsoft handle this on windows already? OpenAL Soft's code has been improved to support mono, stereo, 4-channel, 5.1, 6.1, 7.1, and HRTF output. OpenAL Soft does not support the Vorbis and MP3 extensions however, these are considered deprecated. It does, though, support some of the newer extensions like AL_EXT_FLOAT32 and AL_EXT_MCFORMATS for multi-channel and floating-point formats, as well as ALC_EXT_EFX for environmental audio effects, and others. |
resolution_
type_bug
| by anonymous5.1 sound for Windows
Issue migrated from trac:925 at 2022-04-15 19:14:39 -0700
The text was updated successfully, but these errors were encountered: