diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-07-17 12:48:25 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-07-17 12:48:25 +0200 |
commit | 949d0c8853d31ae88fdf3427bae05ec337ab4b0b (patch) | |
tree | a755d2e6f03c9794196f3b0b3f6c7499b67a94a3 /src/audio/sampman_miles.cpp | |
parent | Fix wheel water splash with PC_PARTICLE (diff) | |
download | re3-949d0c8853d31ae88fdf3427bae05ec337ab4b0b.tar re3-949d0c8853d31ae88fdf3427bae05ec337ab4b0b.tar.gz re3-949d0c8853d31ae88fdf3427bae05ec337ab4b0b.tar.bz2 re3-949d0c8853d31ae88fdf3427bae05ec337ab4b0b.tar.lz re3-949d0c8853d31ae88fdf3427bae05ec337ab4b0b.tar.xz re3-949d0c8853d31ae88fdf3427bae05ec337ab4b0b.tar.zst re3-949d0c8853d31ae88fdf3427bae05ec337ab4b0b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/sampman_miles.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index d625ac35..098b6efa 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -959,6 +959,15 @@ cSampleManager::Initialise(void) } +#ifdef AUDIO_CACHE + TRACE("cache"); + FILE *cacheFile = fopen("audio\\sound.cache", "rb"); + if (cacheFile) { + fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile); + fclose(cacheFile); + m_bInitialised = true; + }else { +#endif TRACE("cdrom"); S32 tatalms; @@ -1115,7 +1124,13 @@ cSampleManager::Initialise(void) _bUseHDDAudio = false; } #endif - +#ifdef AUDIO_CACHE + cacheFile = fopen("audio\\sound.cache", "wb"); + fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile); + fclose(cacheFile); + } +#endif + TRACE("stream"); { for ( int32 i = 0; i < MAX_STREAMS; i++ ) |