User Tools

Site Tools


client:sound:sound_howto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
client:sound:sound_howto [2018/03/08 12:03]
karl created
client:sound:sound_howto [2018/03/11 21:59] (current)
karl Add Techical section, put text in section below
Line 19: Line 19:
 When the client understands the sound commands it receives from the server, then it has the ability to play at least sounds for events, \\ as the sounds folder of the Crossfire SVN repository contains around 30 or 40 .raw sound files. \\ When the client understands the sound commands it receives from the server, then it has the ability to play at least sounds for events, \\ as the sounds folder of the Crossfire SVN repository contains around 30 or 40 .raw sound files. \\
 These sound.raw files are named like //​Teeswing.raw//​ .\\ These sound.raw files are named like //​Teeswing.raw//​ .\\
 +
 +===== Technical =====
 +The Crossfire client uses a helper binary to play sounds. \\
 +When the client compiles, it usually creates two different sound server binaries named //​cfsndserv//​ and //​cfsndserv_alsa9//​ . By default, the client uses the //​cfsndserv//​ , the //​cfsndserv_alsa9//​ can be switched on by the commandline parameter [[:​client:​optional_parameters#​-sound_server <​path>​]] </​absolute/​path/​to/​cfsndserv>​ . \\
 +The default //​cfsndserv//​ server can be divided into several sound systems. These sound systems are switched on when the client is getting compiled. Either :
 +  - very legacy //alsa 0.5//
 +  - legacy OSS
 +  - SGI
 +  - SUN
 +  - SDL since v1.60.0 , needs SDL_mixer later than at least v1.2.9
 +
 +Most people will very likely have the OSS version of the cfsndserv, since the legacy ALSA code does not compile with recent 1.x ASLA libraries and their headers, and the SDL music is not enabled by default while configuring the client before compiling it:
 +>>>​--enable-sdl_mixer ​     Enable use of the SDL_mixer library, default is not to use it
 +
 +===== Configuration File sounds =====
 +:!: For recent 1.71+ versions of the client, see [[#​Configuration File sounds.conf]] . 
  
 To make these event sounds working inside the client, the client has to know, where these event files are located on the system . \\ To make these event sounds working inside the client, the client has to know, where these event files are located on the system . \\
 When the client starts, it checks for two sound related configuration files in the HOME directory [[:​client:​crossfire|.crossfire]] : //​sndconfig//​ and //sounds// . \\ When the client starts, it checks for two sound related configuration files in the HOME directory [[:​client:​crossfire|.crossfire]] : //​sndconfig//​ and //sounds// . \\
  
-===== Configuration File sounds ===== 
 From the //​client/​sound-src/​common.c//​ : From the //​client/​sound-src/​common.c//​ :
 <code c> <code c>
Line 85: Line 100:
 /​root/​.crossfire/​cf_sounds/​Missle1.raw ​      80 "​icestorm"​ /​root/​.crossfire/​cf_sounds/​Missle1.raw ​      80 "​icestorm"​
 </​code>​ </​code>​
 +
 +===== Configuration File sounds.conf =====
 +Since version 1.71.0 of the client, the above [[#sounds]] file name has changed to sounds.conf. \\
 +A look inside the [[https://​debian.org|Debian]] package //​crossfire-client-sounds_1.71.0-3_all.deb//​ revealed,
 +that it may be located inside the //​usr/​share/​games/​crossfire-client/​sounds//​ directory among the various now .wav and since version 1.72  also .ogg files. \\
 +The header has not changed, but the syntax it seems :
 +<code conf>
 +# Normal Sounds
 +
 +SOUND_CLOCK:​130:​TowerClock
 +SOUND_DRINK_POISON:​130:​Puke
 +SOUND_FALL_HOLE:​200:​MetalCrash
 +SOUND_FIRE_ARROW:​80:​Teeswing
 +
 +# Spells
 +
 +aggravation:​100:​bugle_charge
 +alchemy:​100:​magic
 +antimagic rune:​100:​magic
 +armour:​100:​magic
 +ball lightning:​110:​lightning1
 +
 +</​code>​
 +
  
 ===== Configuration File sndconfig ===== ===== Configuration File sndconfig =====
  
 TODO TODO
client/sound/sound_howto.1520532180.txt.gz ยท Last modified: 2018/03/08 12:03 by karl