ref: dd671e26c45909310d20db2180f5f328dc8ad8cd
parent: 0a411d3dee850a3beae87b95256523df7aa6104d
author: Fabien Sanglard <[email protected]>
date: Thu Dec 13 16:56:23 EST 2012
Fixed dummy sound system problem (faking playing a sound had to return FX_Ok instead of 1
--- a/Engine/src/sdl_driver.c
+++ b/Engine/src/sdl_driver.c
@@ -2479,10 +2479,10 @@
//} /* getticks */
-#if 0// PLATFORM_WIN32 Timer on windows 98 used to be really poor but now it is very accurate
- // We can just used what SDL uses, now need for QueryPerformanceFrequency or QueryPerformanceCounter
- // (which I bet SDL is using anyway).
-
+//Timer on windows 98 used to be really poor but now it is very accurate
+// We can just used what SDL uses, now need for QueryPerformanceFrequency or QueryPerformanceCounter
+// (which I bet SDL is using anyway).
+#if 0//PLATFORM_WIN32
int TIMER_GetPlatformTicksInOneSecond(int64_t* t)
{
QueryPerformanceFrequency((LARGE_INTEGER*)t);
--- a/Game/src/dummy_audiolib.c
+++ b/Game/src/dummy_audiolib.c
@@ -38,26 +38,26 @@
int FX_SetFrequency( int handle, int frequency ){return 1;}
int FX_PlayVOC( uint8_t *ptr, int pitchoffset, int vol, int left, int right,
- int priority, uint32_t callbackval ){return 1;}
+ int priority, uint32_t callbackval ){return FX_Ok;}
int FX_PlayLoopedVOC( uint8_t *ptr, int32_t loopstart, int32_t loopend,
int pitchoffset, int vol, int left, int right, int priority,
- uint32_t callbackval ){return 1;}
+ uint32_t callbackval ){return FX_Ok;}
int FX_PlayWAV( uint8_t *ptr, int pitchoffset, int vol, int left, int right,
- int priority, uint32_t callbackval ){return 1;}
+ int priority, uint32_t callbackval ){return FX_Ok;}
int FX_PlayLoopedWAV( uint8_t *ptr, int32_t loopstart, int32_t loopend,
int pitchoffset, int vol, int left, int right, int priority,
- uint32_t callbackval ){return 1;}
+ uint32_t callbackval ){return FX_Ok;}
int FX_PlayVOC3D( uint8_t *ptr, int pitchoffset, int angle, int distance,
- int priority, uint32_t callbackval ){return 1;}
+ int priority, uint32_t callbackval ){return FX_Ok;}
int FX_PlayWAV3D( uint8_t *ptr, int pitchoffset, int angle, int distance,
- int priority, uint32_t callbackval ){return 1;}
+ int priority, uint32_t callbackval ){return FX_Ok;}
int FX_PlayRaw( uint8_t *ptr, uint32_t length, unsigned rate,
int pitchoffset, int vol, int left, int right, int priority,
- uint32_t callbackval ){return 1;}
+ uint32_t callbackval ){return FX_Ok;}
int FX_PlayLoopedRaw( uint8_t *ptr, uint32_t length, uint8_t *loopstart,
uint8_t *loopend, unsigned rate, int pitchoffset, int vol, int left,
- int right, int priority, uint32_t callbackval ){return 1;}
-int FX_Pan3D( int handle, int angle, int distance ){return 1;}
+ int right, int priority, uint32_t callbackval ){return FX_Ok;}
+int FX_Pan3D( int handle, int angle, int distance ){return FX_Ok;}
int FX_SoundActive( int handle ){return 1;}
int FX_SoundsPlaying( void ){return 0;}
int FX_StopSound( int handle ){return 1;}
--- a/Game/src/sounds.c
+++ b/Game/src/sounds.c
@@ -675,13 +675,15 @@
void clearsoundlocks(void)
{
int32_t i;
+
+ printf("FCS: Warning, cleaning sound lock in unproper way. THIS MUST BE FIXED ON MACOSX.\n");
for(i=0;i<NUM_SOUNDS;i++)
- if(Sound[i].lock >= 200)
+ // if(Sound[i].lock >= 200)
Sound[i].lock = 199;
for(i=0;i<11;i++)
- if(lumplockbyte[i] >= 200)
+ // if(lumplockbyte[i] >= 200)
lumplockbyte[i] = 199;
}