extern "C" fix for windows builds

This commit is contained in:
Sonic Dreamcaster 2024-11-10 22:23:36 -03:00
parent 304a0a5288
commit de6f28df81
2 changed files with 11 additions and 3 deletions

View File

@ -73,6 +73,10 @@ typedef void (*AudioCustomUpdateFunction)(void);
#define AUDIOLOAD_SYNC 0
#define AUDIOLOAD_ASYNC 1
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
/* 0 */ ADSR_STATE_DISABLED,
/* 1 */ ADSR_STATE_INITIAL,
@ -1230,4 +1234,8 @@ extern f32 gHeadsetPanVolume[128];
extern f32 gStereoPanVolume[128];
extern f32 gDefaultPanVolume[128];
#ifdef __cplusplus
}
#endif
#endif

View File

@ -821,9 +821,9 @@ void AudioLoad_Init(void) {
gAudioResetTimer = 0;
for (i = 0; i < gAudioHeapSize / 8; i++) {
*((u64*) gAudioHeap + i) = 0;
}
// for (i = 0; i < gAudioHeapSize / 8; i++) {
// *((u64*) gAudioHeap + i) = 0;
// }
clearContext = gAudioContextStart;
dwordsLeft = ((uintptr_t) gAudioContextEnd - (uintptr_t) gAudioContextStart) / 8;