Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Removed needless macros in various audio targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 26, 2011
1 parent 5202ee8 commit 7bf08bb
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 54 deletions.
5 changes: 1 addition & 4 deletions src/audio/alsa/SDL_alsa_audio.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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: */
5 changes: 1 addition & 4 deletions src/audio/arts/SDL_artsaudio.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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: */
11 changes: 1 addition & 10 deletions src/audio/bsd/SDL_bsdaudio.c
Expand Up @@ -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 */

Expand Down Expand Up @@ -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: */
5 changes: 1 addition & 4 deletions src/audio/disk/SDL_diskaudio.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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: */
5 changes: 1 addition & 4 deletions src/audio/dsp/SDL_dspaudio.c
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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: */
5 changes: 1 addition & 4 deletions src/audio/esd/SDL_esdaudio.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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: */
4 changes: 1 addition & 3 deletions src/audio/fusionsound/SDL_fsaudio.c
Expand Up @@ -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)

Expand Down Expand Up @@ -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: */
5 changes: 1 addition & 4 deletions src/audio/nas/SDL_nasaudio.c
Expand Up @@ -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;


Expand Down Expand Up @@ -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: */
5 changes: 1 addition & 4 deletions src/audio/paudio/SDL_paudio.c
Expand Up @@ -45,9 +45,6 @@
#undef BIG_ENDIAN
#include <sys/audio.h>

/* 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
Expand Down Expand Up @@ -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: */
5 changes: 1 addition & 4 deletions src/audio/pulseaudio/SDL_pulseaudio.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 */
Expand Down
5 changes: 1 addition & 4 deletions src/audio/qsa/SDL_qsa_audio.c
Expand Up @@ -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
Expand Down Expand Up @@ -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: */
6 changes: 1 addition & 5 deletions src/audio/ums/SDL_umsaudio.c
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 *
Expand Down

0 comments on commit 7bf08bb

Please sign in to comment.