sfxd/sfxd.5.scd

55 lines
2.3 KiB
Plaintext
Raw Normal View History

sfxd(5)
# NAME
sfxd - configuration file and client commands list
# DESCRIPTION
Both configuration file and sfxc(1) commands use the same set of instructions.
Configuration file is *not* loaded automatically, unless specified with `-C [path]` flag, but it can be loaded at a run-time via *source* command.
# COMMANDS LIST
*load NAME FILE* Loads specified sound file and stores it under given key. ++
When given key is already in use, it SHOULD be replaced with the new sound file. ++
**NAME** is a string with no spaces, does not support escaping and used as a primary key for accessing loaded sound later. ++
**FILE** is an absolute path to a sound file to be loaded. Only WAV and MP3 files are supported.
*play NAME* Plays the sound with default pitch and volume. ++
**NAME** is a key, used when *load*ing a file.
*play:rs NAME* Plays the sound with randomized pitch. ++
Pitch range is specified with *set:pitch* command. ++
**NAME** is a key, used when *load*ing a file.
*set:pitch NAME MIN MAX* Sets the pitch range for *play:rs* ++
**NAME** is a key, used when *load*ing a file. ++
**MIN** is the minimum pitch. Can't be less than 0. ++
**MAX** is the maximum pitch. Can't be less than 0. ++
NOTE: if MAX is smaller than MIN, they are swapped.
*set:volume NAME VOLUME* Changes loudness for *play* and *play:rs* commands. ++
**NAME** is a key, used when *load*ing a file. ++
**VOLUME** is the volume to be set. Can't be outside of 0..1 range
*source PATH* Loads instructions from the configuration file. ++
**PATH** is the file path for the configuration file. ++
NOTE: there is a limit on how deep inclusion can go. By default it's set to 32.
# DEBUG COMMANDS
*dbg:dump* Dumps contents of the hashmap. ++
Prints each position of allocated hashmap and corresponding contents. ++
Empty areas are shown as `(unused)`, while used ones contain volume, pitch range, calculated hash, key and file path.
*dbg:counters* Shows internal counters. Can be disabled at the compile-time. ++
- `.pool_read` - number of reads ++
- `.pool_write` - number of writes ++
- `.hash_misses_read` - number of missed reads due to collision ++
- `.hash_misses_write` - number of collisions in the map ++
- `.pool.use` - number of used cells ++
- `.pool.cap` - hashmap capacity