forked from hkc/sfxd
1
0
Fork 0
sfxd/sfxd.5

84 lines
2.8 KiB
Groff
Raw Normal View History

.\" Generated by scdoc 1.11.3
.\" Complete documentation for this program is not available as a GNU info page
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.nh
.ad l
.\" Begin generated content:
.TH "sfxd" "5" "2024-02-25"
.PP
.SH NAME
.PP
sfxd - configuration file and client commands list
.PP
.SH DESCRIPTION
.PP
Both configuration file and sfxc(1) commands use the same set of instructions.\&
.PP
Configuration file is \fBnot\fR loaded automatically, unless specified with `-C [path]` flag, but it can be loaded at a run-time via \fBsource\fR command.\&
.PP
.SH COMMANDS LIST
.PP
\fBload NAME FILE\fR Loads specified sound file and stores it under given key.\&
.br
When given key is already in use, it SHOULD be replaced with the new sound file.\&
.br
\fB\fRNAME\fB\fR is a string with no spaces, does not support escaping and used as a primary key for accessing loaded sound later.\&
.br
\fB\fRFILE\fB\fR is an absolute path to a sound file to be loaded.\& Only WAV and MP3 files are supported.\&
.PP
\fBplay NAME\fR Plays the sound with default pitch and volume.\&
.br
\fB\fRNAME\fB\fR is a key, used when \fBload\fRing a file.\&
.PP
\fBplay:rs NAME\fR Plays the sound with randomized pitch.\&
.br
Pitch range is specified with \fBset:pitch\fR command.\&
.br
\fB\fRNAME\fB\fR is a key, used when \fBload\fRing a file.\&
.PP
\fBset:pitch NAME MIN MAX\fR Sets the pitch range for \fBplay:rs\fR
.br
\fB\fRNAME\fB\fR is a key, used when \fBload\fRing a file.\&
.br
\fB\fRMIN\fB\fR is the minimum pitch.\& Can'\&t be less than 0.\&
.br
\fB\fRMAX\fB\fR is the maximum pitch.\& Can'\&t be less than 0.\&
.br
NOTE: if MAX is smaller than MIN, they are swapped.\&
.PP
\fBset:volume NAME VOLUME\fR Changes loudness for \fBplay\fR and \fBplay:rs\fR commands.\&
.br
\fB\fRNAME\fB\fR is a key, used when \fBload\fRing a file.\&
.br
\fB\fRVOLUME\fB\fR is the volume to be set.\& Can'\&t be outside of 0.\&.\&1 range
.PP
\fBsource PATH\fR Loads instructions from the configuration file.\&
.br
\fB\fRPATH\fB\fR is the file path for the configuration file.\&
.br
NOTE: there is a limit on how deep inclusion can go.\& By default it'\&s set to 32.\&
.PP
.SH DEBUG COMMANDS
.PP
\fBdbg:dump\fR Dumps contents of the hashmap.\&
.br
Prints each position of allocated hashmap and corresponding contents.\&
.br
Empty areas are shown as `(unused)`, while used ones contain volume, pitch range, calculated hash, key and file path.\&
.PP
\fBdbg:counters\fR Shows internal counters.\& Can be disabled at the compile-time.\&
.br
- `.\&pool_read` - number of reads
.br
- `.\&pool_write` - number of writes
.br
- `.\&hash_misses_read` - number of missed reads due to collision
.br
- `.\&hash_misses_write` - number of collisions in the map
.br
- `.\&pool.\&use` - number of used cells
.br
- `.\&pool.\&cap` - hashmap capacity
.PP