diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2018-03-26 08:50:33 +0200 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2018-03-26 08:50:33 +0200 |
| commit | 2c3b747732efd11fd279c27e1092e63e9f761c96 (patch) | |
| tree | 95ae7e8a21f96c0c9ab0573ac7e1641d03e38d16 /Source/Sfx.c | |
| parent | 4887461e35b64c697cbabaf0268c77ae68576c5e (diff) | |
| download | airport-2c3b747732efd11fd279c27e1092e63e9f761c96.tar.gz | |
* Game can now compile without PSXSDK_DEBUG flag.
* RCNT2 ISR is now disabled as soon as SystemLoadFileIntoBuffer() is called. Hopefully that will avoid problems with real HW.
Diffstat (limited to 'Source/Sfx.c')
| -rw-r--r-- | Source/Sfx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Sfx.c b/Source/Sfx.c index 2f8a565..a823c43 100644 --- a/Source/Sfx.c +++ b/Source/Sfx.c @@ -33,7 +33,9 @@ void SfxPlaySound(SsVag* sound) bool SfxUploadSound_Ex(char* file_path, SsVag* vag, uint8_t voiceIndex) { +#ifdef PSXSDK_DEBUG static size_t SPUBytesUsed; +#endif // PSXSDK_DEBUG if (voiceIndex >= NUMBER_OF_VOICES) { @@ -63,6 +65,8 @@ bool SfxUploadSound_Ex(char* file_path, SsVag* vag, uint8_t voiceIndex) usedVoices[voiceIndex] = true; +#ifdef PSXSDK_DEBUG + SPUBytesUsed += vag->data_size; if (SPUBytesUsed != 0) @@ -77,6 +81,8 @@ bool SfxUploadSound_Ex(char* file_path, SsVag* vag, uint8_t voiceIndex) dprintf("SPU usage: %d%%\n", percentage); } +#endif // PSXSDK_DEBUG + return true; } |
