add an interface for sound libraries

Groundwork for a more versatile interface for using
sound libraries. A lot of sound libraries work across
multiple platforms.

The current NetHack sound stuff is quite limited.

Binaries can have a variety of window ports linked into
them, and it makes sense to have something similar for
sound.

This tries to set things up in a more soundlib-centric way,
rather than inserting things in a platform-centric way.

It establishes a new top-level directory sound (akin to win
for the window interface routines, or "window-port") where
sound-related additions and sndprocs and support files can be
added and used across platforms.

The default interface is nosound and the 'nosound' interface
is in src/sounds.c

The interface for 'windsound', which contains the same minimal
USER_SOUNDS support using built-in routines that has been in the
windows port for a long time is added to
sound/windsound/windsound.c.

For now, the sound interface support for 'qtsound' has been added
to the existing Qt files win/Qt/qt_bind.h and win/Qt/qt_bind.cpp,
and a note has been placed in sound/qtsound/README.md to avoid
confusion.

New header file added: include/sndprocs.h.
This commit is contained in:
nhmall
2023-01-19 18:51:42 -05:00
parent 6e49372d8f
commit ea4a81901d
24 changed files with 705 additions and 85 deletions

View File

@@ -276,16 +276,6 @@ extern
#define MAP_MODE_ASCII_FIT_TO_SCREEN 10
#define MAP_MODE_TILES_FIT_TO_SCREEN 11
#if 0
#define WC_SND_SOUND 0x0001L /* 01 Port has some sound capabilities */
#define WC_SND_SPEAKER 0x0002L /* 02 Sound supported via built-in speaker */
#define WC_SND_STEREO 0x0004L /* 03 Stereo sound supported */
#define WC_SND_RAW 0x0008L /* 04 Raw sound supported */
#define WC_SND_WAVE 0x0010L /* 05 Wave support */
#define WC_SND_MIDI 0x0020L /* 06 Midi support */
/* 26 free bits */
#endif
struct wc_Opt {
const char *wc_name;
unsigned long wc_bit;