mirror of
https://github.com/mrxenginner/reVC.git
synced 2026-10-11 17:58:17 +08:00
Merge branch 'miami' of https://git.jacksmininetwork.co.uk/re/re3 into miami
This commit is contained in:
commit
724645af20
3 files changed
+11
-1
No files matched your search
@@ -9,6 +9,7 @@
|
||||
#endif
|
||||
|
||||
extern bool IsFXSupported();
|
||||
extern size_t gPlayerTalkDataSize;
|
||||
|
||||
ALuint alSources[NUM_CHANNELS];
|
||||
ALuint alFilters[NUM_CHANNELS];
|
||||
@@ -17,7 +18,7 @@ bool bChannelsCreated = false;
|
||||
|
||||
int32 CChannel::channelsThatNeedService = 0;
|
||||
|
||||
uint8 tempStereoBuffer[PED_BLOCKSIZE * 2];
|
||||
uint8* tempStereoBuffer = nil;
|
||||
|
||||
void
|
||||
CChannel::InitChannels()
|
||||
@@ -26,6 +27,8 @@ CChannel::InitChannels()
|
||||
alGenBuffers(NUM_CHANNELS, alBuffers);
|
||||
if (IsFXSupported())
|
||||
alGenFilters(NUM_CHANNELS, alFilters);
|
||||
|
||||
tempStereoBuffer = new uint8[Max(PED_BLOCKSIZE, gPlayerTalkDataSize) * 2];
|
||||
bChannelsCreated = true;
|
||||
}
|
||||
|
||||
@@ -43,6 +46,7 @@ CChannel::DestroyChannels()
|
||||
alDeleteFilters(NUM_CHANNELS, alFilters);
|
||||
memset(alFilters, 0, sizeof(alFilters));
|
||||
}
|
||||
delete[]tempStereoBuffer;
|
||||
bChannelsCreated = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1444,6 +1444,7 @@ cSampleManager::Terminate(void)
|
||||
{
|
||||
AIL_mem_free_lock(gPlayerTalkData);
|
||||
gPlayerTalkData = 0;
|
||||
gPlayerTalkSfx = UINT32_MAX;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ uint8 nCurrentPedSlot;
|
||||
#ifdef FIX_BUGS
|
||||
uint32 gPlayerTalkSfx = UINT32_MAX;
|
||||
void *gPlayerTalkData = 0;
|
||||
size_t gPlayerTalkDataSize = 0;
|
||||
#endif
|
||||
|
||||
CChannel aChannel[NUM_CHANNELS];
|
||||
@@ -977,6 +978,8 @@ cSampleManager::Initialise(void)
|
||||
|
||||
gPlayerTalkData = malloc(nMaxPedSize);
|
||||
ASSERT(gPlayerTalkData != 0);
|
||||
|
||||
gPlayerTalkDataSize = nMaxPedSize;
|
||||
#endif
|
||||
|
||||
LoadSampleBank(SFX_BANK_0);
|
||||
@@ -1144,6 +1147,8 @@ cSampleManager::Terminate(void)
|
||||
{
|
||||
free(gPlayerTalkData);
|
||||
gPlayerTalkData = 0;
|
||||
gPlayerTalkDataSize = 0;
|
||||
gPlayerTalkSfx = UINT32_MAX;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user