From f56125d7adff6418413b5f1cfe7d270611591d57 Mon Sep 17 00:00:00 2001 From: ghaushe Date: Mon, 3 Feb 2003 18:10:05 +0000 Subject: [PATCH] Minor cleanup to audio merge. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@660 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/msvc++/UrQuanMasters.dsp | 4 - .../sc2code/libs/sound/mixsdl/sound_mixsdl.h | 3 - .../sc2code/libs/sound/openal/sound_openal.h | 85 ------------------- sc2/src/sc2code/libs/sound/sound_chooser.c | 35 +------- sc2/src/sc2code/libs/sound/sound_chooser.h | 4 - 5 files changed, 1 insertion(+), 130 deletions(-) delete mode 100644 sc2/src/sc2code/libs/sound/openal/sound_openal.h diff --git a/sc2/src/msvc++/UrQuanMasters.dsp b/sc2/src/msvc++/UrQuanMasters.dsp index 1630ce435..97c5ef541 100644 --- a/sc2/src/msvc++/UrQuanMasters.dsp +++ b/sc2/src/msvc++/UrQuanMasters.dsp @@ -454,10 +454,6 @@ SOURCE=..\sc2code\libs\sound\openal\mixer.h SOURCE=..\sc2code\libs\sound\openal\sound_openal.c # End Source File -# Begin Source File - -SOURCE=..\sc2code\libs\sound\openal\sound_openal.h -# End Source File # End Group # Begin Group "decoders" diff --git a/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.h b/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.h index 6e0b1aa80..6ea932815 100644 --- a/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.h +++ b/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.h @@ -28,9 +28,6 @@ * General interface */ #define TFBSound_GetError mixSDL_GetError -#define TFBSound_OpenAudio mixSDL_OpenAudio -#define TFBSound_CloseAudio mixSDL_CloseAudio -#define TFBSound_QuerySpec mixSDL_QuerySpec /************************************************* * Sources diff --git a/sc2/src/sc2code/libs/sound/openal/sound_openal.h b/sc2/src/sc2code/libs/sound/openal/sound_openal.h deleted file mode 100644 index 72b0f1967..000000000 --- a/sc2/src/sc2code/libs/sound/openal/sound_openal.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/* Mixer abstraction layer for OpenAL - */ - -#ifdef WIN32 -#include -#include -#pragma comment (lib, "OpenAL32.lib") -#else -#include -#include -#endif - -#include "mixer.h" - -/************************************************* - * Interface Types - */ -#define TFBSound_Object ALuint -#define TFBSound_IntVal ALint - -/************************************************* - * General interface - */ -#define TFBSound_GetError alGetError -#define TFBSound_OpenAudio alOpenAudio -#define TFBSound_CloseAudio alCloseAudio -#define TFBSound_QuerySpec alQuerySpec - -/************************************************* - * Sources - */ -#define TFBSound_GenSources alGenSources -#define TFBSound_DeleteSources alDeleteSources -#define TFBSound_IsSource alIsSource -#define TFBSound_Sourcei alSourcei -#define TFBSound_Sourcef alSourcef -#define TFBSound_GetSourcei alGetSourcei -#define TFBSound_GetSourcef alGetSourcef -#define TFBSound_SourceRewind alSourceRewind -#define TFBSound_SourcePlay alSourcePlay -#define TFBSound_SourcePause alSourcePause -#define TFBSound_SourceStop alSourceStop -#define TFBSound_SourceQueueBuffers alSourceQueueBuffers -#define TFBSound_SourceUnqueueBuffers alSourceUnqueueBuffers - -/************************************************* - * Buffers - */ -#define TFBSound_GenBuffers alGenBuffers -#define TFBSound_DeleteBuffers alDeleteBuffers -#define TFBSound_IsBuffer alIsBuffer -#define TFBSound_GetBufferi alGetBufferi -#define TFBSound_BufferData alBufferData -#define TFBSound_ConvertBuffer alConvertBuffer -#define TFBSound_BufferData_Linux alBufferWriteData_LOKI - -#define TFBSOUND_GAIN AL_GAIN -#define TFBSOUND_BUFFER AL_BUFFER -#define TFBSOUND_SOURCE_STATE AL_SOURCE_STATE -#define TFBSOUND_PLAYING AL_PLAYING -#define TFBSOUND_PAUSED AL_PAUSED -#define TFBSOUND_FORMAT_MONO16 AL_FORMAT_MONO16 -#define TFBSOUND_FORMAT_STEREO16 AL_FORMAT_STEREO16 -#define TFBSOUND_FORMAT_STEREO8 AL_FORMAT_STEREO8 -#define TFBSOUND_LOOPING AL_LOOPING -#define TFBSOUND_BUFFERS_PROCESSED AL_BUFFERS_PROCESSED -#define TFBSOUND_BUFFERS_QUEUED AL_BUFFERS_QUEUED -#define TFBSOUND_NO_ERROR AL_NO_ERROR -#define TFBSOUND_SIZE AL_SIZE diff --git a/sc2/src/sc2code/libs/sound/sound_chooser.c b/sc2/src/sc2code/libs/sound/sound_chooser.c index b2b5e2040..fc4ef174d 100644 --- a/sc2/src/sc2code/libs/sound/sound_chooser.c +++ b/sc2/src/sc2code/libs/sound/sound_chooser.c @@ -44,39 +44,6 @@ TFBSound_GetError (void) return (mixSDL_GetError ()); } -bool -TFBSound_OpenAudio (uint32 freq, uint32 format, uint32 chunksize) -{ - if (SoundDriver == TFB_SOUNDDRIVER_OPENAL) - { - fprintf (stderr, "OpenAudio is not supported for openAL\n"); - return (0); - } - else - return (mixSDL_OpenAudio (freq, format, chunksize)); -} - -void -TFBSound_CloseAudio (void) -{ - if (SoundDriver == TFB_SOUNDDRIVER_OPENAL) - fprintf (stderr, "CloseAudio is not supported for openAL\n"); - else - mixSDL_CloseAudio (); -} - -bool -TFBSound_QuerySpec (uint32 *freq, uint32 *format, uint32 *channels) -{ - if (SoundDriver == TFB_SOUNDDRIVER_OPENAL) - { - fprintf (stderr, "QuerySpec is not supported for openAL\n"); - return (0); - } - else - return (mixSDL_QuerySpec (freq, format, channels)); -} - /************************************************* * Sources */ @@ -87,7 +54,7 @@ TFBSound_GenSources (uint32 n, mixSDL_Object *psrcobj) if (SoundDriver == TFB_SOUNDDRIVER_OPENAL) alGenSources (n, (ALuint *)psrcobj); else - mixSDL_GenSources (n, (TFBSound_Object *)psrcobj); + mixSDL_GenSources (n, (mixSDL_Object *)psrcobj); } void TFBSound_DeleteSources (uint32 n, TFBSound_Object *psrcobj) diff --git a/sc2/src/sc2code/libs/sound/sound_chooser.h b/sc2/src/sc2code/libs/sound/sound_chooser.h index 723bc6cb4..488c94d96 100644 --- a/sc2/src/sc2code/libs/sound/sound_chooser.h +++ b/sc2/src/sc2code/libs/sound/sound_chooser.h @@ -59,10 +59,6 @@ typedef const int TFBSound_BufferProp; */ uint32 TFBSound_GetError (void); -bool TFBSound_OpenAudio (uint32 freq, uint32 format, uint32 chunksize); -void TFBSound_CloseAudio (void); -bool TFBSound_QuerySpec (uint32 *freq, uint32 *format, uint32 *channels); - /************************************************* * Sources */