mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 07:00:00 +00:00
Port debug messagess for audio cache
This commit is contained in:
parent
19749effce
commit
6bebde8279
|
@ -996,11 +996,13 @@ cSampleManager::Initialise(void)
|
||||||
#ifdef AUDIO_CACHE
|
#ifdef AUDIO_CACHE
|
||||||
FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb");
|
FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb");
|
||||||
if (cacheFile) {
|
if (cacheFile) {
|
||||||
|
debug("Loadind audio cache (If game crashes around here, then your cache is corrupted, remove audio/sound.cache)\n");
|
||||||
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
||||||
fclose(cacheFile);
|
fclose(cacheFile);
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
debug("Cannot load audio cache\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
||||||
{
|
{
|
||||||
|
@ -1019,10 +1021,15 @@ cSampleManager::Initialise(void)
|
||||||
}
|
}
|
||||||
#ifdef AUDIO_CACHE
|
#ifdef AUDIO_CACHE
|
||||||
cacheFile = fcaseopen("audio\\sound.cache", "wb");
|
cacheFile = fcaseopen("audio\\sound.cache", "wb");
|
||||||
|
if(cacheFile) {
|
||||||
|
debug("Saving audio cache\n");
|
||||||
fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
||||||
fclose(cacheFile);
|
fclose(cacheFile);
|
||||||
#endif
|
} else {
|
||||||
|
debug("Cannot save audio cache\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
if ( !InitialiseSampleBanks() )
|
if ( !InitialiseSampleBanks() )
|
||||||
|
|
Loading…
Reference in a new issue