restore compatibility with old pulseaudio versions (<= 0.9.10) --- SDL-1.2.13/src/audio/pulse/SDL_pulseaudio.h~ 2009-03-06 19:37:56.000000000 +0200 +++ SDL-1.2.13/src/audio/pulse/SDL_pulseaudio.h 2009-03-06 19:35:20.000000000 +0200 @@ -42,6 +42,23 @@ int mixlen; }; +#if (PA_API_VERSION < 12) +/** Return non-zero if the passed state is one of the connected states */ +static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) { + return + x == PA_CONTEXT_CONNECTING || + x == PA_CONTEXT_AUTHORIZING || + x == PA_CONTEXT_SETTING_NAME || + x == PA_CONTEXT_READY; +} +/** Return non-zero if the passed state is one of the connected states */ +static inline int PA_STREAM_IS_GOOD(pa_stream_state_t x) { + return + x == PA_STREAM_CREATING || + x == PA_STREAM_READY; +} +#endif /* pulseaudio <= 0.9.10 */ + /* Old variable names */ #define mainloop (this->hidden->mainloop) #define mainloop_api (this->hidden->mainloop_api)