From 03c242706c23b00393e3d83d5cdb94f321004d62 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 Mar 2006 09:33:54 +0000 Subject: [PATCH] Good idea, renaming OpenBSD audio to BSD audio. --- configure.in | 4 ++-- include/SDL_config.h.in | 2 +- src/audio/SDL_audio.c | 4 ++-- src/audio/SDL_audiodev.c | 2 +- src/audio/SDL_sysaudio.h | 4 ++-- src/audio/{openbsd => bsd}/.cvsignore | 0 .../SDL_openbsdaudio.c => bsd/SDL_bsdaudio.c} | 16 +++++++--------- .../SDL_openbsdaudio.h => bsd/SDL_bsdaudio.h} | 0 8 files changed, 15 insertions(+), 17 deletions(-) rename src/audio/{openbsd => bsd}/.cvsignore (100%) rename src/audio/{openbsd/SDL_openbsdaudio.c => bsd/SDL_bsdaudio.c} (96%) rename src/audio/{openbsd/SDL_openbsdaudio.h => bsd/SDL_bsdaudio.h} (100%) diff --git a/configure.in b/configure.in index 8e499656b..f03cfa57b 100644 --- a/configure.in +++ b/configure.in @@ -2001,8 +2001,8 @@ case "$host" in have_audio=yes ;; netbsd|openbsd) - AC_DEFINE(SDL_AUDIO_DRIVER_OPENBSD) - SOURCES="$SOURCES $srcdir/src/audio/openbsd/*.c" + AC_DEFINE(SDL_AUDIO_DRIVER_BSD) + SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c" have_audio=yes ;; aix) diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index 25da91bd0..83fd235b2 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -167,7 +167,7 @@ #undef SDL_AUDIO_DRIVER_MINT #undef SDL_AUDIO_DRIVER_MMEAUDIO #undef SDL_AUDIO_DRIVER_NAS -#undef SDL_AUDIO_DRIVER_OPENBSD +#undef SDL_AUDIO_DRIVER_BSD #undef SDL_AUDIO_DRIVER_OSS #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H #undef SDL_AUDIO_DRIVER_PAUD diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index 2eabb220f..a7c8dded5 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -36,8 +36,8 @@ /* Available audio drivers */ static AudioBootStrap *bootstrap[] = { -#if SDL_AUDIO_DRIVER_OPENBSD - &OPENBSD_AUDIO_bootstrap, +#if SDL_AUDIO_DRIVER_BSD + &BSD_AUDIO_bootstrap, #endif #if SDL_AUDIO_DRIVER_OSS &DSP_bootstrap, diff --git a/src/audio/SDL_audiodev.c b/src/audio/SDL_audiodev.c index 667593ad2..90671f971 100644 --- a/src/audio/SDL_audiodev.c +++ b/src/audio/SDL_audiodev.c @@ -23,7 +23,7 @@ /* Get the name of the audio device we use for output */ -#if SDL_AUDIO_DRIVER_OPENBSD || SDL_AUDIO_DRIVER_OSS || SDL_AUDIO_DRIVER_SUNAUDIO +#if SDL_AUDIO_DRIVER_BSD || SDL_AUDIO_DRIVER_OSS || SDL_AUDIO_DRIVER_SUNAUDIO #include #include diff --git a/src/audio/SDL_sysaudio.h b/src/audio/SDL_sysaudio.h index 604ba71c9..13e2dd516 100644 --- a/src/audio/SDL_sysaudio.h +++ b/src/audio/SDL_sysaudio.h @@ -100,8 +100,8 @@ typedef struct AudioBootStrap { SDL_AudioDevice *(*create)(int devindex); } AudioBootStrap; -#if SDL_AUDIO_DRIVER_OPENBSD -extern AudioBootStrap OPENBSD_AUDIO_bootstrap; +#if SDL_AUDIO_DRIVER_BSD +extern AudioBootStrap BSD_AUDIO_bootstrap; #endif #if SDL_AUDIO_DRIVER_OSS extern AudioBootStrap DSP_bootstrap; diff --git a/src/audio/openbsd/.cvsignore b/src/audio/bsd/.cvsignore similarity index 100% rename from src/audio/openbsd/.cvsignore rename to src/audio/bsd/.cvsignore diff --git a/src/audio/openbsd/SDL_openbsdaudio.c b/src/audio/bsd/SDL_bsdaudio.c similarity index 96% rename from src/audio/openbsd/SDL_openbsdaudio.c rename to src/audio/bsd/SDL_bsdaudio.c index 9485c2146..e8ea7ce8e 100644 --- a/src/audio/openbsd/SDL_openbsdaudio.c +++ b/src/audio/bsd/SDL_bsdaudio.c @@ -22,7 +22,7 @@ #include "SDL_config.h" /* - * Driver for native OpenBSD audio(4). + * Driver for native OpenBSD/NetBSD audio(4). * vedge@vedge.com.ar. */ @@ -43,10 +43,12 @@ #include "SDL_openbsdaudio.h" /* The tag name used by NetBSD/OpenBSD audio */ -#ifdef __NETBSD__ -#define OBSD_DRIVER_NAME "netbsd" +#ifdef __NetBSD__ +#define BSD_AUDIO_DRIVER_NAME "netbsd" +#define BSD_AUDIO_DRIVER_DESC "Native NetBSD audio" #else -#define OBSD_DRIVER_NAME "openbsd" +#define BSD_AUDIO_DRIVER_NAME "openbsd" +#define BSD_AUDIO_DRIVER_DESC "Native OpenBSD audio" #endif /* Open the audio device for playback, and don't block if busy */ @@ -132,11 +134,7 @@ static SDL_AudioDevice } AudioBootStrap OPENBSD_AUDIO_bootstrap = { -#ifdef __NETBSD__ - OBSD_DRIVER_NAME, "Native NetBSD audio", -#else - OBSD_DRIVER_NAME, "Native OpenBSD audio", -#endif + BSD_DRIVER_NAME, BSD_AUDIO_DRIVER_DESC, Audio_Available, Audio_CreateDevice }; diff --git a/src/audio/openbsd/SDL_openbsdaudio.h b/src/audio/bsd/SDL_bsdaudio.h similarity index 100% rename from src/audio/openbsd/SDL_openbsdaudio.h rename to src/audio/bsd/SDL_bsdaudio.h