From 1f193e14abc8ce1b071cf98c83b7f4f93dd3d81f Mon Sep 17 00:00:00 2001 From: krcroft Date: Mon, 28 Oct 2019 14:04:00 -0700 Subject: [PATCH] Simplify the task of making bit-field operations C and C++ compatible --- src/libs/decoders/SDL_sound.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/decoders/SDL_sound.h b/src/libs/decoders/SDL_sound.h index 9225c912..0bb6f1e9 100644 --- a/src/libs/decoders/SDL_sound.h +++ b/src/libs/decoders/SDL_sound.h @@ -176,7 +176,7 @@ typedef struct Sound_AudioInfo actual; /**< Actual audio format of sample. */ void *buffer; /**< Decoded sound data lands in here. */ Uint32 buffer_size; /**< Current size of (buffer), in bytes (Uint8). */ - Sound_SampleFlags flags; /**< Flags relating to this sample. */ + Uint32 flags; /**< Flags relating to this sample. */ } Sound_Sample; @@ -717,9 +717,12 @@ SNDDECLSPEC int SDLCALL Sound_Rewind(Sound_Sample *sample); */ SNDDECLSPEC int SDLCALL Sound_Seek(Sound_Sample *sample, Uint32 ms); + #ifdef __cplusplus } +#endif +/* inline Sound_SampleFlags operator|(Sound_SampleFlags a, Sound_SampleFlags b) {return static_cast(static_cast(a) | static_cast(b));} @@ -732,6 +735,7 @@ inline Sound_SampleFlags operator& (Sound_SampleFlags a, Sound_SampleFlags b) inline Sound_SampleFlags& operator&= (Sound_SampleFlags& a, Sound_SampleFlags b) { return (Sound_SampleFlags&)((int&)a &= (int)b); } #endif +*/ #endif /* !defined _INCLUDE_SDL_SOUND_H_ */