Skip to content

Commit fb11abd

Browse files
committed
Add support for SudoMaker RetroWave OPL3 express
1 parent b7786c3 commit fb11abd

File tree

6 files changed

+459
-9
lines changed

6 files changed

+459
-9
lines changed

configure.ac

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ AC_ARG_ENABLE([output-oss],AS_HELP_STRING([--disable-output-oss],[Disable OSS ou
9696
AC_ARG_ENABLE([output-null],AS_HELP_STRING([--disable-output-null],[Disable null output]))
9797
AC_ARG_ENABLE([output-disk],AS_HELP_STRING([--disable-output-disk],[Disable disk writer]))
9898
AC_ARG_ENABLE([output-esound],AS_HELP_STRING([--disable-output-esound],[Disable EsounD output]))
99+
AC_ARG_ENABLE([output-retrowave],AS_HELP_STRING([--disable-output-retrowave],[Disable RetroWave output]))
99100
AC_ARG_ENABLE([output-qsa],AS_HELP_STRING([--disable-output-qsa],[Disable QSA output]))
100101
AC_ARG_ENABLE([output-sdl],AS_HELP_STRING([--disable-output-sdl],[Disable SDL output]))
101102
AC_ARG_ENABLE([output-alsa],AS_HELP_STRING([--disable-output-alsa],[Disable ALSA output]))
@@ -146,6 +147,12 @@ if test ${enable_output_esound:=yes} = yes; then
146147
AC_MSG_RESULT([*** EsounD (libesd) >= 0.2.8 not installed ***]))
147148
fi
148149

150+
# RetroWave output
151+
if test ${enable_output_retrowave:=yes} = yes; then
152+
AC_DEFINE(DRIVER_RETROWAVE,1,[Build RetroWave output])
153+
drivers=$drivers' retrowave.$(OBJEXT)'
154+
fi
155+
149156
# QSA driver
150157
if test ${enable_output_qsa:=yes} = yes; then
151158
AC_MSG_CHECKING([for QSA headers])
@@ -219,11 +226,12 @@ echo "Configuration:"
219226
echo "Install path: ${prefix}"
220227
echo ""
221228
echo "Build output mechanisms:"
222-
echo "OSS output (oss): ${enable_output_oss}"
223-
echo "Null output (null): ${enable_output_null}"
224-
echo "Disk writer (disk): ${enable_output_disk}"
225-
echo "EsounD output (esound): ${enable_output_esound}"
226-
echo "QSA output (qsa): ${enable_output_qsa}"
227-
echo "SDL output (sdl): ${enable_output_sdl}"
228-
echo "ALSA output (alsa): ${enable_output_alsa}"
229-
echo "Libao output (ao): ${enable_output_ao}"
229+
echo "OSS output (oss): ${enable_output_oss}"
230+
echo "Null output (null): ${enable_output_null}"
231+
echo "Disk writer (disk): ${enable_output_disk}"
232+
echo "EsounD output (esound): ${enable_output_esound}"
233+
echo "Retrowave output (retrowave) ${enable_output_retrowave}"
234+
echo "QSA output (qsa): ${enable_output_qsa}"
235+
echo "SDL output (sdl): ${enable_output_sdl}"
236+
echo "ALSA output (alsa): ${enable_output_alsa}"
237+
echo "Libao output (ao): ${enable_output_ao}"

src/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ adplay_SOURCES = adplay.cc output.cc output.h players.h defines.h
44

55
EXTRA_adplay_SOURCES = oss.cc oss.h null.h disk.cc disk.h esound.cc esound.h \
66
qsa.cc qsa.h sdl.cc sdl.h alsa.cc alsa.h ao.cc ao.h getopt.c \
7+
retrowave.cc retrowave.h \
78
getopt1.c getopt.h
89

910
adplay_LDADD = $(drivers) $(adplug_LIBS) @ESD_LIBS@ @QSA_LIBS@ @SDL_LIBS@ \

src/adplay.cc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ static void usage()
151151
"EsounD driver (esound) specific:\n"
152152
" -d, --device=URL URL to EsounD server host (hostname:port)\n\n"
153153
#endif
154+
#ifdef DRIVER_RETROWAVE
155+
"RetroWave driver (retrowave) specific:\n"
156+
" -d --device=DEVICE set sound device to DEVICE\n\n"
157+
#endif
154158
#ifdef DRIVER_SDL
155159
"SDL driver (sdl) specific:\n"
156160
" -b, --buffer=SIZE set output buffer size to SIZE\n\n"
@@ -202,6 +206,9 @@ static void usage()
202206
#ifdef DRIVER_ESOUND
203207
"esound "
204208
#endif
209+
#ifdef DRIVER_RETROWAVE
210+
"retrowave "
211+
#endif
205212
#ifdef DRIVER_QSA
206213
"qsa "
207214
#endif
@@ -300,6 +307,10 @@ static int decode_switches(int argc, char **argv)
300307
if(!strcmp(optarg,"alsa")) cfg.output = alsa;
301308
else
302309
#endif
310+
#ifdef DRIVER_RETROWAVE
311+
if(!strcmp(optarg,"retrowave")) cfg.output = retrowave;
312+
else
313+
#endif
303314
#ifdef DRIVER_SDL
304315
if(!strcmp(optarg,"sdl")) cfg.output = sdl;
305316
else
@@ -579,6 +590,15 @@ int main(int argc, char **argv)
579590
player = new AOPlayer(opl, cfg.device, cfg.bits, cfg.channels, cfg.freq, cfg.buf_size);
580591
break;
581592
#endif
593+
#ifdef DRIVER_RETROWAVE
594+
case retrowave:
595+
if (opl) {
596+
delete(opl);
597+
opl = 0;
598+
}
599+
player = new RetroWavePlayer(cfg.device);
600+
break;
601+
#endif
582602
#ifdef DRIVER_SDL
583603
case sdl:
584604
player = new SDLPlayer(opl, cfg.bits, cfg.channels, cfg.freq, cfg.buf_size);

src/players.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "config.h"
2929

3030
// Enumerate ALL outputs (regardless of availability)
31-
enum Outputs {none, null, ao, oss, disk, esound, qsa, sdl, alsa};
31+
enum Outputs {none, null, ao, oss, disk, esound, retrowave, qsa, sdl, alsa};
3232

3333
#define DEFAULT_DRIVER none
3434

@@ -39,6 +39,12 @@ enum Outputs {none, null, ao, oss, disk, esound, qsa, sdl, alsa};
3939
#define DEFAULT_DRIVER null
4040
#endif
4141

42+
#ifdef DRIVER_RETROWAVE
43+
#include "retrowave.h"
44+
#undef DEFAULT_DRIVER
45+
#define DEFAULT_DRIVER retrowave
46+
#endif
47+
4248
// Disk writer
4349
#ifdef DRIVER_DISK
4450
#include "disk.h"

0 commit comments

Comments
 (0)