From 7bf08bb8e005bdff5ae9f60938915ae74bd467ff Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 26 Jul 2011 14:18:00 -0700 Subject: [PATCH] Removed needless macros in various audio targets. --- src/audio/alsa/SDL_alsa_audio.c | 5 +---- src/audio/arts/SDL_artsaudio.c | 5 +---- src/audio/bsd/SDL_bsdaudio.c | 11 +---------- src/audio/disk/SDL_diskaudio.c | 5 +---- src/audio/dsp/SDL_dspaudio.c | 5 +---- src/audio/esd/SDL_esdaudio.c | 5 +---- src/audio/fusionsound/SDL_fsaudio.c | 4 +--- src/audio/nas/SDL_nasaudio.c | 5 +---- src/audio/paudio/SDL_paudio.c | 5 +---- src/audio/pulseaudio/SDL_pulseaudio.c | 5 +---- src/audio/qsa/SDL_qsa_audio.c | 5 +---- src/audio/ums/SDL_umsaudio.c | 6 +----- 12 files changed, 12 insertions(+), 54 deletions(-) diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index 71c993b0c..31b2063b9 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -37,9 +37,6 @@ #include "SDL_loadso.h" #endif -/* The tag name used by ALSA audio */ -#define DRIVER_NAME "alsa" - static int (*ALSA_snd_pcm_open) (snd_pcm_t **, const char *, snd_pcm_stream_t, int); static int (*ALSA_snd_pcm_close) (snd_pcm_t * pcm); @@ -684,7 +681,7 @@ ALSA_Init(SDL_AudioDriverImpl * impl) AudioBootStrap ALSA_bootstrap = { - DRIVER_NAME, "ALSA PCM audio", ALSA_Init, 0 + "alsa", "ALSA PCM audio", ALSA_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/arts/SDL_artsaudio.c b/src/audio/arts/SDL_artsaudio.c index 66704ef5b..0abe283e7 100644 --- a/src/audio/arts/SDL_artsaudio.c +++ b/src/audio/arts/SDL_artsaudio.c @@ -41,9 +41,6 @@ #define SDL_NAME(X) X #endif -/* The tag name used by artsc audio */ -#define ARTS_DRIVER_NAME "arts" - #ifdef SDL_AUDIO_DRIVER_ARTS_DYNAMIC static const char *arts_library = SDL_AUDIO_DRIVER_ARTS_DYNAMIC; @@ -372,7 +369,7 @@ ARTS_Init(SDL_AudioDriverImpl * impl) AudioBootStrap ARTS_bootstrap = { - ARTS_DRIVER_NAME, "Analog RealTime Synthesizer", ARTS_Init, 0 + "arts", "Analog RealTime Synthesizer", ARTS_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/bsd/SDL_bsdaudio.c b/src/audio/bsd/SDL_bsdaudio.c index ef881cfb8..546eba93f 100644 --- a/src/audio/bsd/SDL_bsdaudio.c +++ b/src/audio/bsd/SDL_bsdaudio.c @@ -41,15 +41,6 @@ #include "../SDL_audiodev_c.h" #include "SDL_bsdaudio.h" -/* The tag name used by NetBSD/OpenBSD audio */ -#ifdef __NetBSD__ -#define BSD_AUDIO_DRIVER_NAME "netbsd" -#define BSD_AUDIO_DRIVER_DESC "Native NetBSD audio" -#else -#define BSD_AUDIO_DRIVER_NAME "openbsd" -#define BSD_AUDIO_DRIVER_DESC "Native OpenBSD audio" -#endif - /* Use timer for synchronization */ /* #define USE_TIMER_SYNC */ @@ -377,7 +368,7 @@ BSDAUDIO_Init(SDL_AudioDriverImpl * impl) AudioBootStrap BSD_AUDIO_bootstrap = { - BSD_AUDIO_DRIVER_NAME, BSD_AUDIO_DRIVER_DESC, BSDAUDIO_Init, 0 + "bsd", "BSD audio", BSDAUDIO_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/disk/SDL_diskaudio.c b/src/audio/disk/SDL_diskaudio.c index 4544f473e..283ef22d1 100644 --- a/src/audio/disk/SDL_diskaudio.c +++ b/src/audio/disk/SDL_diskaudio.c @@ -33,9 +33,6 @@ #include "../SDL_audio_c.h" #include "SDL_diskaudio.h" -/* The tag name used by DISK audio */ -#define DISKAUD_DRIVER_NAME "disk" - /* environment variables and defaults. */ #define DISKENVR_OUTFILE "SDL_DISKAUDIOFILE" #define DISKDEFAULT_OUTFILE "sdlaudio.raw" @@ -159,7 +156,7 @@ DISKAUD_Init(SDL_AudioDriverImpl * impl) } AudioBootStrap DISKAUD_bootstrap = { - DISKAUD_DRIVER_NAME, "direct-to-disk audio", DISKAUD_Init, 1 + "disk", "direct-to-disk audio", DISKAUD_Init, 1 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/dsp/SDL_dspaudio.c b/src/audio/dsp/SDL_dspaudio.c index a621b7ba3..31688aa8c 100644 --- a/src/audio/dsp/SDL_dspaudio.c +++ b/src/audio/dsp/SDL_dspaudio.c @@ -47,9 +47,6 @@ #include "../SDL_audiodev_c.h" #include "SDL_dspaudio.h" -/* The tag name used by DSP audio */ -#define DSP_DRIVER_NAME "dsp" - static void DSP_Deinitialize(void) { @@ -318,7 +315,7 @@ DSP_Init(SDL_AudioDriverImpl * impl) AudioBootStrap DSP_bootstrap = { - DSP_DRIVER_NAME, "OSS /dev/dsp standard audio", DSP_Init, 0 + "dsp", "OSS /dev/dsp standard audio", DSP_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/esd/SDL_esdaudio.c b/src/audio/esd/SDL_esdaudio.c index e03fee47b..4cc8e2914 100644 --- a/src/audio/esd/SDL_esdaudio.c +++ b/src/audio/esd/SDL_esdaudio.c @@ -41,9 +41,6 @@ #define SDL_NAME(X) X #endif -/* The tag name used by ESD audio */ -#define ESD_DRIVER_NAME "esd" - #ifdef SDL_AUDIO_DRIVER_ESD_DYNAMIC static const char *esd_library = SDL_AUDIO_DRIVER_ESD_DYNAMIC; @@ -345,7 +342,7 @@ ESD_Init(SDL_AudioDriverImpl * impl) AudioBootStrap ESD_bootstrap = { - ESD_DRIVER_NAME, "Enlightened Sound Daemon", ESD_Init, 0 + "esd", "Enlightened Sound Daemon", ESD_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/fusionsound/SDL_fsaudio.c b/src/audio/fusionsound/SDL_fsaudio.c index 63bbfd807..ebe2eb079 100644 --- a/src/audio/fusionsound/SDL_fsaudio.c +++ b/src/audio/fusionsound/SDL_fsaudio.c @@ -48,8 +48,6 @@ typedef DFBResult DirectResult; #endif -/* The tag name used by fusionsoundc audio */ -#define SDL_FS_DRIVER_NAME "fusionsound" /* Buffers to use - more than 2 gives a lot of latency */ #define FUSION_BUFFERS (2) @@ -344,7 +342,7 @@ SDL_FS_Init(SDL_AudioDriverImpl * impl) AudioBootStrap FUSIONSOUND_bootstrap = { - SDL_FS_DRIVER_NAME, "FusionSound", SDL_FS_Init, 0 + "fusionsound", "FusionSound", SDL_FS_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/nas/SDL_nasaudio.c b/src/audio/nas/SDL_nasaudio.c index 7c9534b72..eb622035e 100644 --- a/src/audio/nas/SDL_nasaudio.c +++ b/src/audio/nas/SDL_nasaudio.c @@ -32,9 +32,6 @@ #include "../SDL_audio_c.h" #include "SDL_nasaudio.h" -/* The tag name used by nas audio */ -#define NAS_DRIVER_NAME "nas" - static struct SDL_PrivateAudioData *this2 = NULL; @@ -397,7 +394,7 @@ NAS_Init(SDL_AudioDriverImpl * impl) } AudioBootStrap NAS_bootstrap = { - NAS_DRIVER_NAME, "Network Audio System", NAS_Init, 0 + "nas", "Network Audio System", NAS_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/paudio/SDL_paudio.c b/src/audio/paudio/SDL_paudio.c index b53fcbf74..2036c0c2f 100644 --- a/src/audio/paudio/SDL_paudio.c +++ b/src/audio/paudio/SDL_paudio.c @@ -45,9 +45,6 @@ #undef BIG_ENDIAN #include -/* The tag name used by paud audio */ -#define PAUDIO_DRIVER_NAME "paud" - /* Open the audio device for playback, and don't block if busy */ /* #define OPEN_FLAGS (O_WRONLY|O_NONBLOCK) */ #define OPEN_FLAGS O_WRONLY @@ -545,7 +542,7 @@ PAUDIO_Init(SDL_AudioDriverImpl * impl) } AudioBootStrap PAUDIO_bootstrap = { - PAUDIO_DRIVER_NAME, "AIX Paudio", PAUDIO_Init, 0 + "paud", "AIX Paudio", PAUDIO_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c index 2bc19e9a2..6b2333e02 100644 --- a/src/audio/pulseaudio/SDL_pulseaudio.c +++ b/src/audio/pulseaudio/SDL_pulseaudio.c @@ -47,9 +47,6 @@ #include "SDL_pulseaudio.h" #include "SDL_loadso.h" -/* The tag name used by pulse audio */ -#define PULSEAUDIO_DRIVER_NAME "pulseaudio" - #if (PA_API_VERSION < 12) /** Return non-zero if the passed state is one of the connected states */ static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) { @@ -502,7 +499,7 @@ PULSEAUDIO_Init(SDL_AudioDriverImpl * impl) AudioBootStrap PULSEAUDIO_bootstrap = { - PULSEAUDIO_DRIVER_NAME, "PulseAudio", PULSEAUDIO_Init, 0 + "pulseaudio", "PulseAudio", PULSEAUDIO_Init, 0 }; #endif /* SDL_AUDIO_DRIVER_PULSEAUDIO */ diff --git a/src/audio/qsa/SDL_qsa_audio.c b/src/audio/qsa/SDL_qsa_audio.c index 4cfc2e7d0..590b089e8 100644 --- a/src/audio/qsa/SDL_qsa_audio.c +++ b/src/audio/qsa/SDL_qsa_audio.c @@ -38,9 +38,6 @@ #include "../SDL_audio_c.h" #include "SDL_qsa_audio.h" -/* The tag name used by QSA audio framework */ -#define DRIVER_NAME "qsa" - /* default channel communication parameters */ #define DEFAULT_CPARAMS_RATE 44100 #define DEFAULT_CPARAMS_VOICES 1 @@ -863,7 +860,7 @@ QSA_Init(SDL_AudioDriverImpl * impl) } AudioBootStrap QSAAUDIO_bootstrap = { - DRIVER_NAME, "QNX QSA Audio", QSA_Init, 0 + "qsa", "QNX QSA Audio", QSA_Init, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/ums/SDL_umsaudio.c b/src/audio/ums/SDL_umsaudio.c index 81db62623..999ad01e8 100644 --- a/src/audio/ums/SDL_umsaudio.c +++ b/src/audio/ums/SDL_umsaudio.c @@ -40,9 +40,6 @@ #include "../SDL_audio_c.h" #include "SDL_umsaudio.h" -/* The tag name used by UMS audio */ -#define UMS_DRIVER_NAME "ums" - #define DEBUG_AUDIO 1 /* Audio driver functions */ @@ -152,8 +149,7 @@ Audio_CreateDevice(int devindex) } AudioBootStrap UMS_bootstrap = { - UMS_DRIVER_NAME, "AIX UMS audio", - Audio_Available, Audio_CreateDevice, 0 + "ums", "AIX UMS audio", Audio_Available, Audio_CreateDevice, 0 }; static Uint8 *