Minor cleanup to audio merge.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@660 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -454,10 +454,6 @@ SOURCE=..\sc2code\libs\sound\openal\mixer.h
|
|||||||
|
|
||||||
SOURCE=..\sc2code\libs\sound\openal\sound_openal.c
|
SOURCE=..\sc2code\libs\sound\openal\sound_openal.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\sc2code\libs\sound\openal\sound_openal.h
|
|
||||||
# End Source File
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "decoders"
|
# Begin Group "decoders"
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,6 @@
|
|||||||
* General interface
|
* General interface
|
||||||
*/
|
*/
|
||||||
#define TFBSound_GetError mixSDL_GetError
|
#define TFBSound_GetError mixSDL_GetError
|
||||||
#define TFBSound_OpenAudio mixSDL_OpenAudio
|
|
||||||
#define TFBSound_CloseAudio mixSDL_CloseAudio
|
|
||||||
#define TFBSound_QuerySpec mixSDL_QuerySpec
|
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Sources
|
* Sources
|
||||||
|
|||||||
@@ -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 <al.h>
|
|
||||||
#include <alc.h>
|
|
||||||
#pragma comment (lib, "OpenAL32.lib")
|
|
||||||
#else
|
|
||||||
#include <AL/al.h>
|
|
||||||
#include <AL/alc.h>
|
|
||||||
#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
|
|
||||||
@@ -44,39 +44,6 @@ TFBSound_GetError (void)
|
|||||||
return (mixSDL_GetError ());
|
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
|
* Sources
|
||||||
*/
|
*/
|
||||||
@@ -87,7 +54,7 @@ TFBSound_GenSources (uint32 n, mixSDL_Object *psrcobj)
|
|||||||
if (SoundDriver == TFB_SOUNDDRIVER_OPENAL)
|
if (SoundDriver == TFB_SOUNDDRIVER_OPENAL)
|
||||||
alGenSources (n, (ALuint *)psrcobj);
|
alGenSources (n, (ALuint *)psrcobj);
|
||||||
else
|
else
|
||||||
mixSDL_GenSources (n, (TFBSound_Object *)psrcobj);
|
mixSDL_GenSources (n, (mixSDL_Object *)psrcobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TFBSound_DeleteSources (uint32 n, TFBSound_Object *psrcobj)
|
void TFBSound_DeleteSources (uint32 n, TFBSound_Object *psrcobj)
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ typedef const int TFBSound_BufferProp;
|
|||||||
*/
|
*/
|
||||||
uint32 TFBSound_GetError (void);
|
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
|
* Sources
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user