diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 779283553..0e5594c89 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ 0.2: +- Linux OpenAL fixes (music plays now as stereo) - Fuel giveaway bug fixed, from steve@blckknght.org - Starmap fuel range calculator and actual consumption matches now - Collision detection is now pixel-perfect (fixes Sa-Matra, BUTT missile, etc) diff --git a/sc2/TODO b/sc2/TODO index 5d8c1cac4..a3d5c0a47 100644 --- a/sc2/TODO +++ b/sc2/TODO @@ -37,8 +37,6 @@ Glitches (don't crash the game, medium priority): though. - OpenAL sound code problems: - Some unimplemented functions (for oscilloscope and dialogue seeking) - - Linux OpenAL implementation sucks, so for now we are using SDL_mixer - on that platform. - Volume levels aren't maybe exactly as they should - Crashes if no audio device available - Color table transformations are very slow. diff --git a/sc2/src/sc2code/libs/sound/openal/music.c b/sc2/src/sc2code/libs/sound/openal/music.c index ceced8a01..2e4efea92 100644 --- a/sc2/src/sc2code/libs/sound/openal/music.c +++ b/sc2/src/sc2code/libs/sound/openal/music.c @@ -156,7 +156,7 @@ _GetMusicData (FILE *fp, DWORD length) } fprintf (stderr, "_GetMusicData(): loading %s\n", filename); - if (((*pmus)->decoder = SoundDecoder_Load (filename, 16384)) == 0) + if (((*pmus)->decoder = SoundDecoder_Load (filename, 4096)) == 0) { fprintf (stderr, "_GetMusicData(): couldn't load %s\n", filename); @@ -169,7 +169,7 @@ _GetMusicData (FILE *fp, DWORD length) fprintf (stderr, " decoder: %s, rate %d format %x\n", (*pmus)->decoder->decoder_info, (*pmus)->decoder->frequency, (*pmus)->decoder->format); - (*pmus)->num_buffers = 16; + (*pmus)->num_buffers = 64; (*pmus)->buffer = (ALuint *) HMalloc (sizeof (ALuint) * (*pmus)->num_buffers); alGenBuffers ((*pmus)->num_buffers, (*pmus)->buffer); } diff --git a/sc2/src/sc2code/libs/sound/openal/stream.c b/sc2/src/sc2code/libs/sound/openal/stream.c index 47aa7675b..4af6f848b 100644 --- a/sc2/src/sc2code/libs/sound/openal/stream.c +++ b/sc2/src/sc2code/libs/sound/openal/stream.c @@ -21,7 +21,7 @@ #include "sound.h" -#if 0 && !defined (WIN32) // && !defined (MacOS and BEOS too) +#if !defined (WIN32) // && !defined (MacOS and BeOS too) #include #endif @@ -53,7 +53,7 @@ PlayStream (TFB_SoundSample *sample, ALuint source, ALboolean looping) if (decoded_bytes == 0) break; -#if 0 && !defined (WIN32) // && !defined (MacOS and BeOS too) +#if !defined (WIN32) // && !defined (MacOS and BeOS too) // *nix OpenAL implementation has to handle stereo data differently to avoid mixing it to mono if (sample->decoder->format == AL_FORMAT_STEREO8 || @@ -219,7 +219,7 @@ StreamDecoderTaskFunc (void *data) if (decoded_bytes > 0) { -#if 0 && !defined (WIN32) // && !defined (MacOS and BeOS too) +#if !defined (WIN32) // && !defined (MacOS and BeOS too) // *nix OpenAL implementation has to handle stereo data differently to avoid mixing it to mono if (soundSource[i].sample->decoder->format == AL_FORMAT_STEREO8 ||