plan9front/rc/bin/dmus
qwx e5c7fe6305 games/doom: use wadfs to expose genmidi lump instead of extracting to /tmp
to allow using games/dmid + games/opl3 for music playback, the genmidi
lump must be exposed;  previous attempt was insufficient since patch wads
can overwrite iwad contents, which a single wadfs cannot take into account
(commit e7b1c1aad8).
subsequent fix was to use the normal mechanisms to extract the lump to /tmp
and later the music lumps for playback, but the temp file may not always
be properly cleaned up, preventing any music playback due to conflicts.
so, spawn one wadfs for the iwad and one for each subsequently added pwad,
just making sure that they have sufficient delay to properly initialize
and bind in the right order
2023-08-09 23:01:21 +00:00

10 lines
185 B
Bash
Executable file

#!/bin/rc
if(test -f /mnt/wad/genmidi)
c=(games/dmid '|' games/opl3)
if not
c=(games/midi -c)
if(~ `{file -m $1} audio/mus)
c=(games/mus '<' $1 '|' $c)
if not
c=('<' $1 $c)
eval $c