The L.U.R.K. team wants to provide the best possible experience from Stalker: Shadow of Chernobyl, we don't plan to skew the scope of this game, because I, like many others, fell in love with the game because of the story, the realistic gameplay, and the atmosphere. I plan to preserve and improve on that concept to the best of my abilities, and our team has vowed to do so as well. Which is why we took it upon ourselves to provide that experience. We want to fulfill a niche that's otherwise unfulfilled in the modding community. We want to bring as many features to Stalker without damaging or changing the original theme of the game. While improving upon that concept with features that were dropped off the development cycle from GSC, such as stealth AI, and a strong foundation for balance, as well as dynamic A-Life, and an unprecedented visual presentation that no other Stalker Overhaul can touch.

Report article RSS Feed Stereo Audio in Shadow of Chernobyl

Daemonion shows how to get stereo audio working within the older SoC XRay engine. These changes are included in LURK 1.2.

Posted by Daemonion on Oct 18th, 2012
Basic Client Side Coding.

Why go to the trouble of making stereo audio work?

Shadow of Chernobyl
is filled with audio that only plays in mono. While mono has it's uses, a game world needs stereo audio, as well, in order to feel complete. Only using mono, by itself, gives a very compressed feeling.

Mono is good for:
- 3D position sounds (static sound sources in XRay)
- Dialogue directly from an NPC- Environmental "one-shot" sounds (dogs barking, etc)
- Weapon mechanical noises (reloading, the bolt cycling, etc)

Stereo
is good for:
- Environmental ambiance (wind, crickets, rain)
- Music
- Weapon reports/reverberation (the reflections off the environment)
- Encompassing effects

When using these together, you can create a very full sound stage. As the lead audio designer for LURK 1.2, I knew I had to get stereo audio working in SoC.

To illustrate the differences, give these a listen.

Which one feels more encompassing?

Now you see why I went to the trouble :)


How?
Stereo files are made up of a left channel and a right channel. Mono has only a center channel. A stereo file is a combination of these left and right channels.

SoC's XRay engine can't actually use a true stereo file like the Call of Pripyat engine can. When XRay was being made, GSC came up with the idea to use two stereo-separated, mono files affixed with a _l and _r to indicate left or right.

The engine was then supposed to use an algorithm to play a _l file only in the left channel, and a _r file only in the right channel. When played together, this would make it sound as though stereo audio was playing, even though it was just two separate mono tracks.

This never worked, in-game, though. Until now.

**Note you can't just use any old mono track. You need to start with a true stereo file and convert it's left and right channels into separate mono tracks. This way, you have a left channel mono file and a right channel mono file.

You will need to first get your stereo sounds converted to split-track mono .ogg files (don't forget to comment them properly). I use Audacity to split a stereo track into two channel-dependent tracks. To split the tracks:


You will also need to replace your gamedata/scripts/sr_sound2d.script with my new sr_sound2d.script at the bottom of the post. My changes essentially add these lines of code, which switch to the .s2d function to place each file at particular x,y,z coordinates.

lua code:
self.snd_obj_l:play_at_pos (actor, vector():set(-0.5,0.0,-0.3), d / 1000.0, sound_object.s2d)
self.snd_obj_r:play_at_pos (actor, vector():set( 0.5,0.0,0.3), d / 1000.0, sound_object.s2d)

Lastly, you will need a new wrap_oal.dll file, as the left and right channels are swapped with the vanilla .dll, also included at the bottom of the post.


Files

Place this new wrap_oal.dll into your /bin directory
Replace your sr_sound2d.script with this (back up your old file!) or PasteBin

Enjoy!

Thanks to:
Malandrinus
Artos
NatVac
AMK Forums
GSC Forums

Post comment Comments
[TZP]LoNer1
[TZP]LoNer1 Oct 19 2012, 1:09am says:

Nice man! im going to try this out!

+3 votes     reply to comment
Daemonion Author
Daemonion Oct 19 2012, 4:38am replied:

Please let me know if it works for you.

+1 vote   reply to comment
Guest
Guest May 1 2013, 12:03pm says:

This comment is currently awaiting admin approval, join now to view.

Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
S.T.A.L.K.E.R. Shadow of Chernobyl Icon
Platform
Windows
Developer
L.U.R.K. Team
Contact
Send Message
Official Page
Moddb.com
Release Date
TBD
Mod Watch
Track this mod
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Mods
L.U.R.K. (S.T.A.L.K.E.R. Shadow of Chernobyl)
L.U.R.K. S.T.A.L.K.E.R. Shadow of Chernobyl - Single Player First Person Shooter
Related Games
S.T.A.L.K.E.R. Shadow of Chernobyl
S.T.A.L.K.E.R. Shadow of Chernobyl Single & Multiplayer First Person Shooter
Related Groups
L.U.R.K. Team
L.U.R.K. Team Developer & Publisher with 15 members