OpenXRay / xray-16

Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. Join OpenXRay! ;)
https://discord.gg/sjRMQwv
Other
2.96k stars 454 forks source link

Linux - now that EAX work it doesn't seem to be applied correclty #1278

Closed BielBdeLuna closed 4 months ago

BielBdeLuna commented 1 year ago

Describe the bug the main menu, and the opening videos, are played with EAX effects, now this shouldn't be the case. it could be said that the whole game seems to be playing inside a big tunnel. so it doesn't seem to have changes in the EAX profiles during the gameplay ( I don't know how well is EAX implemented in the original Windows game to begin with ).

also some of the sounds of the UI ( like having a new mission, or arguably the radio messages (are those supposed to be played in the PDA or in a headgear set?) ) or sounds like the music, or the ambient sound beds, those shouldn't have EAX applied to them.

To Reproduce just by opening the engine, all sounds will have already a fixed EAX profile running. so the menus and the opening videos should sound already wrong.

Expected behavior use EAX profiles smarter

Screenshots nope

BugTrap error report none

Desktop (please complete the following information):

Additional context is EAX in windows working? how well it works?

Xottab-DUTY commented 1 year ago

Meh! We just came to the start when reverb is being applied to all sounds! Whatta heck, yay!

johncurley commented 1 year ago

It's EFX replacements for EAX, one thing that might need to be adjusted is the effects gain as it's current set to maximum(1, though really it's a 10 as it can be broken down into fractional increments).

Xottab-DUTY commented 1 year ago

Gain won't really fix the problem of effects being applied to the sounds that should not be affected...

johncurley commented 1 year ago

Gain won't really fix the problem of effects being applied to the sounds that should not be affected...

I don't really notice that myself. Only some of the sounds have the effects applied.

BielBdeLuna commented 1 year ago

At the moment all sounds seems to use the same profile EFX even when they shouldn't use any. The gain of the EFX profile should descent and ascent naturally with the distance to the sound source like they actually do.

johncurley commented 1 year ago

It does run through an update function but it is very loud and might overpower some other sounds. In terms of the scripts and what they have applied for the original game. Except sounds like footprints and ambient noises are not accelerated, they sound a lot quieter so maybe if we turn the effects gain down it might help the non EFX sounds be heard? As for having EFX in the menu, etc, I don't know. I don't have that issue.

BielBdeLuna commented 1 year ago

As for having EFX in the menu, etc, I don't know. I don't have that issue.

Are you running the engine in Linux or in Windows?

johncurley commented 1 year ago

Linux. EFX doesn't work on Windows as EAX currently overrides it.

BielBdeLuna commented 1 year ago

Is there a way to debug what profile of EFX is being used per sound?

johncurley commented 1 year ago

void CSoundRender_EffectsA_EFX::commit() { /* Tell the effect slot to use the loaded effect object. Note that the this

I would probably try setting A_CHK(alAuxiliaryEffectSlotf(slot, AL_EFFECTSLOT_GAIN, 1.f)); to A_CHK(alAuxiliaryEffectSlotf(slot, AL_EFFECTSLOT_GAIN, 0.5f)); or something and seeing how that effects the game. But I don't get reverb in the menus. The sound effects are all in SOundRender_EffectsA_EFX.cpp under set_listener()

BielBdeLuna commented 1 year ago

afterwards I'll try to capture a video with the sound and how it works in my end

johncurley commented 1 year ago

Maybe send the log, seems like something unusual is going on.

BielBdeLuna commented 1 year ago

just open the engine, display the videos with the EFX reverb, the main menu with the EFX reverb, and exit to Windows (no main game started at all:

the log

``` ! Couldn't create surface from image: Parameter 'src' is invalid OpenXRay Release Master Gold build 8817, Mar 29 2023 (Linux 64-bit, shared) Custom build from commit[3ee814fa0b1855e368d036dae600d6655565db64] branch[dev] command line * CPU features: RDTSC, MMX, SSE, AVX * CPU threads: 8 Initializing File System... $fs_root$ = /home/biel/.local/share/GSC Game World/S.T.A.L.K.E.R. - Call of Pripyat/ using fs-ltx fsgame.ltx FS: 40612 files cached 29 archives, 0Kb memory used. Init FileSystem 0.290204 sec -----loading \home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\system.ltx -----loading \home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\system.ltx ! Failed to determine on which monitor the game is launched. ! SDL: Invalid window Starting INPUT device... Loading module: xrRender_GL Available render modes[1]: renderer_rgl Executing config-script "user.ltx"... [\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\user.ltx] successfully loaded. Selected renderer: renderer_rgl Loading module: xrGame Initializing Engine... SOUND: OpenAL: system default sound device name is OpenAL Soft Executing config-script "\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\default_controls.ltx"... [\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\default_controls.ltx] successfully loaded. Executing config-script "user.ltx"... Executing config-script "\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\rspec_extreme.ltx"... [\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\rspec_extreme.ltx] successfully loaded. Executing config-script "\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\default_controls.ltx"... [\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\default_controls.ltx] successfully loaded. ~ Invalid syntax in call to 'sv_adm_menu_ban_time' ~ Valid arguments: ui_mp_am_10_minutes/ui_mp_am_30_minutes/ui_mp_am_1_hour/ui_mp_am_6_hours/ui_mp_am_1_day/ui_mp_am_1_week/ui_mp_am_1_month/ui_mp_am_3_monthes/ui_mp_am_forever ~ Invalid syntax in call to 'sv_suspicious_actions_ban_time' ~ Valid arguments: ui_mp_am_10_minutes/ui_mp_am_30_minutes/ui_mp_am_1_hour/ui_mp_am_6_hours/ui_mp_am_1_day/ui_mp_am_1_week/ui_mp_am_1_month/ui_mp_am_3_monthes/ui_mp_am_forever [\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\user.ltx] successfully loaded. SOUND: Selected device is OpenAL Soft * SOUND: EFX extension: present * sound : cache: 65537 kb, 4856 lines, 13820 bpl Starting RENDER device... * GPU vendor: [AMD] device: [AMD Radeon Vega 10 Graphics (raven, LLVM 15.0.2, DRM 3.47, 5.19.0-38-generic)] * GPU OpenGL version: 4.6 (Core Profile) Mesa 22.2.5 * GPU OpenGL shading language version: 4.60 * GPU OpenGL VTF units: [32] CTI units: [192] * DVB created: 4096K * DIB created: 512K ! Renderer doesn't support blender 'effects\shadow_world' * HWDST/PCF supported and used Starting engine... * [ Linux ]: free[123984 K], reserved[132180 K], committed[5941496 K] * [ Render ]: textures[4330 K] * [ x-ray ]: process heap[235 K] * [ x-ray ]: economy: strings[7932 K], smem[0 K] Config-file [\home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\user.ltx] saved successfully Destroying Render... ```

johncurley commented 1 year ago

That's my alsoft.rc

https://pastebin.com/fa3cvea5

Just compiling from the main repo now as I was using the EFX branch.

BielBdeLuna commented 1 year ago

try putting it in

details summary your sumary /summary p (leave an space here) your content here (select this content nd press the code button "< >" ) (leave an space here) /p /details

all this codewords within "<" and ">"

so you're not dependant on pastebin:

your alsoft.rc as an example

``` # possible). Note: options that are left unset may default to app- or system- # specified values. These are the current available settings: ## ## General stuff ## [general] ## disable-cpu-exts: (global) # Disables use of specialized methods that use specific CPU intrinsics. # Certain methods may utilize CPU extensions for improved performance, and # this option is useful for preventing some or all of those methods from being # used. The available extensions are: sse, sse2, sse3, sse4.1, and neon. # Specifying 'all' disables use of all such specialized methods.details summary your sumary /dumary p #disable-cpu-exts = ## drivers: (global) # Sets the backend driver list order, comma-seperated. Unknown backends and # duplicated names are ignored. Unlisted backends won't be considered for use # unless the list is ended with a comma (e.g. 'oss,' will try OSS first before # other backends, while 'oss' will try OSS only). Backends prepended with - # won't be considered for use (e.g. '-oss,' will try all available backends # except OSS). An empty list means to try all backends. drivers = pulse ## channels: # Sets the output channel configuration. If left unspecified, one will try to # be detected from the system, and defaulting to stereo. The available values # are: mono, stereo, quad, surround51, surround51rear, surround61, surround71, # ambi1, ambi2, ambi3. Note that the ambi* configurations provide ambisonic # channels of the given order (using ACN ordering and SN3D normalization by # default), which need to be decoded to play correctly on speakers. channels = stereo ## sample-type: # Sets the output sample type. Currently, all mixing is done with 32-bit float # and converted to the output sample type as needed. Available values are: # int8 - signed 8-bit int # uint8 - unsigned 8-bit int # int16 - signed 16-bit int # uint16 - unsigned 16-bit int # int32 - signed 32-bit int # uint32 - unsigned 32-bit int # float32 - 32-bit float #sample-type = float32 ## frequency: # Sets the output frequency. If left unspecified it will try to detect a # default from the system, otherwise it will default to 44100. frequency = 48000 ## period_size: # Sets the update period size, in frames. This is the number of frames needed # for each mixing update. Acceptable values range between 64 and 8192. period_size = 1024 ## periods: # Sets the number of update periods. Higher values create a larger mix ahead, # which helps protect against skips when the CPU is under load, but increases # the delay between a sound getting mixed and being heard. Acceptable values # range between 2 and 16. periods = 2 ## stereo-mode: # Specifies if stereo output is treated as being headphones or speakers. With # headphones, HRTF or crossfeed filters may be used for better audio quality. # Valid settings are auto, speakers, and headphones. stereo-mode = headphones ## stereo-encoding: # Specifies the encoding method for non-HRTF stereo output. 'panpot' (default) # uses standard amplitude panning (aka pair-wise, stereo pair, etc) between # -30 and +30 degrees, while 'uhj' creates stereo-compatible two-channel UHJ # output, which encodes some surround sound information into stereo output # that can be decoded with a surround sound receiver. If crossfeed filters are # used, UHJ is disabled. #stereo-encoding = panpot ## ambi-format: # Specifies the channel order and normalization for the "ambi*" set of channel # configurations. Valid settings are: fuma, acn+sn3d, acn+n3d #ambi-format = acn+sn3d ## hrtf: # Controls HRTF processing. These filters provide better spatialization of # sounds while using headphones, but do require a bit more CPU power. The # default filters will only work with 44100hz or 48000hz stereo output. While # HRTF is used, the cf_level option is ignored. Setting this to auto (default) # will allow HRTF to be used when headphones are detected or the app requests # it, while setting true or false will forcefully enable or disable HRTF # respectively. hrtf = true ## hrtf-mode: # Specifies the rendering mode for HRTF processing. Setting the mode to full # (default) applies a unique HRIR filter to each source given its relative # location, providing the clearest directional response at the cost of the # highest CPU usage. Setting the mode to ambi1, ambi2, or ambi3 will instead # mix to a first-, second-, or third-order ambisonic buffer respectively, then # decode that buffer with HRTF filters. Ambi1 has the lowest CPU usage, # replacing the per-source HRIR filter for a simple 4-channel panning mix, but # retains full 3D placement at the cost of a more diffuse response. Ambi2 and # ambi3 increasingly improve the directional clarity, at the cost of more CPU # usage (still less than "full", given some number of active sources). hrtf-mode = full ## default-hrtf: # Specifies the default HRTF to use. When multiple HRTFs are available, this # determines the preferred one to use if none are specifically requested. Note # that this is the enumerated HRTF name, not necessarily the filename. default-hrtf = irc_1057_48000 ## hrtf-paths: # Specifies a comma-separated list of paths containing HRTF data sets. The # format of the files are described in docs/hrtf.txt. The files within the # directories must have the .mhr file extension to be recognized. By default, # OS-dependent data paths will be used. They will also be used if the list # ends with a comma. On Windows this is: # $AppData\openal\hrtf # And on other systems, it's (in order): # $XDG_DATA_HOME/openal/hrtf (defaults to $HOME/.local/share/openal/hrtf) # $XDG_DATA_DIRS/openal/hrtf (defaults to /usr/local/share/openal/hrtf and # /usr/share/openal/hrtf) hrtf-paths = . ## cf_level: # Sets the crossfeed level for stereo output. Valid values are: # 0 - No crossfeed # 1 - Low crossfeed # 2 - Middle crossfeed # 3 - High crossfeed (virtual speakers are closer to itself) # 4 - Low easy crossfeed # 5 - Middle easy crossfeed # 6 - High easy crossfeed # Users of headphones may want to try various settings. Has no effect on non- # stereo modes. #cf_level = 1 ## resampler: (global) # Selects the resampler used when mixing sources. Valid values are: # point - nearest sample, no interpolation # linear - extrapolates samples using a linear slope between samples # cubic - extrapolates samples using a Catmull-Rom spline # bsinc12 - extrapolates samples using a band-limited Sinc filter (varying # between 12 and 24 points, with anti-aliasing) # bsinc24 - extrapolates samples using a band-limited Sinc filter (varying # between 24 and 48 points, with anti-aliasing) #resampler = bsinc24 ## rt-prio: (global) # Sets real-time priority for the mixing thread. Not all drivers may use this # (eg. PortAudio) as they already control the priority of the mixing thread. # 0 and negative values will disable it. Note that this may constitute a # security risk since a real-time priority thread can indefinitely block # normal-priority threads if it fails to wait. As such, the default is # disabled. #rt-prio = 0 ## sources: # Sets the maximum number of allocatable sources. Lower values may help for # systems with apps that try to play more sounds than the CPU can handle. sources = 1024 ## slots: # Sets the maximum number of Auxiliary Effect Slots an app can create. A slot # can use a non-negligible amount of CPU time if an effect is set on it even # if no sources are feeding it, so this may help when apps use more than the # system can handle. #slots = 64 ## sends: # Limits the number of auxiliary sends allowed per source. Setting this higher # than the default has no effect. #sends = 16 ## front-stablizer: # Applies filters to "stablize" front sound imaging. A psychoacoustic method # is used to generate a front-center channel signal from the front-left and # front-right channels, improving the front response by reducing the combing # artifacts and phase errors. Consequently, it will only work with channel # configurations that include front-left, front-right, and front-center. #front-stablizer = false ## output-limiter: # Applies a gain limiter on the final mixed output. This reduces the volume # when the output samples would otherwise clamp, avoiding excessive clipping # noise. #output-limiter = true ## dither: # Applies dithering on the final mix, for 8- and 16-bit output by default. # This replaces the distortion created by nearest-value quantization with low- # level whitenoise. #dither = true ## dither-depth: # Quantization bit-depth for dithered output. A value of 0 (or less) will # match the output sample depth. For int32, uint32, and float32 output, 0 will # disable dithering because they're at or beyond the rendered precision. The # maximum dither depth is 24. #dither-depth = 24 ## volume-adjust: # A global volume adjustment for source output, expressed in decibels. The # value is logarithmic, so +6 will be a scale of (approximately) 2x, +12 will # be a scale of 4x, etc. Similarly, -6 will be x1/2, and -12 is about x1/4. A # value of 0 means no change. volume-adjust = 0 ## excludefx: (global) # Sets which effects to exclude, preventing apps from using them. This can # help for apps that try to use effects which are too CPU intensive for the # system to handle. Available effects are: eaxreverb,reverb,chorus,compressor, # distortion,echo,equalizer,flanger,modulator,dedicated #excludefx = ## default-reverb: (global) # A reverb preset that applies by default to all sources on send 0 # (applications that set their own slots on send 0 will override this). # Available presets are: None, Generic, PaddedCell, Room, Bathroom, # Livingroom, Stoneroom, Auditorium, ConcertHall, Cave, Arena, Hangar, # CarpetedHallway, Hallway, StoneCorridor, Alley, Forest, City, Moutains, # Quarry, Plain, ParkingLot, SewerPipe, Underwater, Drugged, Dizzy, Psychotic. #default-reverb = ## trap-alc-error: (global) # Generates a SIGTRAP signal when an ALC device error is generated, on systems # that support it. This helps when debugging, while trying to find the cause # of a device error. On Windows, a breakpoint exception is generated. #trap-alc-error = false ## trap-al-error: (global) # Generates a SIGTRAP signal when an AL context error is generated, on systems # that support it. This helps when debugging, while trying to find the cause # of a context error. On Windows, a breakpoint exception is generated. #trap-al-error = false ## ## Ambisonic decoder stuff ## [decoder] ## hq-mode: # Enables a high-quality ambisonic decoder. This mode is capable of frequency- # dependent processing, creating a better reproduction of 3D sound rendering # over surround sound speakers. Enabling this also requires specifying decoder # configuration files for the appropriate speaker configuration you intend to # use (see the quad, surround51, etc options below). Currently, up to third- # order decoding is supported. #hq-mode = false ## distance-comp: # Enables compensation for the speakers' relative distances to the listener. # This applies the necessary delays and attenuation to make the speakers # behave as though they are all equidistant, which is important for proper # playback of 3D sound rendering. Requires the proper distances to be # specified in the decoder configuration file. # distance-comp = true ## nfc: # Enables near-field control filters. This simulates and compensates for low- # frequency effects caused by the curvature of nearby sound-waves, which # creates a more realistic perception of sound distance. Note that the effect # may be stronger or weaker than intended if the application doesn't use or # specify an appropriate unit scale, or if incorrect speaker distances are set # in the decoder configuration file. Requires hq-mode to be enabled. #nfc = true ## nfc-ref-delay # Specifies the reference delay value for ambisonic output. When channels is # set to one of the ambi* formats, this option enables NFC-HOA output with the # specified Reference Delay parameter. The specified value can then be shared # with an appropriate NFC-HOA decoder to reproduce correct near-field effects. # Keep in mind that despite being designed for higher-order ambisonics, this # applies to first-order output all the same. When left unset, normal output # is created with no near-field simulation. nfc-ref-delay = ## quad: # Decoder configuration file for Quadrophonic channel output. See # docs/ambdec.txt for a description of the file format. quad = ## surround51: # Decoder configuration file for 5.1 Surround (Side and Rear) channel output. # See docs/ambdec.txt for a description of the file format. surround51 = ## surround61: # Decoder configuration file for 6.1 Surround channel output. See # docs/ambdec.txt for a description of the file format. surround61 = ## surround71: # Decoder configuration file for 7.1 Surround channel output. See # docs/ambdec.txt for a description of the file format. Note: This can be used # to enable 3D7.1 with the appropriate configuration and speaker placement, # see docs/3D7.1.txt. surround71 = ## ## Reverb effect stuff (includes EAX reverb) ## [reverb] ## boost: (global) # A global amplification for reverb output, expressed in decibels. The value # is logarithmic, so +6 will be a scale of (approximately) 2x, +12 will be a # scale of 4x, etc. Similarly, -6 will be about half, and -12 about 1/4th. A # value of 0 means no change. #boost = 0 ## ## PulseAudio backend stuff ## [pulse] ## spawn-server: (global) # Attempts to autospawn a PulseAudio server whenever needed (initializing the # backend, enumerating devices, etc). Setting autospawn to false in Pulse's # client.conf will still prevent autospawning even if this is set to true. #spawn-server = true ## allow-moves: (global) # Allows PulseAudio to move active streams to different devices. Note that the # device specifier (seen by applications) will not be updated when this # occurs, and neither will the AL device configuration (sample rate, format, # etc). #allow-moves = false ## fix-rate: # Specifies whether to match the playback stream's sample rate to the device's # sample rate. Enabling this forces OpenAL Soft to mix sources and effects # directly to the actual output rate, avoiding a second resample pass by the # PulseAudio server. #fix-rate = false ## ## ALSA backend stuff ## [alsa] ## device: (global) # Sets the device name for the default playback device. #device = default ## device-prefix: (global) # Sets the prefix used by the discovered (non-default) playback devices. This # will be appended with "CARD=c,DEV=d", where c is the card id and d is the # device index for the requested device name. #device-prefix = plughw: ## device-prefix-*: (global) # Card- and device-specific prefixes may be used to override the device-prefix # option. The option may specify the card id (eg, device-prefix-NVidia), or # the card id and device index (eg, device-prefix-NVidia-0). The card id is # case-sensitive. #device-prefix- = ## capture: (global) # Sets the device name for the default capture device. #capture = default ## capture-prefix: (global) # Sets the prefix used by the discovered (non-default) capture devices. This # will be appended with "CARD=c,DEV=d", where c is the card id and d is the # device number for the requested device name. #capture-prefix = plughw: ## capture-prefix-*: (global) # Card- and device-specific prefixes may be used to override the # capture-prefix option. The option may specify the card id (eg, # capture-prefix-NVidia), or the card id and device index (eg, # capture-prefix-NVidia-0). The card id is case-sensitive. #capture-prefix- = ## mmap: # Sets whether to try using mmap mode (helps reduce latencies and CPU # consumption). If mmap isn't available, it will automatically fall back to # non-mmap mode. True, yes, on, and non-0 values will attempt to use mmap. 0 # and anything else will force mmap off. #mmap = true ## allow-resampler: # Specifies whether to allow ALSA's built-in resampler. Enabling this will # allow the playback device to be set to a different sample rate than the # actual output, causing ALSA to apply its own resampling pass after OpenAL # Soft resamples and mixes the sources and effects for output. #allow-resampler = false ## ## OSS backend stuff ## [oss] ## device: (global) # Sets the device name for OSS output. #device = /dev/dsp ## capture: (global) # Sets the device name for OSS capture. #capture = /dev/dsp ## ## Solaris backend stuff ## [solaris] ## device: (global) # Sets the device name for Solaris output. #device = /dev/audio ## ## QSA backend stuff ## [qsa] ## ## JACK backend stuff ## [jack] ## spawn-server: (global) # Attempts to autospawn a JACK server whenever needed (initializing the # backend, opening devices, etc). #spawn-server = false ## buffer-size: # Sets the update buffer size, in samples, that the backend will keep buffered # to handle the server's real-time processing requests. This value must be a # power of 2, or else it will be rounded up to the next power of 2. If it is # less than JACK's buffer update size, it will be clamped. This option may # be useful in case the server's update size is too small and doesn't give the # mixer time to keep enough audio available for the processing requests. #buffer-size = 0 ## ## MMDevApi backend stuff ## [mmdevapi] ## ## DirectSound backend stuff ## [dsound] ## ## Windows Multimedia backend stuff ## [winmm] ## ## PortAudio backend stuff ## [port] ## device: (global) # Sets the device index for output. Negative values will use the default as # given by PortAudio itself. #device = -1 ## capture: (global) # Sets the device index for capture. Negative values will use the default as # given by PortAudio itself. #capture = -1 ## ## Wave File Writer stuff ## [wave] ## file: (global) # Sets the filename of the wave file to write to. An empty name prevents the # backend from opening, even when explicitly requested. # THIS WILL OVERWRITE EXISTING FILES WITHOUT QUESTION! #file = ## bformat: (global) # Creates AMB format files using first-order ambisonics instead of a standard # single- or multi-channel .wav file. #bformat = false ```

BielBdeLuna commented 1 year ago

where should I locate the file alsoft.rc?

johncurley commented 1 year ago

where should I locate the file alsoft.rc?

You need to create it, it's also a dot file so .alsoft.rc and it lives in your user home directory.

BielBdeLuna commented 1 year ago

so I copied your alsoft.rc and named .alsoft.rc and saved in my home dir. I reboot and do I something else?

johncurley commented 1 year ago

so I copied your alsoft.rc and named .alsoft.rc and saved in my home dir. I reboot and do I something else?

Not sure yet, I'm compiling from the main branch to make sure we're using the same codebase. I was using the efx branch before.

BielBdeLuna commented 1 year ago

I tested the engine to no avail though. an incorrect EFX profile is being used in the main menu. but this doesn't change the fact that a single EFX profile is being used all through the sound of the engine when the EAX option is ON, the al sound in a tunnel effect that I related before

In other engines, yQuake2, Dhewm3, gzDoom, I get correct EFX sound effects so a file in the home directory shouldn't solve this anyway, it's got to be another thing.

johncurley commented 1 year ago

I tested the engine to no avail though. an incorrect EFX profile is being used in the main menu. but this doesn't change the fact that a single EFX profile is being used all through the sound of the engine when the EAX option is ON, the al sound in a tunnel effect that I related before

In other engines, yQuake2, Dhewm3, gzDoom, I get correct EFX sound effects so a file in the home directory shouldn't solve this anyway, it's got to be another thing.

I just tried the main repository and it seems to have disabled the EFX effects. Not sure what is going on here. I'll do some testing on the EFX branch.

BielBdeLuna commented 1 year ago

maybe you have the EAX option in the sound menu as OFF?

johncurley commented 1 year ago

maybe you have the EAX option in the sound menu as OFF?

I forgot to update my fork to the latest. I'll try now with all the effects added. Personally on my EFX branch I didn't get any issues and the sound doesn't echo in the menu. Only certain sounds are affected.

johncurley commented 1 year ago

I tested the engine to no avail though. an incorrect EFX profile is being used in the main menu. but this doesn't change the fact that a single EFX profile is being used all through the sound of the engine when the EAX option is ON, the al sound in a tunnel effect that I related before

In other engines, yQuake2, Dhewm3, gzDoom, I get correct EFX sound effects so a file in the home directory shouldn't solve this anyway, it's got to be another thing.

This is kind of odd because it was doing this with an incorrect profile before I set up the effects so it must be something else that is causing that reverb to work on the main menu. I'll look into this for the next pull request which will add the extra EFX effects that were not added in the initial commit.

BielBdeLuna commented 1 year ago

Yay! 😊

BielBdeLuna commented 1 year ago

In the Doom3 codebase (one that I know a lot ) there are "sound worlds" the main menu is in a sound world different, than the gameplay, in the way the sound switches in-between the main menu and the gameplay I bet there's something similar going on in OpenXray, maybe, to begin with, EFX could be excluded to the sound space of the menus.

BielBdeLuna commented 1 year ago

Also if there is not serious work put by GSC in the EAX profiles ( i've never listened how well the game had EAX effects in Windows ), maybe there could be a system similar to the system recently implemented in yQuake2 where every n frame there are a series of traces around the player that determine the space he is in, and given that defined space around the player, a EAX profile is selected dynamically. So trees could make the reverb to tend to increase, but bushes could make it tend to disappear, while concrete could make it's presence much more clearly present.

johncurley commented 1 year ago

Also if there is not serious work put by GSC in the EAX profiles ( i've never listened how well the game had EAX effects in Windows ), maybe there could be a system similar to the system recently implemented in yQuake2 where every n frame there are a series of traces around the player that determine the space he is in, and given that defined space around the player, a EAX profile is selected dynamically. So trees could make the reverb to tend to increase, but bushes could make it tend to disappear, while concrete could make it's presence much more clearly present.

After doing some research into this issue, it turns out that GSC while they have audio zone support in the editor for baking into the maps, it's not actually implemented in any of the original games and the code was edited out. From what I can gather(I didn't look seriously into this until recently) once the EFX/EAX auxiliary effect is loaded it is used immediately in the sound effect engine without dynamically being turned on or off based on circumstances. This possibly could require a refactor of the sound backend and the inclusion of environment zone files for the editor(which are binary and are compiled by the map tools). Though I haven't worked out a solution yet, I think for now I recommend turning off EAX across all game versions until this can be resolved.

So either including zone files when installing Open X-Ray or else the development of a new file format(though this isn't practical for the existing games and would only benefit mods). I do believe the files being binary are also architecture dependent though I can't confirm this.

BielBdeLuna commented 1 year ago

In Windows using the vanilla engine, in Shadow of Chornobyl, I remember that sometimes (yeah sometimes because there the EAX effect failed) the EAX reverb could be heard in the cordon village houses, inside the small rooms with ladders underneath the houses, so maybe the audio zone where implemented in SOC and latter abandoned? maybe they where implemented too in the MP maps of SOC?

Xottab-DUTY commented 1 year ago

Yes, some SOC maps have sounds zones. CS/COP don't have sounds zones at all.

BielBdeLuna commented 1 year ago

Quake 2 didn't had any sort of EFX zones predefined at all, and yet, now the port "yQuake2" (yamagi quake2) has EFX reverbs adaptating to the given room the player is in, maybe tracing a number of rays around the player every n frames, a room can be estimated and then an appropriate EFX profile be selected according to the given estimation?

johncurley commented 1 year ago

Nobody on the team is a sound engineer, we did initially try that with the auto-send for auxiliary effects though it seems to have caused more trouble than what it's worth. Currently we are working on a replacement with EFX that will utilize sound zones and multiple effect slots and auxiliary filters interacting with each other. It will take time though as it's a non-trivial replacement and I don't believe there's any easy way to do it.

Xottab-DUTY commented 1 year ago

@BielBdeLuna this issue should have been fixed with #1297. Can you confirm with the latest commits?

Xottab-DUTY commented 4 months ago
  1. I'm not sure, but that might have been fixed with #1297.
  2. EFX is to be deleted in favor of and replaced by SteamAudio anyway.