CFSNDSERV(6)

๐Ÿ“ฆ version 1.75.0, in debian bookworm, ubuntu jammy, ubuntu noble

๐ŸŽง CFSNDSERV ๐ŸŽง

okay bestie, welcome to cfsndserv, section 6 of the manual โ€” the crossfire client sound server. yes she's a real one. yes she makes the noises happen. let's get into it ๐Ÿ’–


โœจ NAME โœจ

cfsndserv โ€” the crossfire client sound server. that's her. that's the whole name. iconic.


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

getzone adjusts and mixes sounds before playing them. that's the vibe. she's backstage doing the audio engineering so your ears get the full experience ๐ŸŽ€


๐ŸŒธ USAGE ๐ŸŒธ

getzone none - started automatically by crossfire client

fr fr, you don't launch her yourself โ€” the crossfire client starts her up automatically. she just shows up. main character energy ๐Ÿ‘‘


๐Ÿ’… CONFIGURATION OPTIONS ๐Ÿ’…

so like, ~/.crossfire/sndconfig can contain the following options, and you should probably care about them:

  • stereo โ€” 1 means stereo sound, 0 means mono. pick your fighter โœจ
  • bits โ€” the bitrate of the generated sound. it's either 8 or 16. that's it. those are the options.
  • signed โ€” whether we should send signed data to the soundcard. 1 means yes ๐Ÿซถ
  • frequency โ€” the speed of playing data. this should be 11025, or the sound pitch will change. no cap, don't mess with it.
  • buffers โ€” how many buffers to allocate. like, the count. the quantity. the number of them.
  • buflen โ€” how big the buffers should be. heads up: buffers*buflen shouldn't be smaller than the longest sound to be played. do the math bestie ๐Ÿงฎ
  • simultaneously โ€” how many sounds can be played at the same time. (the original says "home many", which is a typo, but we're keeping the facts: it's how many sounds.) when this setting is bigger, each sound volume will decrease. tradeoffs, babes ๐Ÿ’€

๐Ÿ”ฅ HOW DOES IT WORK? ๐Ÿ”ฅ

okay this is the fun part. sit down. hydrate. ๐Ÿ“

The sound server gets information about sounds to be played on standard input.

The information is a line:

<sound number> <sound type> <relative x> <relative y>

and all those numbers are hex โ€” yes, hex, don't come at me.

The file ~/.crossfire/sounds contains description of sound numbers and types. for example:

3 0 5 0

Means that normal sound SOUND_FUMBLE spell should be played as it's source was 5 units to the right of player. (yes, "it's" โ€” we're keeping the original's whole vibe, typos and all ๐Ÿ’œ)

Sounds are mixed in special buffers, which are in fact one buffer, which should be big enough for the biggest sound to be played.

The buffers, if contain anything, are sent one by one to the sound device. Each buffer is cleaned after playing.

Sounds data is multiplied by some ratio (<1) evaluated from it's position and volume and added to the buffers, starting from the next after the one being played.

So bigger buffer means bigger delay, before the sound is actually played, but the smaller buffer is, the bigger is possibility, we won't succeed filling the next buffer, before last is played.

โš ๏ธ literally the whole tension of this program in one sentence: big buffer = lag, small buffer = risk of not filling the next one in time. it's giving balancing act ๐Ÿ˜ญ

๐Ÿซถ SEE ALSO ๐Ÿซถ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Jaakko Niemi put this page together for Debian packages by cutting and pasting from README file of crossfire-client. slay, honestly. we love a copy-paste king โœจ


and that's the whole page bestie!! this one came from the 3rd Berkeley Distribution, dated 2002-02-23, and it lives in section CFSNDSERV(6). mwah ๐Ÿ’…๐ŸŽ€๐Ÿ’–

๐Ÿ“ฆ where this page comes from