aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-18 10:09:04 -0700
committerChris Robinson <[email protected]>2019-09-18 10:09:04 -0700
commit66565ca7a3cd63e242eedb0141341eb9450f0d4a (patch)
tree09ef30049942305dec9241fe896b8fad7685da11 /examples
parentda80a7c2b2e4a66856bec4d7b44c7a7df05a31a5 (diff)
Enable and fix some more warnings
Diffstat (limited to 'examples')
-rw-r--r--examples/alhrtf.c6
-rw-r--r--examples/allatency.c26
-rw-r--r--examples/alloopback.c8
-rw-r--r--examples/almultireverb.c72
-rw-r--r--examples/alreverb.c48
5 files changed, 80 insertions, 80 deletions
diff --git a/examples/alhrtf.c b/examples/alhrtf.c
index f09f3e99..2be28a91 100644
--- a/examples/alhrtf.c
+++ b/examples/alhrtf.c
@@ -164,9 +164,9 @@ int main(int argc, char **argv)
}
/* Define a macro to help load the function pointers. */
-#define LOAD_PROC(d, x) ((x) = alcGetProcAddress((d), #x))
- LOAD_PROC(device, alcGetStringiSOFT);
- LOAD_PROC(device, alcResetDeviceSOFT);
+#define LOAD_PROC(d, T, x) ((x) = (T)alcGetProcAddress((d), #x))
+ LOAD_PROC(device, LPALCGETSTRINGISOFT, alcGetStringiSOFT);
+ LOAD_PROC(device, LPALCRESETDEVICESOFT, alcResetDeviceSOFT);
#undef LOAD_PROC
/* Check for the AL_EXT_STEREO_ANGLES extension to be able to also rotate
diff --git a/examples/allatency.c b/examples/allatency.c
index ad700cc1..a61fb820 100644
--- a/examples/allatency.c
+++ b/examples/allatency.c
@@ -158,19 +158,19 @@ int main(int argc, char **argv)
}
/* Define a macro to help load the function pointers. */
-#define LOAD_PROC(x) ((x) = alGetProcAddress(#x))
- LOAD_PROC(alSourcedSOFT);
- LOAD_PROC(alSource3dSOFT);
- LOAD_PROC(alSourcedvSOFT);
- LOAD_PROC(alGetSourcedSOFT);
- LOAD_PROC(alGetSource3dSOFT);
- LOAD_PROC(alGetSourcedvSOFT);
- LOAD_PROC(alSourcei64SOFT);
- LOAD_PROC(alSource3i64SOFT);
- LOAD_PROC(alSourcei64vSOFT);
- LOAD_PROC(alGetSourcei64SOFT);
- LOAD_PROC(alGetSource3i64SOFT);
- LOAD_PROC(alGetSourcei64vSOFT);
+#define LOAD_PROC(T, x) ((x) = (T)alGetProcAddress(#x))
+ LOAD_PROC(LPALSOURCEDSOFT, alSourcedSOFT);
+ LOAD_PROC(LPALSOURCE3DSOFT, alSource3dSOFT);
+ LOAD_PROC(LPALSOURCEDVSOFT, alSourcedvSOFT);
+ LOAD_PROC(LPALGETSOURCEDSOFT, alGetSourcedSOFT);
+ LOAD_PROC(LPALGETSOURCE3DSOFT, alGetSource3dSOFT);
+ LOAD_PROC(LPALGETSOURCEDVSOFT, alGetSourcedvSOFT);
+ LOAD_PROC(LPALSOURCEI64SOFT, alSourcei64SOFT);
+ LOAD_PROC(LPALSOURCE3I64SOFT, alSource3i64SOFT);
+ LOAD_PROC(LPALSOURCEI64VSOFT, alSourcei64vSOFT);
+ LOAD_PROC(LPALGETSOURCEI64SOFT, alGetSourcei64SOFT);
+ LOAD_PROC(LPALGETSOURCE3I64SOFT, alGetSource3i64SOFT);
+ LOAD_PROC(LPALGETSOURCEI64VSOFT, alGetSourcei64vSOFT);
#undef LOAD_PROC
/* Initialize SDL_sound. */
diff --git a/examples/alloopback.c b/examples/alloopback.c
index 426a2af9..844efa74 100644
--- a/examples/alloopback.c
+++ b/examples/alloopback.c
@@ -149,10 +149,10 @@ int main(int argc, char *argv[])
}
/* Define a macro to help load the function pointers. */
-#define LOAD_PROC(x) ((x) = alcGetProcAddress(NULL, #x))
- LOAD_PROC(alcLoopbackOpenDeviceSOFT);
- LOAD_PROC(alcIsRenderFormatSupportedSOFT);
- LOAD_PROC(alcRenderSamplesSOFT);
+#define LOAD_PROC(T, x) ((x) = (T)alcGetProcAddress(NULL, #x))
+ LOAD_PROC(LPALCLOOPBACKOPENDEVICESOFT, alcLoopbackOpenDeviceSOFT);
+ LOAD_PROC(LPALCISRENDERFORMATSUPPORTEDSOFT, alcIsRenderFormatSupportedSOFT);
+ LOAD_PROC(LPALCRENDERSAMPLESSOFT, alcRenderSamplesSOFT);
#undef LOAD_PROC
if(SDL_Init(SDL_INIT_AUDIO) == -1)
diff --git a/examples/almultireverb.c b/examples/almultireverb.c
index 4e3e188f..a90b3368 100644
--- a/examples/almultireverb.c
+++ b/examples/almultireverb.c
@@ -523,42 +523,42 @@ int main(int argc, char **argv)
}
/* Define a macro to help load the function pointers. */
-#define LOAD_PROC(x) ((x) = alGetProcAddress(#x))
- LOAD_PROC(alGenFilters);
- LOAD_PROC(alDeleteFilters);
- LOAD_PROC(alIsFilter);
- LOAD_PROC(alFilteri);
- LOAD_PROC(alFilteriv);
- LOAD_PROC(alFilterf);
- LOAD_PROC(alFilterfv);
- LOAD_PROC(alGetFilteri);
- LOAD_PROC(alGetFilteriv);
- LOAD_PROC(alGetFilterf);
- LOAD_PROC(alGetFilterfv);
-
- LOAD_PROC(alGenEffects);
- LOAD_PROC(alDeleteEffects);
- LOAD_PROC(alIsEffect);
- LOAD_PROC(alEffecti);
- LOAD_PROC(alEffectiv);
- LOAD_PROC(alEffectf);
- LOAD_PROC(alEffectfv);
- LOAD_PROC(alGetEffecti);
- LOAD_PROC(alGetEffectiv);
- LOAD_PROC(alGetEffectf);
- LOAD_PROC(alGetEffectfv);
-
- LOAD_PROC(alGenAuxiliaryEffectSlots);
- LOAD_PROC(alDeleteAuxiliaryEffectSlots);
- LOAD_PROC(alIsAuxiliaryEffectSlot);
- LOAD_PROC(alAuxiliaryEffectSloti);
- LOAD_PROC(alAuxiliaryEffectSlotiv);
- LOAD_PROC(alAuxiliaryEffectSlotf);
- LOAD_PROC(alAuxiliaryEffectSlotfv);
- LOAD_PROC(alGetAuxiliaryEffectSloti);
- LOAD_PROC(alGetAuxiliaryEffectSlotiv);
- LOAD_PROC(alGetAuxiliaryEffectSlotf);
- LOAD_PROC(alGetAuxiliaryEffectSlotfv);
+#define LOAD_PROC(T, x) ((x) = (T)alGetProcAddress(#x))
+ LOAD_PROC(LPALGENFILTERS, alGenFilters);
+ LOAD_PROC(LPALDELETEFILTERS, alDeleteFilters);
+ LOAD_PROC(LPALISFILTER, alIsFilter);
+ LOAD_PROC(LPALFILTERI, alFilteri);
+ LOAD_PROC(LPALFILTERIV, alFilteriv);
+ LOAD_PROC(LPALFILTERF, alFilterf);
+ LOAD_PROC(LPALFILTERFV, alFilterfv);
+ LOAD_PROC(LPALGETFILTERI, alGetFilteri);
+ LOAD_PROC(LPALGETFILTERIV, alGetFilteriv);
+ LOAD_PROC(LPALGETFILTERF, alGetFilterf);
+ LOAD_PROC(LPALGETFILTERFV, alGetFilterfv);
+
+ LOAD_PROC(LPALGENEFFECTS, alGenEffects);
+ LOAD_PROC(LPALDELETEEFFECTS, alDeleteEffects);
+ LOAD_PROC(LPALISEFFECT, alIsEffect);
+ LOAD_PROC(LPALEFFECTI, alEffecti);
+ LOAD_PROC(LPALEFFECTIV, alEffectiv);
+ LOAD_PROC(LPALEFFECTF, alEffectf);
+ LOAD_PROC(LPALEFFECTFV, alEffectfv);
+ LOAD_PROC(LPALGETEFFECTI, alGetEffecti);
+ LOAD_PROC(LPALGETEFFECTIV, alGetEffectiv);
+ LOAD_PROC(LPALGETEFFECTF, alGetEffectf);
+ LOAD_PROC(LPALGETEFFECTFV, alGetEffectfv);
+
+ LOAD_PROC(LPALGENAUXILIARYEFFECTSLOTS, alGenAuxiliaryEffectSlots);
+ LOAD_PROC(LPALDELETEAUXILIARYEFFECTSLOTS, alDeleteAuxiliaryEffectSlots);
+ LOAD_PROC(LPALISAUXILIARYEFFECTSLOT, alIsAuxiliaryEffectSlot);
+ LOAD_PROC(LPALAUXILIARYEFFECTSLOTI, alAuxiliaryEffectSloti);
+ LOAD_PROC(LPALAUXILIARYEFFECTSLOTIV, alAuxiliaryEffectSlotiv);
+ LOAD_PROC(LPALAUXILIARYEFFECTSLOTF, alAuxiliaryEffectSlotf);
+ LOAD_PROC(LPALAUXILIARYEFFECTSLOTFV, alAuxiliaryEffectSlotfv);
+ LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTI, alGetAuxiliaryEffectSloti);
+ LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTIV, alGetAuxiliaryEffectSlotiv);
+ LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTF, alGetAuxiliaryEffectSlotf);
+ LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTFV, alGetAuxiliaryEffectSlotfv);
#undef LOAD_PROC
/* Initialize SDL_sound. */
diff --git a/examples/alreverb.c b/examples/alreverb.c
index 68f0269f..d789dffe 100644
--- a/examples/alreverb.c
+++ b/examples/alreverb.c
@@ -252,30 +252,30 @@ int main(int argc, char **argv)
}
/* Define a macro to help load the function pointers. */
-#define LOAD_PROC(x) ((x) = alGetProcAddress(#x))
- LOAD_PROC(alGenEffects);
- LOAD_PROC(alDeleteEffects);
- LOAD_PROC(alIsEffect);
- LOAD_PROC(alEffecti);
- LOAD_PROC(alEffectiv);
- LOAD_PROC(alEffectf);
- LOAD_PROC(alEffectfv);
- LOAD_PROC(alGetEffecti);
- LOAD_PROC(alGetEffectiv);
- LOAD_PROC(alGetEffectf);
- LOAD_PROC(alGetEffectfv);
-
- LOAD_PROC(alGenAuxiliaryEffectSlots);
- LOAD_PROC(alDeleteAuxiliaryEffectSlots);
- LOAD_PROC(alIsAuxiliaryEffectSlot);
- LOAD_PROC(alAuxiliaryEffectSloti);
- LOAD_PROC(alAuxiliaryEffectSlotiv);
- LOAD_PROC(alAuxiliaryEffectSlotf);
- LOAD_PROC(alAuxiliaryEffectSlotfv);
- LOAD_PROC(alGetAuxiliaryEffectSloti);
- LOAD_PROC(alGetAuxiliaryEffectSlotiv);
- LOAD_PROC(alGetAuxiliaryEffectSlotf);
- LOAD_PROC(alGetAuxiliaryEffectSlotfv);
+#define LOAD_PROC(T, x) ((x) = (T)alGetProcAddress(#x))
+ LOAD_PROC(LPALGENEFFECTS, alGenEffects);
+ LOAD_PROC(LPALDELETEEFFECTS, alDeleteEffects);
+ LOAD_PROC(LPALISEFFECT, alIsEffect);
+ LOAD_PROC(LPALEFFECTI, alEffecti);
+ LOAD_PROC(LPALEFFECTIV, alEffectiv);
+ LOAD_PROC(LPALEFFECTF, alEffectf);
+ LOAD_PROC(LPALEFFECTFV, alEffectfv);
+ LOAD_PROC(LPALGETEFFECTI, alGetEffecti);
+ LOAD_PROC(LPALGETEFFECTIV, alGetEffectiv);
+ LOAD_PROC(LPALGETEFFECTF, alGetEffectf);
+ LOAD_PROC(LPALGETEFFECTFV, alGetEffectfv);
+
+ LOAD_PROC(LPALGENAUXILIARYEFFECTSLOTS, alGenAuxiliaryEffectSlots);
+ LOAD_PROC(LPALDELETEAUXILIARYEFFECTSLOTS, alDeleteAuxiliaryEffectSlots);
+ LOAD_PROC(LPALISAUXILIARYEFFECTSLOT, alIsAuxiliaryEffectSlot);
+ LOAD_PROC(LPALAUXILIARYEFFECTSLOTI, alAuxiliaryEffectSloti);
+ LOAD_PROC(LPALAUXILIARYEFFECTSLOTIV, alAuxiliaryEffectSlotiv);
+ LOAD_PROC(LPALAUXILIARYEFFECTSLOTF, alAuxiliaryEffectSlotf);
+ LOAD_PROC(LPALAUXILIARYEFFECTSLOTFV, alAuxiliaryEffectSlotfv);
+ LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTI, alGetAuxiliaryEffectSloti);
+ LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTIV, alGetAuxiliaryEffectSlotiv);
+ LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTF, alGetAuxiliaryEffectSlotf);
+ LOAD_PROC(LPALGETAUXILIARYEFFECTSLOTFV, alGetAuxiliaryEffectSlotfv);
#undef LOAD_PROC
/* Initialize SDL_sound. */