plan9front/sys/src/games
qwx 7048f1ca11 games/opl3: use correct sampling rate
games/dmid uses the same sample rate as the chip for music, but other
applications do not.  opl3 and its older version opl2 (not in 9front)
read an input stream of commands in basically IMF format, something
used in other id Software games and some others, which assumes a
given input sampling rate:  700 Hz for Wolfenstein 3D music, 560 Hz
for Commander Keen, 60 Hz for Ultima 6, etc.

The opl3 emulation on the other hand is not really intended to run at
a sampling rate different that the chip's 49.716 kHz sampling rate.
Previously, we assumed it runs at 44.1 kHz and just used the input
rate as a divisor to get the number of samples per delay tic.

From what I understand, the correct way to use it for accurate
emulation is to run the opl chip emulator at its intended sampling
frequency, then downsample to 44.1 kHz.  This means better output
but more code.  The alternative is to basically do the same as
before rev 8433, except with no buffering, but at accuracy/quality
loss.  This change implements the former and just forks pcmconv to
deal with resampling.
2021-05-05 16:57:19 +02:00
..
2600 emulators ui: add option for fixed factor scaling and bound scale vertically 2018-06-13 14:05:19 +02:00
blabs mkfiles: do not rely on path containing the . element 2013-10-26 20:22:01 +02:00
blit games/blit: clean up cpu.c and make it pass tests 2018-11-20 09:18:20 +00:00
c64 games/c64: make keyboard table more readable 2018-11-17 09:48:46 +00:00
doom make bind(2) error handling consistent 2020-05-02 17:32:01 +02:00
galaxy libavl: lookup can return the closest match 2017-04-22 13:59:37 -05:00
gb games/gb: fix reversed audio channels 2021-02-08 04:58:49 +01:00
gba gba: handle 8bit writes to vram 2018-06-22 14:49:18 +02:00
mahjongg games/mahjongg: off by one in bmatch(), fix hint() redraw (thanks Kenji) 2016-05-07 15:19:41 +02:00
md games/md: fix mkfile 2018-11-20 09:22:04 +00:00
mines games/mines: add missing checks for UseGhost 2018-07-03 07:22:19 +00:00
mix games/mix: fix decoding of shift instructions 2020-11-28 23:03:44 +10:30
nes games/nes: workaround for truncated chr 2020-10-15 10:30:40 +02:00
opl3 games/opl3: use correct sampling rate 2021-05-05 16:57:19 +02:00
snes games/snes: use 4-point hermite interpolation to resample 2021-02-22 16:12:24 +01:00
sokoban sokoban: fix non constant inializer 2015-04-16 14:29:13 +02:00
sudoku Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
timmy added games/timmy 2016-06-23 21:12:06 +02:00
v8e add v8e 2020-01-22 13:09:09 +00:00
4s.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
5s.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
ana.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
catback.p Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
catclock.c catclock: protect black border with clip rectangle and dont print when window is too small 2013-08-12 23:31:53 +02:00
dmid.c games/opl3: use correct sampling rate 2021-05-05 16:57:19 +02:00
dpic.c add games/dpic and games/todpic 2018-07-25 05:02:46 +02:00
eui.c emulators ui: don't drink and code 2018-06-13 14:14:25 +02:00
eui.h emulators ui: add option for fixed factor scaling and bound scale vertically 2018-06-13 14:05:19 +02:00
eyes.p Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
festoon.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
geigerstats.c games/geigerstats: fix usage() to exit; games(1): geigerstats args 2014-04-26 15:08:28 +01:00
glendy.c games/glendy: your complication had a complication (god damn it kemal) 2021-04-02 22:23:40 +02:00
juggle.c games/juggle, games/catclock: keep up with queued mouse events 2013-08-12 00:08:51 +02:00
life.c games/life: add -d delay parameter, -b color reversal parameter, and update manpage 2016-03-19 20:03:10 -04:00
linden.c add games/linden and games/turtle 2019-11-03 13:49:23 +00:00
mandel.c added games/mandel 2011-09-16 13:32:48 +02:00
memo.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
midi.c midi: properly skip sysex messages 2018-07-10 23:26:17 +02:00
mkfile remove juke (use play or zuke instead) 2021-04-13 13:25:24 +02:00
mole.c add "snake" tracing effect to mole 2016-05-03 09:29:39 -05:00
mus.c mus: fix note volume and channel selection; simplify 2018-06-26 10:35:23 +02:00
packet.c added games/packet 2011-08-03 10:27:09 +02:00
todpic.c add games/dpic and games/todpic 2018-07-25 05:02:46 +02:00
turtle.c games/turtle: do exit instead of crash in redraw() when there where no lines drawn 2019-11-03 15:20:57 +01:00
wadfs.c wadfs: avoid comma operator after PBIT32() macros 2019-05-07 21:49:49 +02:00
xs.c games/4s: increase thread size (thanks majiru) 2020-09-13 11:21:21 -07:00
xs.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00