commond decoders for OpenAL and MixSDL
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@597 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
if [ "$uqm_SOUNDMODULE" = openal ]; then
|
||||
uqm_SUBDIRS="openal"
|
||||
uqm_SUBDIRS="openal decoders"
|
||||
uqm_CFLAGS="$uqm_CFLAGS -DSOUNDMODULE_OPENAL"
|
||||
elif [ "$uqm_SOUNDMODULE" = mixsdl ]; then
|
||||
uqm_SUBDIRS="mixsdl"
|
||||
uqm_SUBDIRS="mixsdl decoders"
|
||||
uqm_CFLAGS="$uqm_CFLAGS -DSOUNDMODULE_MIXSDL"
|
||||
else
|
||||
uqm_SUBDIRS="sdl"
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
uqm_SUBDIRS="decoders"
|
||||
uqm_CFILES="mixer.c sound.c music.c sfx.c stream.c trackplayer.c"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "libs/sound/sndintrn.h"
|
||||
#include "libs/sound/sound_common.h"
|
||||
#include "mixer.h"
|
||||
#include "decoders/decoder.h"
|
||||
#include "libs/sound/decoders/decoder.h"
|
||||
|
||||
|
||||
#define FIRST_SFX_SOURCE 0
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
uqm_SUBDIRS="decoders"
|
||||
uqm_CFILES="music.c sfx.c sound.c stream.c trackplayer.c"
|
||||
|
||||
@@ -34,6 +34,12 @@ int
|
||||
TFB_InitSound (int driver, int flags)
|
||||
{
|
||||
int i;
|
||||
TFB_DecoderFormats formats =
|
||||
{
|
||||
MIX_IS_BIG_ENDIAN, MIX_WANT_BIG_ENDIAN,
|
||||
AL_FORMAT_MONO8, AL_FORMAT_STEREO8,
|
||||
AL_FORMAT_MONO16, AL_FORMAT_STEREO16
|
||||
};
|
||||
|
||||
fprintf (stderr, "Initializing OpenAL.\n");
|
||||
atexit (TFB_UninitSound);
|
||||
@@ -67,7 +73,7 @@ TFB_InitSound (int driver, int flags)
|
||||
//fprintf (stderr, " extensions: %s\n", alGetString (AL_EXTENSIONS));
|
||||
|
||||
fprintf (stderr, "Initializing sound decoders.\n");
|
||||
SoundDecoder_Init (flags);
|
||||
SoundDecoder_Init (flags, &formats);
|
||||
fprintf (stderr, "Sound decoders initialized.\n");
|
||||
|
||||
alListenerfv (AL_POSITION, listenerPos);
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
#include "libs/strings/strintrn.h"
|
||||
#include "libs/sound/sndintrn.h"
|
||||
#include "libs/sound/sound_common.h"
|
||||
#include "decoders/decoder.h"
|
||||
#include "mixer.h"
|
||||
#include "libs/sound/decoders/decoder.h"
|
||||
|
||||
|
||||
#define FIRST_SFX_SOURCE 0
|
||||
|
||||
Reference in New Issue
Block a user